Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

Twitter Search communities

API 文件
https://api.sandbase.ai/v1/api/twitter/web/search-communities

Search communities on Twitter. Returns the platform data as structured JSON.

價格
$0.001美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 1 個選填

Playground

輸入
Search Keyword
Cursor
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

Twitter Search communities API

Returns a list of Twitter communities that match a search keyword. Each result includes the community name, ID, primary topic, member count and banner images. The only required input is keyword.

Use cases

  • Find communities about a topic or franchise, such as superman, to join or study.
  • Rank communities on a topic by member_count to see which ones are largest.
  • Collect community IDs to feed into community info, member or timeline lookups.
  • Filter out adult communities with the is_nsfw flag before showing results in an app.

Request

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

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

Parameters

NameTypeRequiredDescription
keywordstringYesSearch Keyword
cursorstringNoCursor

Example response

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

{
  "communities": [
    {
      "community_id": "1589365710655979520",
      "custom_banner": "https://pbs.twimg.com/community_banner_img/2107751704808579073/T11UFoyj?format=j…",
      "default_banner": "https://pbs.twimg.com/media/FECQfL3UcAc3IfU.jpg",
      "is_nsfw": false,
      "member_count": 111548,
      "name": "DC",
      "primary_topic": "Comics",
      "user_id": ""
    }
  ],
  "next_cursor": "WzgwLjQwNzEzLDE5NDM5Mjk1MzU4ODU3MjIwMTBd"
}

Response fields

FieldMeaning
communities[]List of communities that match the keyword.
communities[].community_idID of the community as a numeric string. Use it to look up the community in other APIs.
communities[].nameDisplay name of the community.
communities[].member_countNumber of members in the community.
communities[].primary_topicMain topic label of the community, such as Comics or Movies.
communities[].is_nsfwtrue if the community is marked as adult content, false otherwise.
communities[].custom_banner / communities[].default_bannerBanner image URLs. custom_banner is the image the community set, and default_banner is a stock image.
communities[].user_idUser ID field. It was an empty string in the sample response.
next_cursorCursor string for the next page of results.

Notes

  • Pass next_cursor from the response as cursor in the next request to get more results.
  • community_id is a numeric string. Pass it to Twitter Community info for details about one community.
  • Use Twitter Community timeline to read the posts of a community you found.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相關 APIs

所有 APIs
API價格回應
X (Twitter)每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON
Twitter每次呼叫 $0.001JSON

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

問題

常見問題

我要如何使用 Twitter Search communities API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/twitter/web/search-communities。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

Twitter Search communities API 的費用是多少?

每次 $0.001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

Twitter Search communities API 接受哪些參數?

必要:keyword (string)。 選填:cursor (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

Twitter Search communities API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 X (Twitter) 開發者帳號或 API 金鑰嗎?

不需要。Twitter Search communities 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 X (Twitter) API 存取權。