xdataapi.io

Quickstart

First request in two minutes.

xdataapi.io 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

Sign in at xdataapi.io/dashboard with your email. No password: you get a six-digit code. Create a key there. Every new account 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.xdataapi.io/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.

curl "https://api.xdataapi.io/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

EndpointReturnsCredits
GET /v1/users/{handle}one profile1
GET /v1/users/{user}/tweetslatest tweets of a user1 per tweet
GET /v1/tweets/{id}one tweet1
GET /v1/tweets/{id}/threadthe tweet, its thread and replies1 per tweet
GET /v1/tweets/{id}/repliesdirect replies to a tweet1 per reply
GET /v1/tweets/{id}/quotestweets that quote it1 per tweet
GET /v1/tweets/{id}/retweetersaccounts that retweeted it0.5 per profile
POST /v1/users/batchup to 100 profiles1 per profile
POST /v1/tweets/batchup to 100 tweets1 per tweet
GET /v1/tweets/searchadvanced search1 per tweet, or per profile with product=People
GET /v1/users/{user}/followersfollowers0.1 per profile
GET /v1/users/{user}/followers/idsfollower ids only, no profiles0.02 per id
GET /v1/users/{user}/followingaccounts followed0.1 per profile
GET /v1/meyour balance and rate limit0

{user} accepts a numeric id or a handle. The full contract is in the API reference.

On this page