GET
/
casts
curl --request GET \
  --url https://api.pinata.cloud/v3/farcaster/casts \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "casts": [
      {
        "fid": 4823,
        "hash": "0x9733fce86e174d1b2d8ba614c7cc0e2ba5372a97",
        "short_hash": "0x9733fce8",
        "thread_hash": "0x317904d560a9acf1d25888322dd8c49afd78eb1f",
        "parent_hash": "0x0ab851ba8524eedf9e164b55f6eeec751f74b539",
        "parent_url": null,
        "root_parent_url": "https://warpcast.com/~/channel/frames",
        "parent_author": {
          "uid": 680,
          "fid": 680,
          "custody_address": "0x0b28a373fc8d92669aefb420499e74ce2dd5d356",
          "recovery_address": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
          "following_count": 777,
          "follower_count": 62160,
          "verifications": [
            "0x1aa3096e2bbacae10c316e7282947f635d461e3c",
            "0xf417ace7b13c0ef4fcb5548390a450a4b75d3eb3"
          ],
          "bio": "@supercast",
          "display_name": "​woj — q/dau",
          "pfp_url": "https://peach-changing-limpet-80.mypinata.cloud/ipfs/QmZenqRfBERmodRVUHhLaYvYVsRasihVcMY2gqUP2tX7t2?filename=profile_picture.png",
          "username": "woj.eth"
        },
        "author": {
          "uid": 4823,
          "fid": 4823,
          "custody_address": "0x7f9a6992a54dc2f23f1105921715bd61811e5b71",
          "recovery_address": "0x00000000fcb080a4d6c39a9354da9eb9bc104cd7",
          "following_count": 844,
          "follower_count": 13623,
          "verifications": [
            "0x1612c6dff0eb5811108b709a30d8150495ce9cc5",
            "0xcdcdc174901b12e87cc82471a2a2bd6181c89392"
          ],
          "bio": "Writer. Building @pinatacloud. Tinkering with a Farcaster native alternative to GoodReads: https://readcast.xyz \\ https://polluterofminds.com",
          "display_name": "Justin Hunter",
          "pfp_url": "https://i.seadn.io/gae/lhGgt7yK1JiBVYz_HBxcAmYLRtP03aw5xKX4FgmFT9Ai7kLD5egzlLvb0lkuRNl28shtjr07DC8IHzLUkTqlWUMndUzC9R5_MSxH3g?w=500&auto=format",
          "username": "polluterofminds"
        },
        "content": "Noooooooooo",
        "timestamp": "2024-03-08T21:12:34Z",
        "embeds": [],
        "reactions": {},
        "replies": {
          "count": 1
        },
        "mentioned_profiles": []
      }
    ],
    "next_page_token": "eyJvZmZzZXQiOiIwIn0"
  }
}

This endpoint is great for fetching a particular cast or by combining with query parameters to get specific lists of casts.

Casts by FID

/casts?fid=6023

Returns all the casts from user FID 6023

Casts by Following

/casts?fid=6023&following=true

Returns all the casts from users that FID 6023 is following

Casts by Channel

/casts?channel=https://warpcast.com/~/channel/pinata

Returns all the casts from a specific channel, e.g. https://warpcast.com/~/channel/pinata

Casts by Parent Hash

Returns all the casts fror a specified parent hash

/casts?parentHash=0x0ab851ba8524eedf9e164b55f6eeec751f74b539

The timestamps returned by the Hub are working off an epoch of 1609459200 or January 1, 2021 UTC. Keep this in mind when parsing the time of posted casts.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fid
integer

Returns casts from a specific FID

following
boolean

When used in combination of fid will return the casts for who that fid is following

reverse
boolean

Will reverse the results giving the most casts recent first

channel
string

Specify a channel to fetch casts from

parentHash
string

Returns casts for a specific parent hash

pageToken
string

Token to be used for the next page of results

topLevel
boolean

Filter casts that have no parent hash

pageSize
integer

Determine the number of results, if not specified default is 100

Response

200 - application/json

The response is of type object.