API para X / Twitter: Buscar comunidades
Busque comunidades do X (Twitter) por palavra-chave e receba ID, nome, tema e número de membros, com paginação por cursor. É assim que você encontra a URL de comunidade a passar para twitter.community ou twitter.community_tweets.
Teste
Faça sua primeira requisição
{
"data": {
"communities": [
{
"id": "a1b2c3d4",
"memberCount": 12500,
"name": "Example title",
"nsfw": true,
"topic": "example",
"url": "https://example.com/page"
}
],
"nextCursor": "example"
},
"found": true,
"reason": "not_found"
}interface TwitterSearchCommunitiesResponse {
data: {
communities: {
id: string;
memberCount: number;
name: string;
nsfw: boolean;
topic: string;
url: string;
}[];
nextCursor: string | null;
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 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"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| query | string | "artificial intelligence"Palavra-chave comparada com nomes e temas de comunidades do X (Twitter) (ex.: artificial intelligence). |
| cursor | string | Cursor de paginação opaco vindo do nextCursor da resposta anterior. Omita na primeira página; envie-o para buscar a próxima página de comunidades. |
| Resposta | ||
| 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. |
| 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. |
| Preço | ||
| Preço por requisição (teto) | USD | US$ 0,0011 |
| Preço /mil resultados | USD | US$ 0,11 |
Dúvidas frequentes
Sobre o endpoint Buscar comunidades da API para X / Twitter
O endpoint Buscar comunidades da AnyAPI para X / Twitter retorna dados de X / Twitter em JSON normalizado com uma chamada POST para /v1/run/twitter.search_communities. Busque comunidades do X (Twitter) por palavra-chave e receba ID, nome, tema e número de membros, com paginação por cursor. É assim que você encontra a URL de comunidade a passar para twitter.community ou twitter.community_tweets. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa US$ 0,11 por mil resultados, e nunca mais de US$ 0,0011 por requisição, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Buscar comunidades da API para X / Twitter feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 0,5 segundos, em 29 chamadas medidas.