Pay-per-request X/Twitter data API via x402 — USDC on Base, no API keys needed.
What it does
twit.sh is a payment-gated X/Twitter data API that uses the x402 protocol for per-request micropayments in USDC on Base mainnet. Instead of API keys, OAuth, or subscription plans, each request is settled autonomously: the server returns HTTP 402 with a payment challenge, the caller pays in USDC, and retries with a payment proof header to receive data.
The API covers a broad surface of Twitter/X functionality across multiple resource types. Read-only endpoints include user lookup (by username, ID, or bulk IDs), user search, follower/following lists, tweet lookup (single or bulk), user timelines, tweet search with advanced filters (date ranges, engagement minimums, hashtags, mentions), tweet replies, quote tweets, retweet lists, X Articles (full markdown content), X Lists (details, members, followers, tweets), and X Communities (details, posts, members). Write endpoints require Twitter session credentials (auth_token and ct0 cookies) and support creating/deleting tweets, liking/unliking, retweeting/unretweeting, bookmarking/unbookmarking, and following/unfollowing users.
Pricing ranges from $0.0025 to $0.01 USDC per request depending on the endpoint. Single-entity lookups (tweet by ID, list details, community details) cost $0.0025; user profile lookups cost $0.005; search, pagination, and bulk endpoints cost $0.01; write actions like follow/like/retweet cost $0.0075. All responses use X v2 API-compatible JSON format. The specific endpoint listed here (`/users`) performs bulk user lookup by comma-separated numeric IDs (max 50) at $0.01 per call.
Capabilities
Use cases
- —AI agents autonomously fetching Twitter/X user profiles and tweets without API keys
- —Monitoring specific Twitter accounts or communities for new posts
- —Building social analytics dashboards with follower/following and engagement data
- —Searching the Twitter archive with advanced filters for research or sentiment analysis
- —Programmatically managing a Twitter account (post, like, retweet, follow) via agent automation
Fit
Best for
- —AI agents needing autonomous, keyless access to Twitter/X data
- —Developers who want pay-per-call pricing without X API subscriptions
- —Crypto-native applications that can settle USDC on Base
- —Lightweight integrations that only need occasional Twitter lookups
Not for
- —High-volume bulk scraping where per-call costs would accumulate quickly
- —Applications requiring official Twitter OAuth user authorization flows
- —Use cases needing real-time streaming (e.g., Twitter firehose)
Quick start
# Look up a Twitter user by username (x402 payment handled by client)
curl -X GET "https://x402.twit.sh/users/by/username?username=elonmusk" \
-H "X-PAYMENT: <x402_payment_proof>"Example
Request
{
"url": "https://x402.twit.sh/users?ids=9253672,44196397",
"method": "GET",
"headers": {
"X-PAYMENT": "<x402_payment_proof>"
}
}Endpoint
Quality
Full OpenAPI 3.1 schema with 25+ endpoints, clear pricing in human-readable USDC amounts, live 402 challenge confirmed, and a well-structured landing page. Response schemas are mostly absent (only write endpoints have them), and no example response bodies are provided, which prevents a higher score.
Warnings
- —Write endpoints (create tweet, like, follow, etc.) require raw Twitter session cookies (auth_token, ct0) passed as query parameters — this raises security concerns and may violate Twitter/X Terms of Service.
- —No response schemas documented for read-only endpoints; response format is described only as 'X v2 API-compatible JSON'.
- —The /docs, /pricing, and /api paths all return 404, so there is no additional documentation beyond the landing page and OpenAPI spec.
Citations
- —Payment-gated Twitter/X user and tweet lookup API, pay per request in USDC on Base via x402https://x402.twit.sh
- —Pricing ranges from $0.0025 to $0.01 USDC per callhttps://x402.twit.sh
- —The /users endpoint performs bulk lookup of up to 50 user IDs at $0.01 per requesthttps://x402.twit.sh
- —Data returned is sourced from the open web and shaped into X v2-compatible JSONhttps://x402.twit.sh
- —Write endpoints require Twitter auth_token and ct0 cookie valueshttps://x402.twit.sh
- —Available as CLI skill via npx twitsh, compatible with Claude Code, Cursor, and other AI agentshttps://x402.twit.sh