Skip to main content

API endpoint

This tutorial uses the GET v2/feed endpoint
Imagine you want to create a custom list of users in your app and show a feed of casts based on users in the list, similar to Twitter lists.
feed

Create a feed given a list of users

In this example, we will try to feed for fids 1, 2 and 3. If you know someone’s username, you can find their fid from our user endpoint.

Ensure you have the right environment setup

Make sure to have node.js, typescript (ts) and yarn installed on your machine

Create a new typescript file with the right imports

Initialize the client

Call fetchFeedPage function to get feed

Run your new .ts file

  • Navigate to the right folder in your terminal e.g. cd ./test-sdk
  • Run script by typing yarn start into the terminal

You should now see an output like this

You get all the data in one request, making it easy to display or use in your next operation. If you want to try getting a live response, head over to our API page for v2/feed. You can take the cursor from the output and pass it in the next request to the SDK to page to the next set of results.

Ready to start building?

Get your subscription at neynar.com and reach out to us on Slack with any questions!