X / Twitter API

X / Twitter Search communities API

Search X (Twitter) communities by keyword and get their id, name, topic, and member count with cursor pagination. This is how you find a community URL to pass to twitter.community or twitter.community_tweets.

$0.11/1k results, pay per request, no subscription.

artificial intelligence / X Communities
x.com/i/communities/search?q=artificial%20intelligence

Search Communities

Results for "artificial intelligence"

A

Artificial Intelligence Builders

184.2K members·Technology

Join
M
D
What the API returnedcommunities[0]
{
"id": "1493446837219098304",
"name": "Artificial Intelligence Builders",
"url": "https://x.com/i/communities/1493446837219098304",
"memberCount": 184200,
"topic": "Technology",
"nsfw": false
}
Uptime
96.52%
30d · 374 calls
Requests
374
30d · weekly, last 12 wks
Response
0.7s
median · 30d

Pricing

X / Twitter Search communities API pricing

You pay
$1.10
$0.11/1k results, only for what you use. No monthly plan.
One request costs at most $0.0011 (10 results).
The $0.10 starting balance covers at least 90 requests.

Try it

Get X / Twitter search communities in one request

Open in
Get a free key
Sample response
Free runs return only the first 3 results. Fund a key to get the full response.

This sample shows 10 of 11 fields. See every field

{
  "found": true,
  "data": {
    "communities": [
      {
        "id": "1493446837219098304",
        "name": "Artificial Intelligence Builders",
        "url": "https://x.com/i/communities/1493446837219098304",
        "memberCount": 184200,
        "topic": "Technology",
        "nsfw": false
      },
      {
        "id": "1592004821338099712",
        "name": "AI Agents & Automation",
        "url": "https://x.com/i/communities/1592004821338099712",
        "memberCount": 96500,
        "topic": "Technology",
        "nsfw": false
      },
      {
        "id": "1601887732290011136",
        "name": "Machine Learning Daily",
        "url": "https://x.com/i/communities/1601887732290011136",
        "memberCount": 52300,
        "topic": "Technology",
        "nsfw": false
      }
    ],
    "nextCursor": "DAABCgABGZ3xw5A2xVIKAAIY__community_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-11-20 · uptime and latency measured over 30d

Request body

JSON, posted to this endpoint.

  • querystring

    artificial intelligence

    Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence).

  • cursorstring

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

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

Response

JSON, one example value per field.

each communitydata.communities[]

Matching X (Twitter) communities. Search returns a summary record; pass url to twitter.community for the full detail, or to twitter.community_tweets for its posts. Populated whenever the provider has data for the entity.

  • idstring

    1493446837219098304

    Community identifier. Populated whenever the provider has data for the entity.

  • memberCountinteger

    184200

    Number of members in the community.

  • namestring

    Artificial Intelligence Builders

    Community name. Populated whenever the provider has data for the entity.

  • nsfwboolean

    false

    Whether the community is flagged as not safe for work.

  • topicstring

    Technology

    The community's primary topic label (may be empty).

  • urlstring

    https://x.com/i/communities/1493446837219098304

    Canonical URL of the community on X. Pass it to twitter.community or twitter.community_tweets. Populated whenever the provider has data for the entity.

datadata

The page of matching communities, or null when nothing was found.

  • nextCursorstring

    DAABCgABGZ3xw5A2xVIKAAIY__community_page2

    Opaque cursor for the next page of communities, or null when this lane has no more. Pass it back as cursor to continue.

top level
  • foundboolean

    true

    True when the search returned at least one community; false when nothing matched.

  • reason"not_found"

    Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost.

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

FAQ

About the X / Twitter Search communities API

The AnyAPI X / Twitter Search communities API returns X / Twitter search communities data as normalized JSON from one POST call to /v1/run/twitter.search_communities. Search X (Twitter) communities by keyword and get their id, name, topic, and member count with cursor pagination. This is how you find a community URL to pass to twitter.community or twitter.community_tweets. AnyAPI returns one normalized schema whichever source serves it. It costs $0.11 per 1,000 results, and never more than $0.0011 for a single request, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 96.5% of X / Twitter search communities calls through AnyAPI succeeded, with a median response time of 0.7 seconds across 374 measured calls.

It costs $0.11 per 1,000 results, and never more than $0.0011 for a single request, 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) communities by keyword and get their id, name, topic, and member count with cursor pagination. This is how you find a community URL to pass to twitter.community or twitter.community_tweets. 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, 96.5% of X / Twitter search communities calls through AnyAPI succeeded, with a median response time of 0.7 seconds across 374 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 at least 90 X / Twitter Search communities calls at up to $0.0011 each.

Send a POST request to https://api.getanyapi.com/v1/run/twitter.search_communities 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.