xdataapi: X (Twitter) data

io.xdataapi由 xdataapi.io 發布官方發布者v0.3.2更新於 Oct 28, 2026

Read-only public X (Twitter) data: profiles, tweets, threads, followers, search. Pay per result.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取資料與分析

概覽

AI 產生的概覽

託管式 MCP 伺服器,提供唯讀的 X(Twitter)公開資料:使用者資料、推文、討論串、追蹤關係與搜尋,依回傳結果以預付額度計費。

可以做什麼
  • 依帳號名稱查詢單一使用者資料,或一次查詢最多 100 位使用者
  • 讀取使用者的最新推文、粉絲、追蹤名單與粉絲數字 ID
  • 依 ID 取得單一或批次推文,以及討論串、回覆、引用推文與轉推者
  • 使用 x.com 運算子執行 X 進階搜尋
  • 查詢該金鑰的剩餘額度與速率限制
適用情境
當助理需要取得 X 上的最新公開資料時適用,例如調查帳號、透過搜尋追蹤某個主題,或抓取一段對話串,而不必自行建置 X API 整合。它為唯讀,適合分析與研究,不適合發文或互動經營。
執行需求
遠端 MCP 端點,使用 Streamable HTTP,不需本機執行環境。首次使用時以 OAuth 登入;不支援 OAuth 的用戶端改用 x-api-key 標頭;僅支援 stdio 的用戶端可用 mcp-remote 橋接。需要預付額度餘額,因為每回傳一則推文或一份資料都會扣費。
安裝前請注意
每回傳一則推文或一份資料都會消耗額度,大範圍搜尋或大量粉絲分頁可能很快用完餘額,建議先查餘額並限制結果數量。粉絲、追蹤、轉推者以及 Top 搜尋等介面可能因帳號等級回傳 403,此類請求免費。請求會送往與 X Corp. 無關聯的第三方服務;僅涉及公開資料,且沒有寫入介面。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 xdataapi: X (Twitter) data,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.xdataapi%2Fxdataapi/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "xdataapi-x-twitter-data": {
      "type": "http",
      "url": "https://api.xdataapi.io/mcp"
    }
  }
}

README

xdataapi

Read-only public X (Twitter) data for developers and AI agents. Profiles, tweets, timelines, threads, followers, and search with the x.com operators. One credit per tweet or profile returned. Empty results and errors are free.

Not affiliated with X Corp. Public data only. No write endpoints.

MCP

Claude Code, as a plugin — the server plus a skill that teaches the search operators and the cost rules:

bash
claude plugin marketplace add xdataapi/xdataapiclaude plugin install xdataapi@xdataapi

Or the server on its own, in any MCP client:

bash
claude mcp add --transport http xdataapi https://api.xdataapi.io/mcp

The server signs you in with OAuth on first use. Clients without OAuth pass a key instead:

json
{  "mcpServers": {    "xdataapi": {      "url": "https://api.xdataapi.io/mcp",      "headers": { "x-api-key": "xd_live_..." }    }  }}

Stdio-only clients can bridge with mcp-remote:

json
{  "mcpServers": {    "xdataapi": {      "command": "npx",      "args": ["-y", "mcp-remote", "https://api.xdataapi.io/mcp", "--header", "x-api-key:${XDATAAPI_KEY}"],      "env": { "XDATAAPI_KEY": "xd_live_..." }    }  }}

Tools: get_user, get_users, get_user_tweets, get_followers, get_following, get_follower_ids, search_tweets, get_tweet, get_tweets, get_thread, get_replies, get_quotes, get_retweeters, get_balance. All read-only. Listed on the official MCP Registry as io.xdataapi/xdataapi.

REST

bash
curl "https://api.xdataapi.io/v1/tweets/search?q=from:x%20since:2026-09-01&count=20" \  -H "x-api-key: xd_live_..."

Every response carries credits_charged and balance_remaining. Pages return next_cursor; pass it back as cursor.

SDKs

TypeScript, npm install xdataapi:

ts
import { xdataapi } from 'xdataapi';const api = xdataapi({ apiKey: process.env.XDATAAPI_KEY! });const { data } = await api.searchTweets({ query: { q: 'from:x', count: 20 } });

Python, pip install xdataapi:

python
from xdataapi import AuthenticatedClientfrom xdataapi.api.tweets import search_tweetsclient = AuthenticatedClient(base_url="https://api.xdataapi.io", token=KEY, prefix="", auth_header_name="x-api-key")page = search_tweets.sync(client=client, q="from:x", count=20)

The TypeScript client has no runtime dependencies; npm install xdataapi pulls one package.

Both are generated from openapi.yaml by sdk/generate.sh; the source is in sdk/typescript and sdk/python. Nothing in them is hand-written except the small wrapper in sdk/typescript/src/index.ts and the READMEs, so an API change means regenerating rather than editing.

Framework packages

Installable tools for agent frameworks. Each one carries the credit cost in every tool description, so the model can see what a plan costs before it runs it, and each takes a max_results cap so one agent step cannot empty the balance.

PackageInstallSource
LangChain and LangGraphpip install langchain-xdataapipackages/langchain
LlamaIndexpip install llama-index-tools-xdataapipackages/llama-index
n8ncommunity node n8n-nodes-xdataapipackages/n8n
Claude Codeclaude plugin install xdataapi@xdataapiplugins/xdataapi

For anything else, see examples/: CrewAI, the Vercel AI SDK, and the OpenAI Agents SDK. An agent that speaks MCP needs none of them.

Pricing

Prepaid credit packs from $10. Credits never expire. No per-call minimum. Rate limit rises with lifetime spend. Details: https://xdataapi.io/#pricing

Support

[email protected]. Security reports: https://xdataapi.io/.well-known/security.txt

來源:README.md,提交 31f4716

工具

14

get_user

Profile

Profile of one X user by handle. 1 credit.

輸入參數freshhandle必填

get_users

Profiles, batch

Profiles of up to 100 X users by handle in one call. 1 credit per profile found.

輸入參數freshhandles必填

get_user_tweets

User tweets

Latest tweets of a user, newest first. 1 credit per tweet.

輸入參數user必填countfreshcursor

get_followers

Followers

Followers of a user. 0.1 credit per profile. Not every account tier can read this; a 403 is free.

輸入參數user必填countfreshcursor

get_follower_ids

Follower ids

Numeric ids of the followers of a user, no profiles. 0.02 credit per id. Same page as get_followers, so a page read there is a cache hit here. A 403 is free.

輸入參數user必填countfreshcursor

get_following

Following

Accounts a user follows. 0.1 credit per profile. Not every account tier can read this; a 403 is free.

輸入參數user必填countfreshcursor

search_tweets

Search

X advanced search. q takes the x.com operators. 1 credit per tweet or profile. product Latest is always available; Top may answer 403 (free).

輸入參數q必填countfreshcursorproduct

get_tweet

Tweet

One tweet by numeric id, with its author. 1 credit.

輸入參數id必填fresh

get_tweets

Tweets, batch

Up to 100 tweets by numeric id in one call. 1 credit per tweet found.

輸入參數ids必填fresh

get_thread

Thread

A tweet with its thread and replies; the focal tweet comes first. 1 credit per tweet returned.

輸入參數id必填freshcursor

get_replies

Replies

Direct replies to a tweet, one page. 1 credit per reply.

輸入參數id必填freshcursor

get_quotes

Quotes

Tweets that quote a tweet, newest first. 1 credit per tweet.

輸入參數id必填countfreshcursor

get_retweeters

Retweeters

Accounts that retweeted a tweet. 0.5 credit per profile. Not every account tier can read this; a 403 is free.

輸入參數id必填countfreshcursor

get_balance

Balance

Credits left on this key and its rate limit. Free.

無需輸入參數。

版本歷史

2
  1. v0.3.2最新Sep 21, 2026
  2. v0.3.1Sep 20, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分