Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

X / Twitter Community Search

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

Harga
Dari $0.0011USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 1 opsional

Playground

Input
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.
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

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

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
X (Twitter)Dari $0.0011 per panggilanJSON
X (Twitter)Dari $0.00054 per panggilanJSON
TwitterDari $0.0006 per panggilanJSON Asinkron
X (Twitter)Dari $0.0001 per panggilanJSON
X (Twitter)Dari $0.0036 per panggilanJSON
X (Twitter)Dari $0.00045 per panggilanJSON

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

Pertanyaan

FAQ

Bagaimana cara menggunakan API X / Twitter Community Search?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/twitter/search-communities dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API X / Twitter Community Search?

Mulai dari $0.0011 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API X / Twitter Community Search?

Wajib: query (string). Opsional: cursor (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API X / Twitter Community Search?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API X (Twitter)?

Tidak. X / Twitter Community Search berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API X (Twitter) secara terpisah.