Twitter Followers API (X Followers)
Twitter Followers API — list the followers of any X (Twitter) account with full profiles, follower counts, and bios. Paginated JSON, $0.01 per call.
/v1/twitter/user-followersThe Twitter Followers API lists the accounts that follow an X user, most recent followers first, each with a full profile (bio, follower counts, verification). Use it for audience analysis, influencer vetting, or lead lists. The reverse direction is User Following.
Usage
const res = await fetch('https://api.yepapi.com/v1/twitter/user-followers', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({"username": "NASA", "count": 20}),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/twitter/user-followers \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "NASA", "count": 20}'import requests
res = requests.post(
"https://api.yepapi.com/v1/twitter/user-followers",
headers={"x-api-key": "YOUR_API_KEY"},
json={"username": "NASA", "count": 20},
)
print(res.json()["data"])Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
username | string | One of | X handle — NASA, @NASA, or an x.com / twitter.com profile URL | — |
user_id | string | One of | Numeric X user ID (skips the username lookup). Send username or user_id | — |
count | number | No | Page size hint, 1–100 | 20 |
cursor | string | No | cursor from the previous response, to fetch the next page | — |
Response
{
"ok": true,
"data": {
"cursor": "1880524837318699245|2116337016386879417",
"users": [
{
"avatar": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/34743251/1681251194",
"created_at": "2009-04-23T21:53:30+00:00",
"description": "SpaceX designs, manufactures and launches the world’s most advanced rockets and spacecraft",
"followers_count": 41941885,
"following_count": 127,
"id": "34743251",
"is_blue_verified": true,
"likes_count": 529,
"listed_count": 45956,
"location": "Earth",
"media_count": 4751,
"name": "SpaceX",
"pinned_tweet_ids": [],
"protected": false,
"tweet_count": 11912,
"url": "https://x.com/SpaceX",
"username": "SpaceX",
"verified": false,
"verified_type": "Business",
"website": "http://spacex.com"
},
{
"avatar": "https://pbs.twimg.com/profile_images/2050149546685022208/72MxNUv-_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/17471979/1789591798",
"created_at": "2008-11-18T21:28:10+00:00",
"description": "Step into wonder and find your inner explorer with National Geographic 🌎",
"followers_count": 28088149,
"following_count": 179,
"id": "17471979",
"is_blue_verified": true,
"likes_count": 7559,
"listed_count": 59007,
"location": "Global",
"media_count": 8616,
"name": "National Geographic",
"pinned_tweet_ids": [
"2110807923106386140"
],
"protected": false,
"tweet_count": 73703,
"url": "https://x.com/NatGeo",
"username": "NatGeo",
"verified": false,
"verified_type": "Business",
"website": "http://www.nationalgeographic.com"
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.users | object[] | Accounts |
data.users[].id | string | Numeric user ID — use it as user_id on timeline endpoints |
data.users[].username | string | Handle without @ |
data.users[].name | string | Display name |
data.users[].description | string | null | Bio |
data.users[].location | string | null | Location from the profile |
data.users[].website | string | null | Website link from the profile |
data.users[].created_at | string | Account creation, ISO 8601 |
data.users[].avatar | string | null | Profile image URL (400×400) |
data.users[].banner | string | null | Banner image URL |
data.users[].url | string | x.com profile URL |
data.users[].followers_count | number | Followers |
data.users[].following_count | number | Accounts followed |
data.users[].tweet_count | number | Posts, including replies and reposts |
data.users[].likes_count | number | Posts liked |
data.users[].media_count | number | Photos and videos posted |
data.users[].listed_count | number | Lists the account is on |
data.users[].is_blue_verified | boolean | Has a blue check |
data.users[].verified | boolean | Legacy verification flag |
data.users[].verified_type | string | null | Business, Government, or null |
data.users[].protected | boolean | Posts are protected (private) |
data.users[].pinned_tweet_ids | string[] | IDs of pinned posts |
data.cursor | string | null | Cursor for the next page |
Pagination
Each response includes a cursor. Send the same request again with that value in cursor to get the next page; cursor is null when there is nothing more (or the page came back empty). count is a page-size hint — X may return a few more or fewer items than you ask for. Every page is a separate $0.01 call.
Caching
Responses are cached for 1 hour.
Errors
| Status | Code | When |
|---|---|---|
400 | VALIDATION_ERROR | Neither username nor user_id was sent, or one is malformed |
404 | NOT_FOUND | User not found or suspended |
429 | RATE_LIMITED_UPSTREAM | Too many requests in a short burst — retry after a few seconds |
502 / 503 | UPSTREAM_ERROR / SERVICE_UNAVAILABLE | Temporary problem fetching data from X — retry later |
Failed calls are not charged.
A protected account returns 200 with an empty users list.
Related Endpoints
- Twitter Following API — accounts this user follows
- Twitter User API — the account's profile
- Users Lookup — refresh up to 100 profiles by ID
X / Twitter User Media API
Get an X (Twitter) account's photo and video tweets — the Media tab — with image URLs, MP4 video URLs, dimensions, and alt text. JSON, $0.01 per call.
Twitter Following API (X Following)
Twitter Following API — list the accounts an X (Twitter) user follows, with full profiles. Paginated JSON, $0.01 per call.