X / Twitter API

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.

POST/v1/run/twitter.following
Uptime
100.00%
30d · 32 calls
Requests
49
30d · weekly, last 12 wks
Response
3.2s
median · 30d

Provider network

Providers ranked by traffic

Providers
Fox- served- uptime- p50-$3.60/1k reqflatLynxTried first- served- uptime- p50-$0.50/1k reqflat

Try it

Make your first request

requireFieldsarray
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.
Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.
{
  "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
}
Response interface
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 30d
POST /v1/run/twitter.following
curl -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"}'
FieldTypeExample value
Request body
usernamestring"nasa"The X (Twitter) username to fetch the following list for, without the @ prefix (e.g. elonmusk).
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followed accounts.
limitinteger200Per-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.
requireFieldsarrayOptional; 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
dataobject
data.itemsobject[]Followed-account records, normalized to a compact shape. Populated whenever the provider has data for the entity.
data.items[].avatarUrlstringURL of the account's profile image (may be empty). Populated whenever the provider has data for the entity.
data.items[].biocan requirestringThe account's profile bio/description.
data.items[].followerscan requireintegerHow many followers this account has.
data.items[].followingcan requireintegerHow many accounts this account follows.
data.items[].locationcan requirestringThe account's self-reported location (may be empty).
data.items[].namestringThe account's display name. Populated whenever the provider has data for the entity.
data.items[].usernamestringThe account's @ handle, without the @ prefix. Populated whenever the provider has data for the entity.
data.nextCursorcan requirestringOpaque cursor for the next page of followed accounts, or null when there are no more. Pass it back as cursor to continue.
foundboolean
Price
Price per requestUSD$0.0005
Price /1k reqUSD$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.

It costs from $0.50 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet, each call draws it down, and a failed request costs $0.

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. The response is normalized JSON with the same envelope every AnyAPI endpoint returns, so parsing a second endpoint is a change of URL and nothing else.

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. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.