X / Twitter API

X / Twitter Search users API

Search X (Twitter) accounts by keyword - the People tab of X search. Matches handles, display names, and profile bios, and returns normalized profile records with follower, following, and post counts plus cursor pagination. Use twitter.search for posts.

$0.70/1k req, pay per request, no subscription.

ai agents / X
x.com/search?q=ai%20agents&src=typed_query&f=user

ai agents

TopLatestPeopleMediaLists
M

Marcus Feld | AI Agents

@marcus_builds_ai

Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.

48.2K Followers

Follow
What the API returnedusers[0]
{
"id": "1893004471820193024",
"username": "marcus_builds_ai",
"name": "Marcus Feld | AI Agents",
"profileUrl": "https://x.com/marcus_builds_ai",
"bio": "Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.",
"followers": 48200,
"following": 612,
"posts": 3840,
+7 more fields
}
Uptime
99.41%
30d · 29,398 calls
Requests
29,459
30d · weekly, last 12 wks
Response
1.3s
median · 30d

Pricing and providers

X / Twitter Search users API pricing: one API, 3 interchangeable providers

The cheapest provider serves first. If it fails, the next one takes over in the same call.

You pay
$7.00
$0.70/1k req, only for what you use. No monthly plan.
Your first 142 requests are free with the $0.10 starting balance.

Try it

Get X / Twitter search users in one 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.
{
  "found": true,
  "data": {
    "users": [
      {
        "id": "1893004471820193024",
        "username": "marcus_builds_ai",
        "name": "Marcus Feld | AI Agents",
        "profileUrl": "https://x.com/marcus_builds_ai",
        "bio": "Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.",
        "followers": 48200,
        "following": 612,
        "posts": 3840,
        "verified": true,
        "location": "Austin, TX",
        "avatarUrl": "https://pbs.twimg.com/profile_images/1893004471820193024/marcus_400x400.jpg",
        "createdUtc": 1517443200,
        "coverUrl": "https://pbs.twimg.com/profile_banners/1893004471820193024/1700000000",
        "listedCount": 214,
        "canDm": true
      },
      {
        "id": "1560093221004840960",
        "username": "agentstacknews",
        "name": "Agent Stack",
        "profileUrl": "https://x.com/agentstacknews",
        "bio": "Daily news on AI agents, tool use, and multi-agent frameworks.",
        "followers": 22900,
        "following": 88,
        "posts": 9120,
        "verified": false,
        "location": "",
        "avatarUrl": "https://pbs.twimg.com/profile_images/1560093221004840960/stack_400x400.jpg",
        "createdUtc": 1651363200,
        "listedCount": 61,
        "canDm": false
      },
      {
        "id": "1401882093771280384",
        "username": "priya_agentlabs",
        "name": "Priya Raman",
        "profileUrl": "https://x.com/priya_agentlabs",
        "bio": "Founder @AgentLabsHQ. Previously ML eng at a11y startup. She/her.",
        "followers": 15300,
        "following": 940,
        "posts": 2205,
        "verified": true,
        "location": "San Francisco, CA",
        "avatarUrl": "https://pbs.twimg.com/profile_images/1401882093771280384/priya_400x400.jpg",
        "createdUtc": 1622505600,
        "coverUrl": "https://pbs.twimg.com/profile_banners/1401882093771280384/1690000000",
        "listedCount": 47,
        "canDm": true
      }
    ],
    "nextCursor": "DAABCgABGZ3xw5A2xVIKAAIY__users_page2"
  }
}

Full parameter and response reference - every field, type, and example for this endpoint.

Reference

One request, one response shape.

Every field you send and every field you get back, each with a real example.

Last verified 2026-10-06 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • querystring

    ai agents

    Keyword to match against X (Twitter) handles, display names, and profile bios. This is the People tab of X search: pass a topic ('ai agents'), a name ('Elon Musk'), or a handle ('openai') and get back accounts, not posts. Use twitter.search for posts.

  • cursorstring

    Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of accounts.

  • 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.

You send. A small JSON body. The values shown are examples to replace with your own.

Response

JSON, one example value per field.

  • foundboolean

    true

each userdata.users[]
  • idstring

    1893004471820193024

  • usernamestring

    marcus_builds_ai

  • namestring

    Marcus Feld | AI Agents

  • profileUrlstring

    https://x.com/marcus_builds_ai

  • biostring

    Building autonomous AI agents for support and sales. Ex-Stripe. Writing about agent orchestration weekly.

  • followersnumber

    48200

  • followingnumber

    612

  • postsnumber

    3840

  • verifiedboolean

    true

  • locationstringcan require

    Austin, TX

  • avatarUrlstring

    https://pbs.twimg.com/profile_images/1893004471820193024/marcus_400x400.jpg

  • createdUtcnumber

    1517443200

  • coverUrlstring

    https://pbs.twimg.com/profile_banners/1893004471820193024/1700000000

  • listedCountnumbercan require

    214

  • canDmbooleancan require

    true

datadata
  • nextCursorstring

    DAABCgABGZ3xw5A2xVIKAAIY__users_page2

You get back. Named, typed fields in the same shape whichever source answers.

FAQ

About the X / Twitter Search users API

The AnyAPI X / Twitter Search users API returns X / Twitter search users data as normalized JSON from one POST call to /v1/run/twitter.search_users. Search X (Twitter) accounts by keyword - the People tab of X search. Matches handles, display names, and profile bios, and returns normalized profile records with follower, following, and post counts plus cursor pagination. Use twitter.search for posts. AnyAPI routes each request across 3 sources and falls back automatically when one fails. It costs from $0.70 per 1,000 requests, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 99.4% of X / Twitter search users calls through AnyAPI succeeded, with a median response time of 1.3 seconds across 29,398 measured calls.

It costs from $0.70 per 1,000 requests, in US dollars with no subscription and no monthly minimum. You fund one USD wallet and each call draws it down. Some failed wallet-funded requests incur processing charges that we pass through at cost, with no markup; the error response shows the amount charged.

Search X (Twitter) accounts by keyword - the People tab of X search. Matches handles, display names, and profile bios, and returns normalized profile records with follower, following, and post counts plus cursor pagination. Use twitter.search for posts. 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, 99.4% of X / Twitter search users calls through AnyAPI succeeded, with a median response time of 1.3 seconds across 29,398 measured calls. These are AnyAPI's own measurements of traffic through the gateway, recomputed continuously, not a published service-level target.

Yes. A new AnyAPI account starts with $0.10 of free balance and no card required, which covers 142 X / Twitter Search users calls at $0.0007 each.

AnyAPI asks the next of its 3 sources in the same request, cheapest first, so one source going down does not fail your call.

Send a POST request to https://api.getanyapi.com/v1/run/twitter.search_users with your AnyAPI key in an "Authorization: Bearer" header and the input as a JSON body. The same key and the same wallet work on every AnyAPI endpoint.

No. You add US dollars to one prepaid AnyAPI balance and each request draws it down. There is no monthly plan and no minimum, and the same balance pays for every AnyAPI endpoint.

Yes. Install @getanyapi/sdk from npm for TypeScript or getanyapi from pip for Python. Both call every AnyAPI endpoint with the same key, and any HTTP client works too.

Yes. An agent can connect to the AnyAPI MCP server at https://api.getanyapi.com/mcp, or create its own free-trial key with one unauthenticated POST to https://api.getanyapi.com/agent/signup and call this endpoint over HTTP.