> ## 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.

# Reactions API

> gRPC API for retrieving reactions (likes and recasts) on Farcaster

## API

| Method Name                 | Request Type             | Response Type    | Description                                                                     |
| --------------------------- | ------------------------ | ---------------- | ------------------------------------------------------------------------------- |
| GetReaction                 | ReactionRequest          | Message          | Returns a specific Reaction                                                     |
| GetReactionsByFid           | ReactionsByFidRequest    | MessagesResponse | Returns Reactions made by an Fid in reverse chron order                         |
| GetReactionsByCast          | ReactionsByTargetRequest | MessagesResponse | Returns ReactionAdds for a given Cast in reverse chron order (To be deprecated) |
| GetReactionsByTarget        | ReactionsByTargetRequest | MessagesResponse | Returns ReactionAdds for a given target (cast or URL) in reverse chron order    |
| GetAllReactionMessagesByFid | FidTimestampRequest      | MessagesResponse | Returns Reactions made by an Fid with optional timestamp filtering              |

## Reaction Request

Used to retrieve valid or revoked reactions

| Field            | Type         | Label | Description                                                           |
| ---------------- | ------------ | ----- | --------------------------------------------------------------------- |
| fid              | uint64       |       | Farcaster ID of the user who generated the Reaction                   |
| reaction\_type   | ReactionType |       | Type of the Reaction being requested                                  |
| target\_cast\_id | CastId       |       | (optional) Identifier of the Cast whose reactions are being requested |
| target\_url      | string       |       | (optional) Identifier of the Url whose reactions are being requested  |

## ReactionsByFid Request

| Field          | Type         | Label    | Description                                         |
| -------------- | ------------ | -------- | --------------------------------------------------- |
| fid            | uint64       |          | Farcaster ID of the user who generated the Reaction |
| reaction\_type | ReactionType | optional | Type of the Reaction being requested                |
| page\_size     | uint32       | optional | Number of results to return per page                |
| page\_token    | bytes        | optional | Token for pagination                                |
| reverse        | boolean      | optional | Whether to return results in reverse order          |

## ReactionsByTargetRequest

| Field            | Type         | Label    | Description                                     |
| ---------------- | ------------ | -------- | ----------------------------------------------- |
| target\_cast\_id | CastId       |          | Target cast ID to find reactions for (optional) |
| target\_url      | string       |          | Target URL to find reactions for (optional)     |
| reaction\_type   | ReactionType | optional | Type of reaction to filter by                   |
| page\_size       | uint32       | optional | Number of results to return per page            |
| page\_token      | bytes        | optional | Token for pagination                            |
| reverse          | bool         | optional | Whether to return results in reverse order      |

## FidTimestampRequest

| Field            | Type   | Label    | Description                                |
| ---------------- | ------ | -------- | ------------------------------------------ |
| fid              | uint64 |          | Farcaster ID                               |
| page\_size       | uint32 | optional | Number of results to return per page       |
| page\_token      | bytes  | optional | Token for pagination                       |
| reverse          | bool   | optional | Whether to return results in reverse order |
| start\_timestamp | uint64 | optional | Optional timestamp to start filtering from |
| stop\_timestamp  | uint64 | optional | Optional timestamp to stop filtering at    |
