> For the complete documentation index, see [llms.txt](https://docs.nodefy.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nodefy.xyz/our-api-guide/defining-event-types/farcaster.md).

# Farcaster

Monitor new casts on the Farcaster protocol, filtering by author, mentions, or keywords. This event type can be used to track specific users, identify trending topics, or even build a new Farcaster client.

**Event Type:** `FARCASTER_CAST`

To create a Farcaster event type, send a `POST` request to the `/api/v1/nodefy/notifications/` endpoint with the following JSON payload:

#### Example Request:

```json
{
  "external_user_id": "user123",                           
  "channel": "WEBHOOK",                                    
  "notification_name": "New Farcaster Cast",             
  "delivery_location": "https://webhook.site/cdcf-6718df-asdf",
  "event_details": {
        "network": "FARCASTER",
        "event_type": "FARCASTER_CAST",
        "text": ["keyword1"]
  }
}
```

#### Required `FARCASTER_CAST` Parameters:

*One* of the following parameters must be provided in order to successfully create a webhook to monitor all casts:

* **`text`:** A string containing keywords. The webhook will trigger if any of these keywords are found in a cast.
* **`author_fids`:** An array of Farcaster user IDs (FIDs) to monitor. The webhook will trigger for new casts created by these users.
* **`mentioned_fids`:** An array of FIDs that, if mentioned in a cast, will trigger the webhook.
* **`channel`:** A string of the Farcaster channel name. The webhook will trigger for new casts in this channel(s).

#### Farcaster Event Filters

You can apply more specific filters on Farcaster events using our filter system. Filters allow you to capture events based on parameters such as a range of FIDs, power badge status, and more. Refer to the ["Using Filters"](/our-api-guide/using-filters.md) section for more information.

#### Example Webhook Payload:

```json
{
  "createdAt": "2024-06-13T18:39:18.083001",
  "data": {
    "notification_name": "Farcaster Payload Test",
    "transaction_hash": "0x81f2a83527061c536d03c9c9be97b28059c7eced",
    "from_wallet": [
      "0xdd7a372377fc633f74ab6e20963803d52f448830"
    ],
    "to_wallet": "Undefined",
    "status": "",
    "asset": "Undefined",
    "value": "This is the cast text that contains a keyword you filtered on",
    "type": "FARCASTER_CAST",
    "network": "FARCASTER",
    "hook_payload": {
      "object": "cast",
      "hash": "0x81f2a83527061c536d03c9c9be97b28059c7eced",
      "thread_hash": "0x81f2a83527061c536d03c9c9be97b28059c7eced",
      "parent_hash": null,
      "parent_url": null,
      "root_parent_url": null,
      "parent_author": {
        "fid": null
      },
      "author": {
        "object": "user",
        "fid": 20698,
        "custody_address": "0x64cc8f7ff6d27151a4deb00674419c7453ca9775",
        "username": "baznocap",
        "display_name": "RJ ⚡️🎩🔵↑",
        "pfp_url": "https://i.imgur.com/dZEGWaA.jpg",
        "profile": {
          "bio": {
            "text": "Building Nodefy.xyz to improve onchain visibility"
          }
        },
        "follower_count": 342,
        "following_count": 285,
        "verifications": [
          "0xdd7a372377fc633f74ab6e20963803d52f448830"
        ],
        "verified_addresses": {
          "eth_addresses": [
            "0xdd7a372377fc633f74ab6e20963803d52f448830"
          ],
          "sol_addresses": []
        },
        "active_status": "inactive",
        "power_badge": false
      },
      "text": "This is the cast text that contains a keyword you filtered on",
      "timestamp": "2024-06-13T18:39:06.000Z",
      "embeds": [],
      "reactions": {
        "likes_count": 0,
        "recasts_count": 0,
        "likes": [],
        "recasts": []
      },
      "replies": {
        "count": 0
      },
      "mentioned_profiles": []
    },
    "author": "baznocap"
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nodefy.xyz/our-api-guide/defining-event-types/farcaster.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
