To access the Airstack APIs in other languages, you can use https://api.airstack.xyz/gql as your GraphQL endpoint.
Get All Replies By A Farcaster User
You can use FarcasterReplies API to fetch all the replies casted by a given Farcaster user by specifying the user's identity in repliedBy input filter:
{"data": {"FarcasterReplies": {"Reply": [ {"castedAtTimestamp":"2024-05-06T16:30:01Z","embeds": [],"url":"https://warpcast.com/betashop.eth/0xde71bb21", "text": "more thinking on this \n\nPreferred widgets/Actions at user and channel level \n\nallow more shopify-type experiences to emergeâ always on my page \n\nAllows meme coins and nft projects to always have perm buy and mint actions \n\nAllows users to easily play favorite games together",
"numberOfRecasts":0,"numberOfLikes":0,"channel":null,"mentions": [] }, ] } }}
Get All Replies Of A Certain Cast By Cast Hash
You can use FarcasterReplies API to fetch all replies of a given cast by specifying the cast hash in parentHash input filter:
{"data": {"FarcasterReplies": {"Reply": [ {"fid":"274034","castedAtTimestamp":"2024-05-06T14:25:37Z","embeds": [],"url":"https://warpcast.com/spd/0x3d913531","text":"Minted","numberOfRecasts":0,"numberOfLikes":0,"channel": {"channelId":"farcards" },"mentions": [] },// Other replies for cast hash 0x4c0f2172836b14a57d35f5d096ced49049b1d92d ] } }}
Get All Replies From A Cast Casted By A Farcaster User
You can use FarcasterReplies API to fetch all the replies from any casts casted by a given Farcaster user by specifying the user's identity in parentCastedBy input filter:
You can use the FarcasterReactions API to check if a user replied to a certain cast by providing the user's identity in reactedBy and the cast hash in castHash input filter:
{"data": {"FarcasterReactions": {"Reaction": [ {// if not null, then user replied to this cast"castHash":"0xfb41e8ada70ee2da9a21023ec77469a03c4bcea9" } ] } }}
Check If User A Replied Any Cast By User B
You can use FarcasterReplies API to check if user A replied to any cast by user B:
Try Demo
Code
queryMyQuery { FarcasterReplies( input: {filter: {repliedBy: {_eq: "fc_fid:2602"}, # user AparentCastedBy: {_eq: "fc_fid:602"} # user B },blockchain: ALL,limit: 1 } ) { Reply { castedAtTimestamp } }}
{"data": {"FarcasterReplies": {"Reply": [ {// if not null, then user A replied to a cast by user B"castedAtTimestamp":"2024-05-05T20:48:08Z" } ] } }}
Developer Support
If you have any questions or need help regarding fetching Farcaster replies data, please join our Airstack's Telegram group.