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

X / Twitter Following

API 文件
https://api.sandbase.ai/v1/api/twitter/following

List the accounts a public X (Twitter) account follows by username with cursor pagination. Limit is a per-page maximum; follow the response's nextCursor for more.

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

Playground

輸入
The X (Twitter) username to fetch the following list for, without the @ prefix (e.g. elonmusk).
Accepted but does not change the page: every call returns one full native page of followed accounts (about 50), never trimmed, so follow nextCursor to continue exactly where this response ended. 範圍:1 到 100000。
Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followed accounts.
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `location`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a profile that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge. On a paginated walk it applies to the first page only; later pages stay with the source that page chose, at the price it was quoted.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

X / Twitter Following API

Returns the accounts that a public X (Twitter) account follows, one page at a time. You pass the account username without the @ prefix. Each item has the followed account's profile basics and follower counts.

Use cases

  • Map which accounts a brand or agency account follows to see its peers and partners.
  • Build a list of followed accounts to check who a public figure pays attention to.
  • Collect the id values of followed accounts and look up their full profiles or posts.
  • Compare the following lists of two accounts to find shared interests.

Request

curl -X POST "https://api.sandbase.ai/v1/api/twitter/following" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit": 200, "username": "nasa"}'

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

Parameters

NameTypeRequiredDescription
usernamestringYesThe X (Twitter) username to fetch the following list for, without the @ prefix (e.g. elonmusk).
cursorstringNoOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; pass it to fetch the next page of followed accounts.
limitintegerNoAccepted but does not change the page: every call returns one full native page of followed accounts (about 50), never trimmed, so follow nextCursor to continue exactly where this response ended.
requireFieldsarrayNoOptional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example location, and it is served only by a source that returns every one o

Example response

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

{
  "data": {
    "items": [
      {
        "avatarUrl": "https://pbs.twimg.com/profile_images/3468011581/efb985f24af0a814a722457a768f3cc5…",
        "bio": "The official X account for the NASA Hubble Space Telescope, managed and operated…",
        "createdUtc": 1204834502,
        "followers": 8894641,
        "following": 44,
        "id": "14091091",
        "name": "Hubble",
        "posts": 8503,
        "username": "NASAHubble"
      }
    ],
    "nextCursor": "cur_W0kxlUWcLC2JYpqfMFBqDw"
  },
  "found": true
}

Response fields

FieldMeaning
data.items[].username / data.items[].nameThe handle and display name of the followed account.
data.items[].idThe numeric ID of the followed account, returned as a string.
data.items[].bioThe profile bio text. Some accounts have no bio, and the key is then missing.
data.items[].followers / data.items[].followingHow many accounts follow the followed account, and how many accounts it follows.
data.items[].postsThe post count of the followed account.
data.items[].createdUtcWhen the followed account was created, as a Unix timestamp in seconds (UTC).
data.items[].avatarUrlThe URL of the profile image of the followed account.
data.nextCursorCursor for the next page. Pass it as cursor in the next request.
foundtrue when the account was found.

Notes

  • Use the handle without the @ prefix, for example nasa.
  • limit does not change the page size. Each call returns one full page of about 50 accounts, so follow nextCursor to continue.
  • For the first page, omit cursor. For later pages, pass the nextCursor value from the previous response unchanged.
  • To list the accounts that follow this account instead, call X / Twitter Followers.

Pricing

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

探索更多

相關 APIs

所有 APIs
API價格回應
X (Twitter)每次呼叫 $0.00045 起JSON
X (Twitter)每次呼叫 $0.00054 起JSON
Twitter每次呼叫 $0.0006 起非同步 JSON
X (Twitter)每次呼叫 $0.0001 起JSON
X (Twitter)每次呼叫 $0.0036 起JSON
X (Twitter)每次呼叫 $0.00045 起JSON

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

問題

常見問題

我要如何使用 X / Twitter Following API?

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

X / Twitter Following API 的費用是多少?

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

X / Twitter Following API 接受哪些參數?

必要:username (string)。 選填:limit (integer), cursor (string) 和 requireFields (array)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

X / Twitter Following API 會回傳什麼?

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

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

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