Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

X / Twitter Community Search

Docs da API
https://api.sandbase.ai/v1/api/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.

Preço
A partir de $0.0011USD / chamada
Método
POST
Resposta
JSON
Parâmetros
1 obrigatórios · 1 opcionais

Playground

Entrada
Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence).
Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities.
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da API

X / Twitter Community Search API

Returns a list of X (Twitter) communities that match a keyword. Each result has the community id, name, topic, member count, and URL. The only required input is query.

Use cases

  • Find communities about a topic such as artificial intelligence and rank them by member count.
  • Collect community URLs to feed into a community tweet or community info lookup.
  • Build a list of communities in a niche for outreach or research.
  • Filter out adult communities using the nsfw flag before showing results to users.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/search-communities" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "artificial intelligence"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
querystringYesKeyword to match against X (Twitter) community names and topics (e.g. artificial intelligence).
cursorstringNoOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "communities": [
      {
        "id": "1724390935406981529",
        "memberCount": 17280,
        "name": "Artificial Intelligence + Tech",
        "nsfw": false,
        "topic": "Artificial Intelligence",
        "url": "https://x.com/i/communities/1724390935406981529"
      }
    ],
    "nextCursor": "cur_Hri4z2wlX1vEE2iyBu6uog"
  },
  "found": true
}

Response fields

FieldMeaning
data.communities[].idNumeric ID of the community, returned as a string. It is also the last part of the community URL.
data.communities[].nameDisplay name of the community. Several communities can share the same name.
data.communities[].topicTopic label of the community, such as Artificial Intelligence.
data.communities[].memberCountNumber of members in the community.
data.communities[].nsfwtrue if the community is marked as adult content, otherwise false.
data.communities[].urlFull link to the community on x.com.
data.nextCursorCursor value for the next page of results. Pass it as cursor in the next request.
foundtrue when the search returned results.

Notes

  • For the next page, repeat the same query and add cursor set to the data.nextCursor value from the previous response.
  • Use the id or url of a result with X (Twitter) Twitter Community or X (Twitter) Twitter Community Tweets.
  • Results are not sorted by memberCount, so sort them yourself if you need the largest communities first.

Pricing

Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
X (Twitter)A partir de $0.0011 por chamadaJSON
X (Twitter)A partir de $0.00054 por chamadaJSON
TwitterA partir de $0.0006 por chamadaJSON assíncrono
X (Twitter)A partir de $0.0001 por chamadaJSON
X (Twitter)A partir de $0.0036 por chamadaJSON
X (Twitter)A partir de $0.00045 por chamadaJSON

Guias:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Perguntas

FAQ

Como eu uso a API X / Twitter Community Search?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/twitter/search-communities com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.

Quanto custa a API X / Twitter Community Search?

A partir de $0.0011 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API X / Twitter Community Search aceita?

Obrigatórios: query (string). Opcionais: cursor (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API X / Twitter Community Search retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor X (Twitter) ou de uma chave de API?

Não. X / Twitter Community Search funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do X (Twitter) separadamente.