Quickstart
First request in two minutes.
tweetapi.dev is a read-only HTTP API for public X (Twitter) data: profiles, tweets, timelines, threads and search. One credit is one tweet or one profile returned. Empty results and failed requests cost nothing.
1. Get a key
During the private beta, keys are issued by hand. Email hello@tweetapi.dev with one line about what you build. Every key starts with 5,000 free credits.
2. Make a request
Send the key in the x-api-key header. All endpoints are GET.
curl "https://api.tweetapi.dev/v1/users/x" \
-H "x-api-key: xd_live_..."{
"data": {
"id": "783214",
"handle": "X",
"name": "X",
"followers": 60738793,
"created_at": "2007-02-20T14:35:54Z"
},
"items": 1,
"credits_charged": 1,
"balance_remaining": 4999,
"cache": "miss",
"request_id": "3d4f3d1c-..."
}Every response carries items, credits_charged, balance_remaining, cache and request_id.
Keep request_id when you report a problem.
3. Search
curl "https://api.tweetapi.dev/v1/tweets/search?q=from:x%20since:2026-09-01&count=20" \
-H "x-api-key: xd_live_..."q takes the same operators as the search box on x.com. See Search.
Endpoints
| Endpoint | Returns | Credits |
|---|---|---|
GET /v1/users/{handle} | one profile | 1 |
GET /v1/users/{user}/tweets | latest tweets of a user | 1 per tweet |
GET /v1/tweets/{id} | one tweet | 1 |
GET /v1/tweets/{id}/thread | the tweet, its thread and replies | 1 per tweet |
GET /v1/tweets/search | advanced search | 1 per tweet, or per profile with product=People |
GET /v1/users/{user}/followers | followers | 0.1 per profile |
GET /v1/users/{user}/following | accounts followed | 0.1 per profile |
GET /v1/me | your balance and rate limit | 0 |
{user} accepts a numeric id or a handle. The full contract is in the API reference.