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.
- Category SocialRequests / mo 1Routing 1 lane · no failover
Pricing
One price, in dollars
pay per request · no subscription · fallbacks added as the catalog growsTry it
Make your first request
run it free, no key · same shape for every API{
"data": {
"communities": [
{
"id": "a1b2c3d4",
"memberCount": 12500,
"name": "Example title",
"nsfw": true,
"topic": "example",
"url": "https://example.com/page"
}
],
"nextCursor": "example"
},
"found": true
}interface TwitterSearchCommunitiesResponse {
data: {
communities: {
id: string;
memberCount: number;
name: string;
nsfw: boolean;
topic: string;
url: 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-08-23 · uptime and latency measured over 30dcurl -X POST https://api.getanyapi.com/v1/run/twitter.search_communities \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"artificial intelligence"}'| Field | Type | Example value |
|---|---|---|
| Request body | ||
| query | string | "artificial intelligence"Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence). |
| cursor | string | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities. |
| Response | ||
| data | object | The page of matching communities, or null when nothing was found. |
| data.communities | object[] | 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. |
| data.communities[].id | string | Community identifier. Populated whenever the provider has data for the entity. |
| data.communities[].memberCount | integer | Number of members in the community. |
| data.communities[].name | string | Community name. Populated whenever the provider has data for the entity. |
| data.communities[].nsfw | boolean | Whether the community is flagged as not safe for work. |
| data.communities[].topic | string | The community's primary topic label (may be empty). |
| data.communities[].url | string | 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. |
| data.nextCursor | string | Opaque cursor for the next page of communities, or null when this lane has no more. Pass it back as cursor to continue. |
| found | boolean | True when the search returned at least one community; false when nothing matched. |
| Price | ||
| Price per request (ceiling) | USD | $0.00198 |
| Price /1k results | USD | $0.198 |
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.20 per 1,000 results, and never more than $0.00198 for a single request, in US dollars with no subscription and no monthly minimum. Over the last 30 days, 100.0% of X / Twitter search communities calls through AnyAPI succeeded, with a median response time of 0.5 seconds across 1 measured calls.
More to call
Other X / Twitter endpoints
Get started
Two ways to start on AnyAPI
Humans fund a USD wallet and pay per request. Agents point a coding agent at one URL and onboard themselves.