Farcaster API
Welcome to the Pinata Farcaster API! The Farcaster API is a free to use API that references the Pinata Hub replicator database, so instead of using the Hub API you can get much easier to use data at much faster speeds.
To get started you will need a Pinata API Key!
API Keys
Visit the Pinata API Keys page to generate new keys.
In the ‘New Key’ modal, you can choose if you want the key to be an Admin key and have full access over every endpoint, or scope the keys by selecting which endpoints you want to use. You can also give it a limited number of uses, so be sure to give it a name to keep track of it. Once you have that filled out, click “Generate API Key” and it will show you the pinata_api_key
, pinata_api_secret_key
, and the JWT
. It’s best to click “Copy All” and keep the API key data safe and secure.
Once API keys have been created, you will not be able to see the secret or JWT again
Once you have created your keys you can go ahead and try testing them! Try to paste this into your terminal with your JWT
If successful you should see something like this!
Endpoints Overview
/casts
This endpoint is great for fetching a particular cast or by combining with query parameters to get specific lists of casts.
Casts by FID
Returns all the casts from user FID 6023
Casts by Following
Returns all the casts from users that FID 6023
is following
Casts by Channel
Returns all the casts from a specific channel, e.g. https://warpcast.com/~/channel/pinata
/channels
The /channels
endpoint can be used to fetch info about a specific channel or fetch a list of channels
/users
This endpoint is similar to /casts
in that you can either fetch a specific user by FID or you can combine multiple query parameters to get specific lists of users.
Users Following FID
Returns all the users following a specific FID
Users FID Following
Returns all the users a specific FID is following