TwittrAPI
БесплатноЗапускает вложенные скриптыНе проверенRead public X (Twitter) data through the TwittrAPI REST API or its MCP server - user profiles, tweets, replies, followers, search with X operators, lists…
от twittrapi176 установок в других каталогахОб этом скилле
TwittrAPI
TwittrAPI is a pay-per-call REST API for public X (Twitter) data. Read endpoints are GET
requests on https://api.twittrapi.com with path and query parameters. Every successful call is
billed to a prepaid balance; failed calls are refunded or not charged.
Full reference for machines (load on demand, not up front):
| What | URL |
|---|---|
| All docs and every endpoint as one Markdown file | https://twittrapi.com/llms-full.txt |
OpenAPI 3.1 spec (YAML: /openapi.yaml) |
https://twittrapi.com/openapi.json |
| Prices, rate limits, payment methods as JSON | https://twittrapi.com/pricing.json |
| Any docs page as Markdown | page URL + .md, e.g. https://twittrapi.com/docs/reference/search.md |
The most used endpoints are in references/endpoints.md.
1. Choose how to connect
- MCP tools already available (tool names like
get_user_by_username,search_tweets): use them. They handle auth, pagination headers and the simple format. Skip to section 5. - No MCP, but you can run code or curl: call the REST API (sections 2-5).
- The user wants MCP set up:
- Hosted, nothing to install:
https://mcp.twittrapi.com/mcp, with/mcpat the end (Streamable HTTP; OAuth sign-in, orAuthorization: Bearer <key>/X-API-KEYheader). Claude Code:claude mcp add --transport http twittrapi https://mcp.twittrapi.com/mcp. Setup for Claude.ai, ChatGPT, Cursor and VS Code: https://twittrapi.com/docs/hosted-mcp - Local stdio package:
claude mcp add twittrapi --env TWITTRAPI_API_KEY=... -- npx -y twittrapi-mcp
- Hosted, nothing to install:
2. Authentication
- Send the key in the
X-API-KEYheader on every request. Read it from the environment variableTWITTRAPI_API_KEY. Never print it, log it, put it in a URL or commit it. - No key yet: help the user get one (section 2a). Never invent or reuse someone else's key.
- RapidAPI keys also work: same paths on
https://<host>with headersx-rapidapi-key: <key>andx-rapidapi-host: <host>. The host depends on the RapidAPI listing (defaulttwitter-aio.p.rapidapi.com); use the one shown on the user's listing. The SDKs read it fromRAPIDAPI_HOST.
curl -s 'https://api.twittrapi.com/user/by/username/XDevelopers?format=simple' \
-H "X-API-KEY: $TWITTRAPI_API_KEY"
scripts/twittrapi.sh wraps this: scripts/twittrapi.sh /search searchItem='from:XDevelopers' category=Latest.
2a. Setting up an account
Ask the user which way they want; do not start a sign-up on your own.
- They sign up themselves (always works): https://twittrapi.com/start. Small free trial
credit after email confirmation. They copy the key from the dashboard (or create a separate
agent key with its own budget under API keys) and put it in
TWITTRAPI_API_KEY. - You ask, they approve by email (device flow, needs their email address and their OK):
POST https://app.twittrapi.com/api/agent/signupwith JSON{"email": "<their email>", "agent_name": "<your name>", "purpose": "<what the key is for>"}.- Tell them: approve via the email from TwittrAPI, or enter
user_codeatverification_uri. They log in or create the account there and choose a budget. - Poll
POST https://app.twittrapi.com/api/agent/tokenwith form fielddevice_code=<device_code>everyintervalseconds:authorization_pendingkeep polling,slow_downadd 5 s,access_denied/expired_token/invalid_grantstop. A 200 hasapi_key, once: store it where the user says (environment, secret store), never in a committed file. - If the sign-up answers
not_found("not enabled"), use option 1. - The key is limited to the budget they chose and to the read endpoints.
- Connect by MCP instead of a key: for Claude.ai, ChatGPT and other apps with OAuth, add the
connector URL
https://mcp.twittrapi.com/mcp(with/mcpat the end; the bare host gives 404). The app opens a TwittrAPI login and the user clicks Allow access. New users can create the account on that login page.
Full details: https://twittrapi.com/docs/for-agents#getting-a-key
3. Always use the simple format
Add format=simple (or header X-Response-Format: simple) to every read call. You get flat
camelCase JSON with a fixed schema instead of X's deeply nested GraphQL, about 60 % fewer tokens,
same price:
{ "data": [ ... ], "nextCursor": "..." , "previousCursor": "...", "hasNextPage": true }
Single objects come as { "data": { ... } }. Tweets carry id, url, text, createdAt,
author, counts (likes, retweets, replies, quotes, views, bookmarks), media, quoted,
retweetOf, lang. Users carry id, username, name, description, counts (followers,
following, tweets), verified, createdAt. Use the raw format (omit format) only for fields the
simple format leaves out: cards, polls, edit history, community notes.
4. Pagination
- List endpoints take `count
Установить TwittrAPI в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл TwittrAPI?
Read public X (Twitter) data through the TwittrAPI REST API or its MCP server - user profiles, tweets, replies, followers, search with X operators, lists, communities and trends. Use when a task needs tweets, X accounts, follower lists, X search results or trending topics, or when writing code against api.twittrapi.com, or when the user wants a TwittrAPI account, API key or the MCP connector set up. Covers auth (X-API-KEY), the compact simple response format, cursor pagination, errors and retries, and keeping spend inside a budget.
Как установить скилл TwittrAPI?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл TwittrAPI запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic