# xdataapi.io API reference

> 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…

Source: https://osinttools.io/apis/xdataapi/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/xdataapi/

- Base URL: https://api.xdataapi.io/v1
- Authentication: API key in the `x-api-key` header. Get a key: https://xdataapi.io/dashboard Keys start with xd_live_. Sign in with your email and a six-digit code, then create a key.
- Free tier: a free trial only
- Pricing: Credits
- Rate limits: Not stated in the docs
- Vendor docs: https://xdataapi.io/docs

## Overview

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.

## Profiles

### Profile of an X account by handle.

`GET /users/{handle}`

- Takes: Username
- Footprint: passive (the target is not contacted)
- Cost: 1 credit

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `handle` | path | string | yes | The account handle Example: example_user |

Response fields:

- `data.id` (string): Numeric user ID
- `data.handle` (string): Account handle
- `data.name` (string): Display name
- `data.followers` (integer): Follower count
- `data.created_at` (string): When the account was created
- `credits_charged` (number): Credits used by this call
- `balance_remaining` (number): Credits left
- `request_id` (string): Identifier to quote when reporting a problem

```bash
curl 'https://api.xdataapi.io/v1/users/example_user' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "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"
}
```

### Profile of an X account by numeric user ID.

`GET /users/id/{id}`

- Takes: Username
- Footprint: passive (the target is not contacted)
- Cost: 1 credit

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Numeric user ID Example: 1000001 |

Response fields:

- `data.id` (string): Numeric user ID
- `data.handle` (string): Account handle
- `data.name` (string): Display name
- `credits_charged` (number): Credits used by this call

```bash
curl 'https://api.xdataapi.io/v1/users/id/1000001' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "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
- Footprint: 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.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | Handle or numeric user ID Example: example_user |

Response fields:

- `items[]` (object): Tweets, newest first
- `credits_charged` (number): Credits used by this call
- `balance_remaining` (number): Credits left

```bash
curl 'https://api.xdataapi.io/v1/users/example_user/tweets' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "items": [
    {
      "id": "2000001",
      "text": "Example post"
    }
  ],
  "credits_charged": 1,
  "balance_remaining": 997
}
```

### A single tweet by ID.

`GET /tweets/{id}`

- Footprint: passive (the target is not contacted)
- Cost: 1 credit

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

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes | Tweet ID Example: 2000001 |

Response fields:

- `data` (object): The tweet
- `credits_charged` (number): Credits used by this call

```bash
curl 'https://api.xdataapi.io/v1/tweets/2000001' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "data": {
    "id": "2000001",
    "text": "Example post"
  },
  "credits_charged": 1,
  "balance_remaining": 996
}
```

## Search

### Advanced search with X search-box operators; tweets or people.

`GET /tweets/search`

- Takes: Username, Name
- Footprint: passive (the target is not contacted)
- Cost: 1 credit per tweet, or per profile with product=People

With product=People the results are profiles instead of tweets. Before the first credit pack, the first 100 empty search calls in 24 hours are free.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | yes | Search query using X search operators Example: from:example_user |
| `count` | query | integer | no | Number of results Example: 20 |
| `product` | query | string | no | Set to People to search profiles Example: People |

Response fields:

- `items[]` (object): Matching tweets or profiles
- `credits_charged` (number): Credits used by this call

```bash
curl 'https://api.xdataapi.io/v1/tweets/search?q=from%3Aexample_user' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "items": [
    {
      "id": "2000001",
      "text": "Example post"
    }
  ],
  "credits_charged": 1,
  "balance_remaining": 995
}
```

## Social graph

### Accounts that follow a user.

`GET /users/{user}/followers`

- Takes: Username
- Footprint: 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).

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `user` | path | string | yes | Handle or numeric user ID Example: example_user |

Response fields:

- `items[]` (object): Follower profiles
- `credits_charged` (number): Credits used by this call

```bash
curl 'https://api.xdataapi.io/v1/users/example_user/followers' \
  -H 'x-api-key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "items": [
    {
      "id": "1000002",
      "handle": "example_follower",
      "name": "Example Follower"
    }
  ],
  "credits_charged": 0.1,
  "balance_remaining": 994.9
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
