Farcaster
Access Farcaster user profiles, casts, followers, and social graph.
Try it Live
Open in Swagger UI โ to test these endpoints interactively.
Identifier Typesโ
Understanding Identifiers
Different endpoints accept different identifier types:
| Parameter | Accepts | Example |
|---|---|---|
{identifier} | FID, username, address, or ENS | 3, dwr.eth, 0x6b0b... |
{fid} | Farcaster ID (number only) | 3 |
{username} | Username string | dwr.eth |
{hash} | Cast hash (hex string) | 0xabc123... |
The /api/farcaster/{identifier} endpoint auto-detects the type.
Endpointsโ
| Endpoint | Description | Price |
|---|---|---|
GET /api/farcaster/{identifier} | User profile (accepts FID/username/address) | $0.01 |
GET /api/farcaster/{fid}/casts | User's casts (FID required) | $0.01 |
GET /api/farcaster/{fid}/followers | Followers list (FID required) | $0.01 |
GET /api/farcaster/{fid}/following | Following list (FID required) | $0.01 |
GET /api/farcaster/cast/{hash} | Single cast by hash | $0.001 |
GET /api/farcaster/{identifier}โ
Get Farcaster user profile by FID, username, or connected address.
Identifiersโ
- FID:
3(Dan Romero) - Username:
dwr.ethordwr - Address:
0x...(connected wallet) - ENS:
vitalik.eth(if connected)
Requestโ
curl https://api.web3identity.com/api/farcaster/dwr.eth
Responseโ
{
"fid": 3,
"username": "dwr.eth",
"displayName": "Dan Romero",
"bio": "Building @farcaster",
"pfp": "https://i.imgur.com/...",
"followers": 425000,
"following": 2100,
"verifications": [
"0x6b0bda3f2ffed5efc83fa8c024acff1dd45793f1"
],
"activeStatus": "active",
"registeredAt": "2021-11-04T00:00:00Z"
}
SDKโ
const user = await client.getFarcasterUser('dwr.eth');
JavaScriptโ
const BASE_URL = 'https://api.web3identity.com';
async function getFarcasterUser(identifier) {
const response = await fetch(`${BASE_URL}/api/farcaster/${identifier}`);
if (!response.ok) throw new Error('User not found');
return response.json();
}
// By username
const user = await getFarcasterUser('dwr.eth');
console.log(`${user.displayName}: ${user.followers.toLocaleString()} followers`);
// By FID
const userByFid = await getFarcasterUser(3);
// By connected wallet
const userByWallet = await getFarcasterUser('0x6b0bda3f2ffed5efc83fa8c024acff1dd45793f1');
Pythonโ
import requests
BASE_URL = "https://api.web3identity.com"
def get_farcaster_user(identifier: str) -> dict:
response = requests.get(f"{BASE_URL}/api/farcaster/{identifier}")
response.raise_for_status()
return response.json()
user = get_farcaster_user("dwr.eth")
print(f"{user['displayName']} (@{user['username']})")
print(f"Bio: {user['bio']}")
print(f"Followers: {user['followers']:,}")
GET /api/farcaster/{fid}/castsโ
Get recent casts from a user.
Query Parametersโ
| Param | Type | Default | Description |
|---|---|---|---|
limit | number | 25 | Max results (1-100) |
cursor | string | โ | Pagination cursor |
Requestโ
curl "https://api.web3identity.com/api/farcaster/3/casts?limit=10"
Responseโ
{
"casts": [
{
"hash": "0x...",
"text": "Building in public...",
"timestamp": "2026-02-08T10:30:00Z",
"likes": 523,
"recasts": 45,
"replies": 89,
"embeds": []
}
],
"nextCursor": "abc123..."
}
GET /api/farcaster/{fid}/followersโ
Get user's followers.
Requestโ
curl "https://api.web3identity.com/api/farcaster/3/followers?limit=50"
Responseโ
{
"users": [
{
"fid": 1234,
"username": "alice",
"displayName": "Alice",
"pfp": "https://..."
}
],
"count": 50,
"total": 425000,
"nextCursor": "..."
}
GET /api/farcaster/cast/{hash}โ
Get a single cast by its hash.
Requestโ
curl https://api.web3identity.com/api/farcaster/cast/0xabc123...
Responseโ
{
"hash": "0xabc123...",
"author": {
"fid": 3,
"username": "dwr.eth"
},
"text": "Hello Farcaster!",
"timestamp": "2026-02-08T10:30:00Z",
"likes": 523,
"recasts": 45,
"replies": 89,
"parentHash": null,
"threadHash": "0xabc123..."
}
Searchโ
GET /api/farcaster/searchโ
Search for users or casts.
# Search users
curl "https://api.web3identity.com/api/farcaster/search?q=ethereum&type=users"
# Search casts
curl "https://api.web3identity.com/api/farcaster/search?q=ethereum&type=casts"
Channelsโ
GET /api/farcaster/channelsโ
List popular Farcaster channels.
curl https://api.web3identity.com/api/farcaster/channels
GET /api/farcaster/channel/{id}โ
Get channel details and recent casts.
curl https://api.web3identity.com/api/farcaster/channel/ethereum
Errorsโ
| Code | Description |
|---|---|
USER_NOT_FOUND | FID/username doesn't exist |
CAST_NOT_FOUND | Cast hash not found |
INVALID_FID | FID must be a number |
Related Endpointsโ
- Lens Protocol โ Lens social data
- ENS Social Graph โ ENS-based connections
- ENS Resolution โ Resolve ENS names
- Avatar Resolution โ Profile images