Agent skill

Twitterapi Io

by kaitoInfra in kaitoInfra/twitterapi-io

Official skill for twitterapi.io — query Twitter/X data (tweets, profiles, followers, advanced search, trends, spaces, communities, lists) and perform authenticated actions (post, reply, like…

MITAuto-check passedBackend & APIs

Install Twitterapi Io

skills CLI
$ npx skills add kaitoInfra/twitterapi-io --skill twitterapi-io -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kaitoInfra/twitterapi-io twitterapi-io --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kaitoInfra/twitterapi-io.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/twitterapi-io .claude/skills/twitterapi-io && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
twitterapi-io
GitHub stars
450
Token cost
~3.1k tokens
SKILL.md length
946 words
Files
4 (incl. references)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Official skill for twitterapi.io — query Twitter/X data (tweets, profiles, followers, advanced search, trends, spaces, communities, lists) and perform authenticated actions (post, reply, like…

  • Works in 3 steps: login_cookies (plural, not login_cookie)… → proxy (HTTP/SOCKS proxy URL — configure… → Action-specific fields, almost always…
  • The user needs to scrape
  • SKILL.md covers When to use this skill, Core facts, ⚠️ Two rules that catch people and Security, plus 4 more sections
  • Calls curl; reaches api.twitterapi.io; needs TWITTERAPI_IO_KEY

What it does

Twitterapi Io is an agent skill from kaitoInfra/twitterapi-io. Official skill for twitterapi.io — query Twitter/X data (tweets, profiles, followers, advanced search, trends, spaces, communities, lists) and perform authenticated actions (post, reply, like, retweet, follow, DM) via the twitterapi.io REST API using a single x-api-key header — no OAuth. Use when the user needs to scrape, analyze, monitor, or automate X/Twitter without going through the official developer portal.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/endpoints.md`, `references/examples.md` and `references/write-operations.md`).

It sits in Backend & APIs, covering Social media posts, Platform engineering and Web scraping. It works with X (Twitter). The licence is MIT.

When your agent uses it

  • The user needs to scrape
  • Automate X/Twitter without going through the official developer portal

Example prompts

  • “/twitterapi-io”

Requirements

  • Python 3
  • A credential in YOUR_KEY
  • A credential in TWITTERAPI_IO_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. login_cookies (plural, not login_cookie) — base64-encoded JSON from /twitter/user_login_v2
  2. proxy (HTTP/SOCKS proxy URL — configure in dashboard)
  3. Action-specific fields, almost always snake_case (tweet_id, user_id)

What it can do on your machine

Read from SKILL.md and the folder at commit 8ded832. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.twitterapi.io

    Also links to:

    • twitterapi.io
    • docs.twitterapi.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • TWITTERAPI_IO_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Twitterapi Io loads about 3.1k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 946 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kaitoInfra/twitterapi-io at commit 8ded832, republished under its MIT licence (© kaitoInfra). 946 words, ~3,070 tokens.

Download SKILL.mdSave it as .claude/skills/twitterapi-io/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
twitterapi-io
description
Official skill for twitterapi.io — query Twitter/X data (tweets, profiles, followers, advanced search, trends, spaces, communities, lists) and perform authenticated actions (post, reply, like, retweet, follow, DM) via the twitterapi.io REST API using a single `x-api-key` header — no OAuth. Use when the user needs to scrape, analyze, monitor, or automate X/Twitter without going through the official developer portal.

twitterapi.io

Official skill maintained by the twitterapi.io team. Paths, parameters, and body fields in this skill are verified against the live backend.

When to use this skill

Trigger when the user wants any of:

  • Fetch tweets, user profiles, followers/following, trends, replies, quote-tweets, retweeters, articles
  • Advanced tweet search (X operators, date ranges, engagement filters)
  • Monitor users or filter rules in near real time
  • Post / delete / like / retweet / bookmark / quote-tweet / reply / follow / DM / schedule tweets
  • Update profile / avatar / banner, upload media
  • Create/join/leave communities, manage lists, report content
  • Anything involving twitterapi.io, api.twitterapi.io, x-api-key, login_cookies, or the X API without OAuth

Core facts

Base URLhttps://api.twitterapi.io
Prefix/twitter/... most endpoints; /oapi/x_user_stream/... and /oapi/tweet_filter/... for real-time monitoring/webhooks; /oapi/my/info for balance
Auth headerx-api-key: YOUR_KEY
Dashboardhttps://twitterapi.io/dashboard
Docshttps://docs.twitterapi.io
Rate limit~200 req/s per client
Pricing~$0.15/1k tweets, ~$0.18/1k profiles, $0.00015 minimum

⚠️ Two rules that catch people

Rule 1 — Parameter naming is per-endpoint

No universal snake_case or camelCase rule. Examples (all correct):

  • /twitter/user/followers?userName= (camel)
  • /twitter/user/verifiedFollowers?user_id= (snake)
  • /twitter/user/articles?username= (all-lowercase)
  • /twitter/tweets?tweet_ids= (snake) but /twitter/tweet/replies?tweetId= (camel)
  • /twitter/list/tweets_timeline?listId= (camel) but /twitter/list/members?list_id= (snake)

Copy the exact parameter name from references/endpoints.md. Don't normalize.

Rule 2 — Writes need three things in body, not two

Every write endpoint requires:

  1. login_cookies (plural, not login_cookie) — base64-encoded JSON from /twitter/user_login_v2
  2. proxy (HTTP/SOCKS proxy URL — configure in dashboard)
  3. Action-specific fields, almost always snake_case (tweet_id, user_id)

Plus key field-name traps:

  • create_tweet_v2 text field is tweet_text (not text); reply field is reply_to_tweet_id (not in_reply_to_tweet_id)
  • update_profile_v2 uses description (not bio)
  • bookmarks_v2 uses count (not pageSize)
  • send_dm_to_user: user_id + text; optional media_id (singular)
  • Monitoring add uses x_user_name; remove uses id_for_user (different fields per endpoint!)

See references/write-operations.md for full body shapes.

Rule 3 — Response shape varies per endpoint
  • data-wrapped: user/info, user_about, last_tweets, tweet_timeline, trends, check_follow_relationship → r["data"]["..."]
  • Flat with envelope: followers, followings, replies, mentions, community/tweets → r["followers"], r["tweets"], etc.
  • Flat without envelope: advanced_search, thread_context, user/search, get_tweets_from_all_community → just {tweets[], has_next_page, next_cursor}
  • Named top-level field: community/info → r["community_info"]; batch_info_by_ids → r["users"]
  • oapi/my/info → {recharge_credits, total_bonus_credits} (no status wrapper)

Prefer defensive access: r.get("tweets", r.get("data", {}).get("tweets", [])).

Security

Never hardcode the API key. Read from env TWITTERAPI_IO_KEY. If missing, ask the user.

Minimal working example

bash
curl -s "https://api.twitterapi.io/twitter/user/info?userName=elonmusk" \
  -H "x-api-key: $TWITTERAPI_IO_KEY"
python
import os, requests

BASE = "https://api.twitterapi.io"
HEADERS = {"x-api-key": os.environ["TWITTERAPI_IO_KEY"]}

r = requests.get(f"{BASE}/twitter/user/info",
                 headers=HEADERS,
                 params={"userName": "elonmusk"},
                 timeout=30)
r.raise_for_status()
d = r.json()["data"]
print(f"{d['userName']} — {d['followers']:,} followers")

Endpoint quick reference

Reads (API key only). Exact param names — copy as shown.

CapabilityMethodPath & key param
User by screen nameGET/twitter/user/info?userName=
Extended bioGET/twitter/user_about?userName=
Batch users by IDsGET/twitter/user/batch_info_by_ids?userIds=
Search usersGET/twitter/user/search?query= (not keyword)
Recent tweetsGET/twitter/user/last_tweets?userName= (or userId=)
Timeline by IDGET/twitter/user/tweet_timeline?userId=
User's articlesGET/twitter/user/articles?username= (all-lowercase)
Mentions of userGET/twitter/user/mentions?userName=
FollowersGET/twitter/user/followers?userName=&pageSize=200
Verified followersGET/twitter/user/verifiedFollowers?user_id= (snake)
FollowingsGET/twitter/user/followings?userName=
Check followGET/twitter/user/check_follow_relationship?source_user_name=&target_user_name=
Tweets by IDsGET/twitter/tweets?tweet_ids= (snake)
Tweet repliesGET/twitter/tweet/replies?tweetId=
Replies (sortable)GET/twitter/tweet/replies/v2?tweetId=&queryType=Latest
Quote tweetsGET/twitter/tweet/quotes?tweetId=
RetweetersGET/twitter/tweet/retweeters?tweetId=
Thread contextGET/twitter/tweet/thread_context?tweetId=
Article contentGET/twitter/article?tweet_id= (snake)
Advanced searchGET/twitter/tweet/advanced_search?query=
Bulk advanced searchPOST/twitter/tweet/bulk_advanced_search body {queries:[{query,queryType?,cursor?}]}
TrendsGET/twitter/trends?woeid=1&count=30
Space detailGET/twitter/spaces/detail?space_id= (snake)
List tweets (with filters)GET/twitter/list/tweets?listId=
List tweets_timelineGET/twitter/list/tweets_timeline?listId=
List members / followersGET/twitter/list/{members,followers}?list_id= (snake)
Community infoGET/twitter/community/info?community_id=
Community tweets/members/modsGET/twitter/community/{tweets,members,moderators}?community_id=
All-community firehoseGET/twitter/community/get_tweets_from_all_community?query= (required!)
Account balanceGET/oapi/my/info

Real-time monitoring (/oapi/x_user_stream/*). Field names differ per endpoint!

CapabilityMethodPath & body
Add monitorPOST/oapi/x_user_stream/add_user_to_monitor_tweet body {x_user_name} ← not user_id
List monitorsGET/oapi/x_user_stream/get_user_to_monitor_tweet (+ query_type 0/1/2)
Remove monitorPOST/oapi/x_user_stream/remove_user_to_monitor_tweet body {id_for_user} ← different field from add

Webhook filter rules (/oapi/tweet_filter/*):

CapabilityMethodPath & body
Add rulePOST/oapi/tweet_filter/add_rule body {tag, value, interval_seconds?=60} (range 0.05–86400)
List rulesGET/oapi/tweet_filter/get_rules
Update rulePOST/oapi/tweet_filter/update_rule body {rule_id, tag, value, interval_seconds?, is_effect?}
Delete ruleDELETE/oapi/tweet_filter/delete_rule body {rule_id} (body JSON, not query)
Show full SKILL.md (366 more words)Show less

Writes — require login_cookies + proxy in body. login_cookies is base64(json(cookie_dict)) from /twitter/user_login_v2.

CapabilityMethodPathKey body fields (beyond login_cookies+proxy)
Log in → cookiesPOST/twitter/user_login_v2{user_name, email, password, totp_secret?, proxy}
Create tweetPOST/twitter/create_tweet_v2tweet_text (req); optional reply_to_tweet_id, quote_tweet_id, community_id, media_ids[], schedule_for
DeletePOST/twitter/delete_tweet_v2tweet_id
Like / UnlikePOST/twitter/{like,unlike}_tweet_v2tweet_id
RetweetPOST/twitter/retweet_tweet_v2tweet_id
Bookmark / UnbookmarkPOST/twitter/{bookmark,unbookmark}_tweet_v2tweet_id
List bookmarksPOST/twitter/bookmarks_v2optional count (def 20, not pageSize), cursor
Follow / UnfollowPOST/twitter/{follow,unfollow}_user_v2user_id
Send DMPOST/twitter/send_dm_to_useruser_id, text, optional media_id (singular), reply_to_message_id
ReportPOST/twitter/report_v2(tweet_id OR user_id), reason (enum, see endpoints.md)
Upload mediaPOST/twitter/upload_media_v2multipart: file, optional media_category, is_long_video
Update profilePATCH/twitter/update_profile_v2JSON: at least one of name, description (not bio!), location, url
Update avatar/bannerPATCH/twitter/update_{avatar,banner}_v2multipart: file
Create communityPOST/twitter/create_community_v2name, description (both required)
Join / Leave communityPOST/twitter/{join,leave}_community_v2community_id
Delete communityPOST/twitter/delete_community_v2community_id, community_name (both required)
Add list memberPOST/twitter/list/add_member_v2list_id, user_id

For exact param lists, response shapes, and edge cases see references/endpoints.md.

Recurring patterns

Cursor pagination — use has_next_page
python
def iter_followers(user_name):
    cursor = ""
    while True:
        r = requests.get(f"{BASE}/twitter/user/followers",
                         headers=HEADERS,
                         params={"userName": user_name, "cursor": cursor, "pageSize": 200},
                         timeout=30).json()
        yield from r.get("followers", [])
        if not r.get("has_next_page"):
            break
        cursor = r.get("next_cursor") or ""
Error handling
python
# FastAPI-style 4xx/5xx
{ "detail": "tweet_id is required" }
{ "detail": [{"type":"missing","loc":["body","file"]}] }  # 422 on multipart

# Semantic 200 errors
{ "status": "error", "msg": "No active monitoring subscription" }
  • 401 → bad x-api-key or expired login_cookies
  • 402 → top up balance at dashboard
  • 429 → rate-limited; exponential backoff
  • 400/422 → read detail — it names the missing/wrong field
  • 500 → transient; retry with jitter. If repeated, the param name is wrong
Cost awareness

Before a loop that could paginate for a long time (followers of a mega-account, years of advanced search), estimate cost up front and confirm with the user if it could exceed a few dollars. A 100M-follower crawl is $15k+ at $0.15/1k.

Anti-patterns

  • Do not assume a universal param-casing rule — check endpoints.md
  • Do not use login_cookie (singular) — it's login_cookies plural
  • Do not forget proxy in write bodies — every write requires it
  • Do not send text for create_tweet_v2 — use tweet_text
  • Do not use bio in update_profile_v2 — use description
  • Do not use in_reply_to_tweet_id for create_tweet_v2 — it's reply_to_tweet_id
  • Do not send JSON to upload_media_v2 / update_avatar_v2 / update_banner_v2 — they're multipart/form-data
  • Do not use pageSize for bookmarks_v2 — it's count
  • Do not send user_id to monitoring add — it's x_user_name; remove uses id_for_user
  • Do not log or commit API keys, login_cookies, proxies, or totp_secret
  • Do not use developer.twitter.com / official X OAuth — this API replaces them
  • Do not poll /user/last_tweets for "real-time" — use /oapi/tweet_filter/add_rule + webhook

© kaitoInfra, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/twitterapi-io of kaitoInfra/twitterapi-io.

  • SKILL.md
  • references/endpoints.md
  • references/examples.md
  • references/write-operations.md

Open the folder on GitHubat commit 8ded832

Compare with similar skills

Twitterapi Io next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Twitterapi Io compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Twitterapi Io this skillkaitoInfra/twitterapi-io450—~3.1kAutomated safety check: PassMIT
Xquik MCPXquik-dev/x-twitter-scraper2101 repos~997Automated safety check: PassMIT
X Twitter Scrapersickn33/agentic-awesome-skills47k1 repos~2.1kAutomated safety check: PassMIT
X Twitter Scrapergithub/awesome-copilot40k—~2.2kAutomated safety check: PassMIT
X Twitter Scraperdavila7/claude-code-templates32k—~1.8kAutomated safety check: PassMIT
X Twitter Scraperdavepoon/buildwithclaude3.6k—~2.2kAutomated safety check: PassMIT

Similar skills

  • Xquik MCP

    Xquik-dev/x-twitter-scraper

    Connect, verify, and troubleshoot Xquik's remote MCP server.

    210 GitHub starsUsed in 1 repo~997 tokens
    Backend & APIsAuto-check passed
  • X Twitter Scraper

    sickn33/agentic-awesome-skills

    Use Xquik for X data workflows: tweet search, user lookup, follower export, media downloads, monitors, webhooks, REST API, MCP, SDK setup, and approval-gated account actions.

    47k GitHub starsUsed in 1 repo~2.1k tokens
    Backend & APIsAuto-check passed
  • X Twitter Scraper

    github/awesome-copilot

    Official

    Build GitHub Copilot workflows with Xquik X API SDKs, REST endpoints, hosted Apify Actor runs, MCP tools, TweetClaw OpenClaw plugin installs, signed webhooks, tweet search, user lookup, follower…

    40k GitHub stars~2.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • X Twitter Scraper

    davila7/claude-code-templates

    X API & Twitter scraper skill for AI coding agents. An agent skill from davila7/claude-code-templates.

    32k GitHub stars~1.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • X Twitter Scraper

    davepoon/buildwithclaude

    X (Twitter) data extraction and monitoring via Xquik: tweet search, user lookup, follower extraction, giveaway draws, trending topics, account monitoring with webhooks, reply/retweet/quote…

    3.6k GitHub stars~2.2k tokensUpdated today
    Backend & APIsAuto-check passed
  • Xtwitter Scraper

    managedcode/dotnet-skills

    Use XTwitterScraper when a .NET application needs typed access to Xquik's X automation REST API for tweet search, user lookup, posting workflows, extraction jobs, monitors, webhooks, or giveaway…

    486 GitHub stars~1.5k tokensUpdated today
    Backend & APIsAuto-check passed

Works with

Categories

Questions about Twitterapi Io

What does Twitterapi Io do?

Official skill for twitterapi.io — query Twitter/X data (tweets, profiles, followers, advanced search, trends, spaces, communities, lists) and perform authenticated actions (post, reply, like…. Twitterapi Io is an agent skill from kaitoInfra/twitterapi-io.io REST API using a single x-api-key header — no OAuth.

When should I use Twitterapi Io?

Twitterapi Io fits situations like: the user needs to scrape; automate X/Twitter without going through the official developer portal.

How do I install Twitterapi Io in Claude Code?

Run `npx skills add kaitoInfra/twitterapi-io --skill twitterapi-io -a claude-code`. Or copy the skill folder (skills/twitterapi-io in kaitoInfra/twitterapi-io) into .claude/skills/twitterapi-io in your project. Claude Code loads it when a task matches its description.

How do I install Twitterapi Io in Codex?

Run `npx skills add kaitoInfra/twitterapi-io --skill twitterapi-io -a codex`. Or copy the skill folder (skills/twitterapi-io in kaitoInfra/twitterapi-io) into .agents/skills/twitterapi-io in your project. Codex loads it when a task matches its description.

Can I use Twitterapi Io in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kaitoInfra/twitterapi-io --skill twitterapi-io -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/twitterapi-io, .gemini/skills/twitterapi-io, .github/skills/twitterapi-io and .opencode/skills/twitterapi-io in your project.

What does Twitterapi Io need to run?

Going by SKILL.md and its folder, Twitterapi Io needs the command-line tools its instructions call (curl) and credentials named TWITTERAPI_IO_KEY. Our summary lists: Python 3; A credential in YOUR_KEY; A credential in TWITTERAPI_IO_KEY.

Does Twitterapi Io access the network?

SKILL.md names 3 domains. In commands or code: api.twitterapi.io; the agent is likely to contact it when it follows the instructions. As links in the text: twitterapi.io and docs.twitterapi.io. This is read from the text; nothing was executed.

Is Twitterapi Io safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Twitterapi Io use?

Twitterapi Io is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Twitterapi Io use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.4k tokens, read only when the agent opens those files.

What are the alternatives to Twitterapi Io?

Skills that share tags, products or a category with Twitterapi Io: Xquik MCP (Xquik-dev/x-twitter-scraper, 210 stars), X Twitter Scraper (sickn33/agentic-awesome-skills, 47k stars), X Twitter Scraper (github/awesome-copilot, 40k stars) and X Twitter Scraper (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Twitterapi Io?

kaitoInfra (a GitHub user) maintains it in kaitoInfra/twitterapi-io, which has 450 GitHub stars. The repository was last updated on May 28, 2026.

Source: kaitoInfra/twitterapi-io on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.