querystringwymagane
Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence).
https://api.sandbase.ai/v1/api/twitter/search-communitiesSearch 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.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
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.
nsfw flag before showing results to users.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.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Keyword to match against X (Twitter) community names and topics (e.g. artificial intelligence). |
cursor | string | No | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities. |
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
}
| Field | Meaning |
|---|---|
data.communities[].id | Numeric ID of the community, returned as a string. It is also the last part of the community URL. |
data.communities[].name | Display name of the community. Several communities can share the same name. |
data.communities[].topic | Topic label of the community, such as Artificial Intelligence. |
data.communities[].memberCount | Number of members in the community. |
data.communities[].nsfw | true if the community is marked as adult content, otherwise false. |
data.communities[].url | Full link to the community on x.com. |
data.nextCursor | Cursor value for the next page of results. Pass it as cursor in the next request. |
found | true when the search returned results. |
query and add cursor set to the data.nextCursor value from the previous response.id or url of a result with X (Twitter) Twitter Community or X (Twitter) Twitter Community Tweets.memberCount, so sort them yourself if you need the largest communities first.Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
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"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
querystringwymaganeKeyword to match against X (Twitter) community names and topics (e.g. artificial intelligence).
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of communities.
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
X (Twitter) | Od $0.0011 za wywołanie | JSON |
X (Twitter) | Od $0.00054 za wywołanie | JSON |
Twitter | Od $0.0006 za wywołanie | Asynchroniczny JSON |
X (Twitter) | Od $0.0001 za wywołanie | JSON |
X (Twitter) | Od $0.0036 za wywołanie | JSON |
X (Twitter) | Od $0.00045 za wywołanie | JSON |
Przewodniki:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/twitter/search-communities z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
Od $0.0011 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: query (string). Opcjonalne: cursor (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. X / Twitter Community Search działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API X (Twitter).