Farcaster API V2
- User
- Fetch User Information
- Fetch User's Casts
- Register New User
- Update User Profile
- GETFetch authorization url
- Signer
- Cast
- Feed
- Reaction
- Notifications
- Channel
- Follows
- Storage
- Frame
- Agents
- Fname
- Webhook
- Action
- Mute
- Block
- Ban
- Onchain
- Login
- Metrics
Onchain
Farcaster Hub API
- Info
- Casts
- Reactions
- Links
- UserData
- Fids
- Storage
- Usernames
- Verifications
- OnChainEvents
- Message
- HubEvents
Neynar SDK
- Getting Started with Neynar NodeJS SDK
- SDK v1 to v2 migration guide
By username
Fetches a single hydrated user object given a username
curl --request GET \
--url https://api.neynar.com/v2/farcaster/user/by_username \
--header 'x-api-key: <api-key>'
{
"user": {
"object": "user",
"fid": 3,
"username": "<string>",
"display_name": "<string>",
"custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"pfp_url": "<string>",
"profile": {
"bio": {
"text": "<string>",
"mentioned_profiles": [
{
"object": "user_dehydrated",
"fid": 3,
"username": "<string>",
"display_name": "<string>",
"pfp_url": "<string>",
"custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7"
}
],
"mentioned_profiles_ranges": [
{
"start": 1,
"end": 1
}
],
"mentioned_channels": [
{
"id": "<string>",
"name": "<string>",
"object": "channel_dehydrated",
"image_url": "<string>",
"viewer_context": {
"following": true,
"role": "member"
}
}
],
"mentioned_channels_ranges": [
{
"start": 1,
"end": 1
}
]
},
"location": {
"latitude": 0,
"longitude": 0,
"address": {
"city": "<string>",
"state": "<string>",
"state_code": "<string>",
"country": "<string>",
"country_code": "<string>"
}
}
},
"follower_count": 123,
"following_count": 123,
"verifications": [
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
],
"verified_addresses": {
"eth_addresses": [
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
],
"sol_addresses": [
"<string>"
],
"primary": {
"eth_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"sol_address": "<string>"
}
},
"verified_accounts": [
{
"platform": "x",
"username": "<string>"
}
],
"power_badge": true,
"experimental": {
"neynar_user_score": 123
},
"score": 123,
"viewer_context": {
"following": true,
"followed_by": true,
"blocking": true,
"blocked_by": true
}
}
}
Authorizations
API key to authorize requests
Headers
Query Parameters
Username of the user to fetch
The unique identifier of a farcaster user (unsigned integer)
3
191
2
194
19960
Response
user
The unique identifier of a farcaster user (unsigned integer)
3
191
2
194
19960
Ethereum address
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
user_dehydrated
The unique identifier of a farcaster user (unsigned integer)
3
191
2
194
19960
Ethereum address
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
Positions within the text (inclusive start, exclusive end) where each mention occurs. Each index within this list corresponds to the same-numbered index in the mentioned_profiles list.
channel_dehydrated
Adds context on the viewer's or author's role in the channel.
Positions within the text (inclusive start, exclusive end) where each mention occurs. Each index within this list corresponds to the same-numbered index in the mentioned_channels list.
Coordinates and place names for a location
-90 <= x <= 90
-180 <= x <= 180
The number of followers the user has.
The number of users the user is following.
Ethereum address
List of verified Ethereum addresses of the user sorted by oldest to most recent.
Ethereum address
List of verified Solana addresses of the user sorted by oldest to most recent.
Solana address
Score that represents the probability that the account is not spam.
The URL of the user's profile picture
Score that represents the probability that the account is not spam.
Adds context on the viewer's follow relationship with the user.
Indicates if the viewer is following the user.
Indicates if the viewer is followed by the user.
Indicates if the viewer is blocking the user.
Indicates if the viewer is blocked by the user.
Was this page helpful?
curl --request GET \
--url https://api.neynar.com/v2/farcaster/user/by_username \
--header 'x-api-key: <api-key>'
{
"user": {
"object": "user",
"fid": 3,
"username": "<string>",
"display_name": "<string>",
"custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"pfp_url": "<string>",
"profile": {
"bio": {
"text": "<string>",
"mentioned_profiles": [
{
"object": "user_dehydrated",
"fid": 3,
"username": "<string>",
"display_name": "<string>",
"pfp_url": "<string>",
"custody_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7"
}
],
"mentioned_profiles_ranges": [
{
"start": 1,
"end": 1
}
],
"mentioned_channels": [
{
"id": "<string>",
"name": "<string>",
"object": "channel_dehydrated",
"image_url": "<string>",
"viewer_context": {
"following": true,
"role": "member"
}
}
],
"mentioned_channels_ranges": [
{
"start": 1,
"end": 1
}
]
},
"location": {
"latitude": 0,
"longitude": 0,
"address": {
"city": "<string>",
"state": "<string>",
"state_code": "<string>",
"country": "<string>",
"country_code": "<string>"
}
}
},
"follower_count": 123,
"following_count": 123,
"verifications": [
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
],
"verified_addresses": {
"eth_addresses": [
"0x5a927ac639636e534b678e81768ca19e2c6280b7"
],
"sol_addresses": [
"<string>"
],
"primary": {
"eth_address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"sol_address": "<string>"
}
},
"verified_accounts": [
{
"platform": "x",
"username": "<string>"
}
],
"power_badge": true,
"experimental": {
"neynar_user_score": 123
},
"score": 123,
"viewer_context": {
"following": true,
"followed_by": true,
"blocking": true,
"blocked_by": true
}
}
}