X / Twitter Following API
List the accounts a public X (Twitter) account follows by username with cursor pagination. Limit is a per-page maximum; follow the response's nextCursor for more.
Provider network
Providers ranked by traffic
Try it
Make your first request
{
"data": {
"items": [
{
"avatarUrl": "https://example.com/image.jpg",
"bio": "A short example description of this item.",
"followers": 12500,
"following": 12500,
"location": "example",
"name": "Example title",
"username": "alex_rivera"
}
],
"nextCursor": "example"
},
"found": true
}interface TwitterFollowingResponse {
data: {
items: {
avatarUrl: string;
bio: string;
followers: number;
following: number;
location?: string;
name: string;
username: string;
}[];
nextCursor?: string | null;
} | null;
found: boolean;
}Full parameter and response reference - every field, type, and example for this endpoint.
Reference
Request, response, and price
Last verified 2026-09-17 · uptime and latency measured over 30dcurl -X POST https://api.getanyapi.com/v1/run/twitter.following \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":200,"username":"nasa"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| username | string | "nasa"The X (Twitter) username to fetch the following list for, without the @ prefix (e.g. elonmusk). |
| cursor | string | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followed accounts. |
| limit | integer | 200Per-page maximum number of followed accounts to return (default 200). A limit larger than the native page still returns at most one native page; follow the response's nextCursor for more. |
| requireFields | array | Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `location`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted. |
| Response | ||
| data | object | |
| data.items | object[] | Followed-account records, normalized to a compact shape. Populated whenever the provider has data for the entity. |
| data.items[].avatarUrl | string | URL of the account's profile image (may be empty). Populated whenever the provider has data for the entity. |
| data.items[].biocan require | string | The account's profile bio/description. |
| data.items[].followerscan require | integer | How many followers this account has. |
| data.items[].followingcan require | integer | How many accounts this account follows. |
| data.items[].locationcan require | string | The account's self-reported location (may be empty). |
| data.items[].name | string | The account's display name. Populated whenever the provider has data for the entity. |
| data.items[].username | string | The account's @ handle, without the @ prefix. Populated whenever the provider has data for the entity. |
| data.nextCursorcan require | string | Opaque cursor for the next page of followed accounts, or null when there are no more. Pass it back as cursor to continue. |
| found | boolean | |
| Price | ||
| Price per request | USD | $0.0005 |
| Price /1k req | USD | $0.50 |
FAQ
About the X / Twitter Following API
The AnyAPI X / Twitter Following API returns X / Twitter following data as normalized JSON from one POST call to /v1/run/twitter.following. List the accounts a public X (Twitter) account follows by username with cursor pagination. Limit is a per-page maximum; follow the response's nextCursor for more. AnyAPI routes each request across 2 sources and falls back automatically when one fails. It costs from $0.50 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 100.0% of X / Twitter following calls through AnyAPI succeeded, with a median response time of 3.2 seconds across 32 measured calls.