Documentation Index
Fetch the complete documentation index at: https://docs.neynar.com/llms.txt
Use this file to discover all available pages before exploring further.
API endpoint
This tutorial uses the GET v2/cast endpoint
Fetch cast information easily with Neynar SDK
Ensure you have the right environment setup
Make sure to have node.js, typescript (ts) and yarn installed on your machine- Install node.js and npm
- Install yarn
- Install ts-node globally
Create a new typescript file with the right imports
Initialize the client
Call lookUpCastByHashOrUrl function to get cast data based on a url
CastParamType.Url to CastParamType.Hash use a hash (e.g. 0x123…abc) instead to fetch cast data if you so want.
Run your new .ts file
- Navigate to the right folder in your terminal e.g.
cd ./test-sdk - Run script by typing
yarn startinto the terminal