# Farcaster Casts + Profiles Scraper (`claudethegoat/farcaster-casts-profiles-scraper`) Actor

Extract casts (posts) and profiles from Farcaster — the decentralized social network — via keyless public APIs. Full-text cast search, rich profiles, and channel feeds. No account, no credentials, public data only.

- **URL**: https://apify.com/claudethegoat/farcaster-casts-profiles-scraper.md
- **Developed by:** [Manik Anand](https://apify.com/claudethegoat) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 result scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Farcaster Casts + Profiles Scraper

Extract **casts** (posts) and **profiles** from **Farcaster** — the fast-growing decentralized social network — using **keyless public APIs**. No account, no API key, no credentials, no proxy spend. Public, logged-out data only.

Farcaster is the leading web3-native social protocol (the network behind the Warpcast / Farcaster app, backed by a16z). It is where crypto founders, builders, and communities publish in the open — a high-signal, under-scraped data source for AI pipelines, market research, and community intelligence.

### What it does

- **Search casts** by keyword or phrase — full-text search across all public casts, newest first, with resolved authors and engagement counts
- **Scrape profiles** by username or FID — rich account data: bio, follower / following counts, verified addresses, connected X (Twitter) accounts
- **Include user timelines** — optionally pull each profile's recent casts in the same run
- **Channel feeds** — collect recent casts from any channel (e.g. `/base`, `/degen`, `/farcaster`) via the canonical Farcaster hub
- **Unified, flattened output** — casts and profiles land as clean, one-object-per-row dataset items with consistent field names

### Why use this actor

| Alternative | Problem | This actor |
|---|---|---|
| Neynar / other hosted Farcaster APIs | Require a paid API key + signup | **Keyless** — zero credentials |
| Generic "web3 social" scrapers | Don't cover Farcaster casts/profiles | Purpose-built for Farcaster |
| Raw Hubble hub calls | Return FID-only protobuf; no text search; no resolved authors | Full-text search + **resolved usernames, display names, engagement** |
| DIY scripts | Break on rate-limits / upstream blocks | **Born hardened** — never crashes, degrades gracefully |

At publish time there is **no dedicated Farcaster casts+profiles scraper on the Apify Store** — this fills a clear gap for a network with millions of casts.

### Modes

#### 1. Search casts
```json
{ "mode": "search", "searchTerms": ["ethereum", "base app"], "maxResults": 500 }
````

Full-text search over public casts. Each term is a separate query. Cursor pagination walks real depth.

#### 2. Profiles

```json
{ "mode": "profile", "usernames": ["dwr", "vitalik.eth"], "includeUserCasts": true, "maxResults": 100 }
```

Rich profiles by username (or `fids: [3, 5650]`). With `includeUserCasts`, also pulls each user's recent cast timeline.

#### 3. Channel feed

```json
{ "mode": "channel", "channels": ["base", "degen", "farcaster"], "maxResults": 300 }
```

Recent casts in a channel, pulled from the canonical Farcaster hub and joined to resolved author usernames.

### Output fields

#### Casts

| Field | Type | Description |
|---|---|---|
| `hash` | string | Canonical cast hash (unique id) |
| `url` | string | Permalink |
| `text` | string | Cast body text |
| `timestamp` | string | ISO 8601 timestamp |
| `author_fid` | integer | Author's Farcaster ID |
| `author_username` | string | Author @username |
| `author_display_name` | string | Author display name |
| `author_follower_count` | integer | Author followers |
| `reply_count` | integer | Replies (search/profile modes) |
| `reaction_count` | integer | Likes (search/profile modes) |
| `recast_count` | integer | Recasts (search/profile modes) |
| `channel_key` | string | Channel the cast was posted to |
| `image_urls` | array | Embedded image URLs |
| `embed_urls` | array | Embedded link URLs |
| `has_media` | boolean | Whether the cast has media |
| `mentions` | array | Mentioned users |
| `parent_hash` | string | Parent cast hash (if a reply) |

#### Profiles

| Field | Type | Description |
|---|---|---|
| `fid` | integer | Farcaster ID |
| `username` | string | @username |
| `display_name` | string | Display name |
| `url` | string | Profile link |
| `bio` | string | Bio text |
| `follower_count` | integer | Followers |
| `following_count` | integer | Following |
| `pfp_url` | string | Profile picture URL |
| `external_url` | string | Linked website |
| `connected_accounts` | array | Linked accounts (e.g. X/Twitter) |

### Common use cases

- **Crypto & web3 research** — track narratives, tokens, and protocols as builders discuss them in the open
- **Brand & founder monitoring** — follow mentions of your product, company, or people on Farcaster
- **Community intelligence** — monitor channels like `/base` or `/degen` for emerging topics
- **AI / RAG pipelines** — feed fresh, high-signal social text into retrieval systems
- **KOL & influencer discovery** — profile accounts and their reach in a niche
- **Sentiment analysis** — classify public opinion on trending crypto/tech topics

### Pricing

**Pay per result:** $0.001 per dataset item (cast or profile).

Example: 10,000 casts ≈ **$10**. You only pay for results actually delivered; the actor stops when your run's charge limit is reached.

### Technical notes & resilience

- **Keyless** — uses the public Warpcast API (`api.warpcast.com`) for search + profiles and the public Pinata Hubble hub (`hub.pinata.cloud`) for channel feeds. No key, no login, no proxy.
- **Never crashes** — every upstream call retries transient errors (429 / 5xx / network) with exponential backoff and degrades gracefully on a hard block (keeps partial results, exits 0). A bad or empty input still returns output.
- **Verified pagination** — cursor pagination is confirmed to advance across pages (no duplicate walls).
- **Polite pacing** — ~3 requests/sec with automatic backoff.
- **Charge-limit aware** — stops cleanly when your spending limit is hit; no overrun.

### Data compliance

This actor accesses only **public, logged-out data** through Farcaster's public APIs. Farcaster is an open protocol whose casts are publicly broadcast. No login credentials are used. Suitable for research and business use of public data.

# Actor input Schema

## `mode` (type: `string`):

What to scrape. 'search' = full-text cast search by keyword. 'profile' = rich profiles by username/FID (optionally with each user's recent casts). 'channel' = recent casts in a channel (e.g. /base, /degen) via the canonical Farcaster hub.

## `searchTerms` (type: `array`):

Keywords or phrases to search across all public casts. Each term runs as a separate query.

## `usernames` (type: `array`):

Farcaster usernames to fetch profiles for (with or without a leading @). Example: dwr, vitalik.eth

## `fids` (type: `array`):

Farcaster IDs (numeric) to fetch profiles for directly — an alternative to usernames.

## `channels` (type: `array`):

Channel keys to pull recent casts from (with or without a leading /). Example: farcaster, base, degen

## `includeUserCasts` (type: `boolean`):

When scraping profiles, also fetch each user's recent cast timeline (up to Max results per target).

## `maxResults` (type: `integer`):

Maximum casts to return per search term / per channel / per user timeline. Higher values increase cost and run time.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "ethereum",
    "base app"
  ],
  "usernames": [
    "dwr",
    "vitalik.eth"
  ],
  "fids": [],
  "channels": [
    "farcaster",
    "base"
  ],
  "includeUserCasts": false,
  "maxResults": 200
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "ethereum",
        "base app"
    ],
    "usernames": [
        "dwr",
        "vitalik.eth"
    ],
    "fids": [],
    "channels": [
        "farcaster",
        "base"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("claudethegoat/farcaster-casts-profiles-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": [
        "ethereum",
        "base app",
    ],
    "usernames": [
        "dwr",
        "vitalik.eth",
    ],
    "fids": [],
    "channels": [
        "farcaster",
        "base",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("claudethegoat/farcaster-casts-profiles-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "ethereum",
    "base app"
  ],
  "usernames": [
    "dwr",
    "vitalik.eth"
  ],
  "fids": [],
  "channels": [
    "farcaster",
    "base"
  ]
}' |
apify call claudethegoat/farcaster-casts-profiles-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=claudethegoat/farcaster-casts-profiles-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Farcaster Casts + Profiles Scraper",
        "description": "Extract casts (posts) and profiles from Farcaster — the decentralized social network — via keyless public APIs. Full-text cast search, rich profiles, and channel feeds. No account, no credentials, public data only.",
        "version": "0.1",
        "x-build-id": "gW7Br5VIiE1bPiYEW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/claudethegoat~farcaster-casts-profiles-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-claudethegoat-farcaster-casts-profiles-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/claudethegoat~farcaster-casts-profiles-scraper/runs": {
            "post": {
                "operationId": "runs-sync-claudethegoat-farcaster-casts-profiles-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/claudethegoat~farcaster-casts-profiles-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-claudethegoat-farcaster-casts-profiles-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search",
                            "profile",
                            "channel"
                        ],
                        "type": "string",
                        "description": "What to scrape. 'search' = full-text cast search by keyword. 'profile' = rich profiles by username/FID (optionally with each user's recent casts). 'channel' = recent casts in a channel (e.g. /base, /degen) via the canonical Farcaster hub.",
                        "default": "search"
                    },
                    "searchTerms": {
                        "title": "Search terms (search mode)",
                        "type": "array",
                        "description": "Keywords or phrases to search across all public casts. Each term runs as a separate query.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "usernames": {
                        "title": "Usernames (profile mode)",
                        "type": "array",
                        "description": "Farcaster usernames to fetch profiles for (with or without a leading @). Example: dwr, vitalik.eth",
                        "items": {
                            "type": "string"
                        }
                    },
                    "fids": {
                        "title": "FIDs (profile mode, alternative to usernames)",
                        "type": "array",
                        "description": "Farcaster IDs (numeric) to fetch profiles for directly — an alternative to usernames.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "channels": {
                        "title": "Channels (channel mode)",
                        "type": "array",
                        "description": "Channel keys to pull recent casts from (with or without a leading /). Example: farcaster, base, degen",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeUserCasts": {
                        "title": "Include each user's recent casts (profile mode)",
                        "type": "boolean",
                        "description": "When scraping profiles, also fetch each user's recent cast timeline (up to Max results per target).",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max results per target",
                        "minimum": 1,
                        "maximum": 20000,
                        "type": "integer",
                        "description": "Maximum casts to return per search term / per channel / per user timeline. Higher values increase cost and run time.",
                        "default": 200
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
