Skip to content
OSINTtools.io

xdataapi.io API

Read-only third-party API for public X data: profiles, posts, threads, replies, followers and search, paid in credits per item returned.

Base URL
https://api.xdataapi.io/v1
Sign-in
API key
Free tier
Free trial
Pricing
Credits
Format
REST
Endpoints
6

Compiled by OSINTtools.io editors from xdataapi.io · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

xdataapi.io returns public X (Twitter) data as JSON: profiles by handle or user ID, a user's tweets, single tweets with their threads, replies and quotes, followers and search results. An investigator uses it to read an account's profile and posts and to map who follows or replies to it.

Calls are GET requests under https://api.xdataapi.io/v1 with the key in the x-api-key header. Billing is in credits per tweet or profile returned; empty results and failed requests are not charged. New accounts get free credits.

The batch POST endpoints are not described here because the docs do not state their request body. Rate limit values, the error format and the full tweet and profile schemas are not given in the docs.

Quick start

  1. Get a key

    Create an account with xdataapi.io and copy your api key (free trial). Where to get it

  2. Make your first request

    Profile of an X account by handle.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://api.xdataapi.io/v1/users/example_user' \
      -H 'x-api-key: YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    {
      "data": {
        "id": "1000001",
        "handle": "example_user",
        "name": "Example User",
        "followers": 1200,
        "created_at": "2015-04-01T12:00:00Z"
      },
      "credits_charged": 1,
      "balance_remaining": 999,
      "request_id": "req_example123"
    }

Authentication

Send your API key in the x-api-key header of every request.

Keys start with xd_live_. Sign in with your email and a six-digit code, then create a key.

Get a key from xdataapi.io

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Not stated in the docs

Free trial. Pricing: credits.

Profiles

Returns the account's public profile. Every response also carries the credits charged and the remaining balance.

Path parameters

handlestringrequiredtakes your username

The account handle

Example: example_user
Response fields · 8Show

idstring

Numeric user ID

handlestring

Account handle

namestring

Display name

followersinteger

Follower count

created_atstring

When the account was created

credits_chargednumber

Credits used by this call

balance_remainingnumber

Credits left

request_idstring

Identifier to quote when reporting a problem

curl 'https://api.xdataapi.io/v1/users/example_user' \
  -H 'x-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "data": {
    "id": "1000001",
    "handle": "example_user",
    "name": "Example User",
    "followers": 1200,
    "created_at": "2015-04-01T12:00:00Z"
  },
  "credits_charged": 1,
  "balance_remaining": 999,
  "request_id": "req_example123"
}

Same profile data as the handle lookup, for when only the numeric ID is known.

Path parameters

idstringrequiredtakes your username

Numeric user ID

Example: 1000001
Response fields · 4Show

idstring

Numeric user ID

handlestring

Account handle

namestring

Display name

credits_chargednumber

Credits used by this call

curl 'https://api.xdataapi.io/v1/users/id/1000001' \
  -H 'x-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "data": {
    "id": "1000001",
    "handle": "example_user",
    "name": "Example User"
  },
  "credits_charged": 1,
  "balance_remaining": 998
}

Tweets

A user's latest tweets.

GET/users/{user}/tweets

  • Takes: Username
  • Passive: the target is not contacted
  • Cost: 1 credit per tweet

{user} accepts a numeric user ID or a handle. Results are returned in items.

Path parameters

userstringrequiredtakes your username

Handle or numeric user ID

Example: example_user
Response fields · 3Show

items[]object

Tweets, newest first

credits_chargednumber

Credits used by this call

balance_remainingnumber

Credits left

curl 'https://api.xdataapi.io/v1/users/example_user/tweets' \
  -H 'x-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "items": [
    {
      "id": "2000001",
      "text": "Example post"
    }
  ],
  "credits_charged": 1,
  "balance_remaining": 997
}

A single tweet by ID.

GET/tweets/{id}

  • Passive: the target is not contacted
  • Cost: 1 credit

Related endpoints under /tweets/{id}: /thread (tweet, thread and replies), /replies, /quotes and /retweeters.

Path parameters

idstringrequired

Tweet ID

Example: 2000001
Response fields · 2Show

dataobject

The tweet

credits_chargednumber

Credits used by this call

curl 'https://api.xdataapi.io/v1/tweets/2000001' \
  -H 'x-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "data": {
    "id": "2000001",
    "text": "Example post"
  },
  "credits_charged": 1,
  "balance_remaining": 996
}

Social graph

Accounts that follow a user.

GET/users/{user}/followers

  • Takes: Username
  • Passive: the target is not contacted
  • Cost: 0.1 credit per profile

/users/{user}/following lists accounts the user follows, and /users/{user}/followers/ids returns follower IDs only (0.02 credit per ID).

Path parameters

userstringrequiredtakes your username

Handle or numeric user ID

Example: example_user
Response fields · 2Show

items[]object

Follower profiles

credits_chargednumber

Credits used by this call

curl 'https://api.xdataapi.io/v1/users/example_user/followers' \
  -H 'x-api-key: YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "items": [
    {
      "id": "1000002",
      "handle": "example_follower",
      "name": "Example Follower"
    }
  ],
  "credits_charged": 0.1,
  "balance_remaining": 994.9
}