# TweetAPI MCP API reference

> TweetAPI returns public X (Twitter) data as JSON: user profiles, tweets and their conversations, and search. The listing is its hosted MCP server, which wraps the same read endpoints; this reference covers the plain HTTP API behind it, from the TweetAPI docs. Calls are GET requests under…

Source: https://osinttools.io/apis/tweetapi-mcp/ (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/tweetapi-mcp/

- Base URL: https://api.tweetapi.com/tw-v2
- Authentication: API key in the `X-API-Key` header. Get a key: https://tweetapi.com
- Rate limits: Per-minute limit per key; the value is returned by /account/usage (rateLimit.requestsPerMinute)
- Vendor docs: https://tweetapi.com/docs/getting-started/agents
- Node SDK: tweetapi-node, https://www.npmjs.com/package/tweetapi-node
- Python SDK: tweetapi, https://pypi.org/project/tweetapi/

## Overview

TweetAPI returns public X (Twitter) data as JSON: user profiles, tweets and their conversations, and search. The listing is its hosted MCP server, which wraps the same read endpoints; this reference covers the plain HTTP API behind it, from the TweetAPI docs.

Calls are GET requests under `https://api.tweetapi.com/tw-v2` with the key in the `X-API-Key` header. Each billable call costs API units; the usage endpoint is free and only counts against the rate limit. The docs say calls should run server-side.

Only three endpoints are described here; the docs list many more (followers, lists, communities, trends, and write actions).

## Users

### Profile of an X account by username.

`GET /user/by-username`

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

Returns the public profile with verification flags, counts and creation date.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `username` | query | string | yes | Username without the @ Example: example_user |

Response fields:

- `data.id` (string): User ID
- `data.username` (string): Username
- `data.name` (string): Display name
- `data.bio` (string): Profile bio
- `data.location` (string): Profile location
- `data.verified` (boolean): Legacy verified status
- `data.isBlueVerified` (boolean): Paid verification
- `data.followerCount` (integer): Followers
- `data.followingCount` (integer): Accounts followed
- `data.tweetCount` (integer): Tweets posted
- `data.createdAt` (string): Account creation time

```bash
curl 'https://api.tweetapi.com/tw-v2/user/by-username?username=example_user' \
  -H 'X-API-Key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "data": {
    "id": "1000001",
    "username": "example_user",
    "name": "Example User",
    "verified": false,
    "isBlueVerified": true,
    "followerCount": 1200,
    "followingCount": 150,
    "tweetCount": 3400,
    "createdAt": "2015-04-01T12:00:00.000Z"
  }
}
```

## Tweets

### A tweet with its ancestors and a page of replies.

`GET /tweet/details`

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

Cursor pages return tweet: null and an empty ancestors list. When the tweet carries an X Article, article.text holds its body.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `tweetId` | query | string | yes | Tweet ID Example: 2000001 |
| `cursor` | query | string | no | Cursor from the previous response, for the next page of replies Example: NEXT_CURSOR |
| `sortBy` | query | string | no | Reply order Example: Relevance One of: Relevance, Recency, Likes |

Response fields:

- `data.tweet` (object): The requested tweet with metadata, counts, author and media
- `data.ancestors[]` (object): Parent tweets of a reply, oldest first
- `data.replies[]` (object): A page of replies
- `data.nextCursor` (string): Pass as cursor for the next page

```bash
curl 'https://api.tweetapi.com/tw-v2/tweet/details?tweetId=2000001' \
  -H 'X-API-Key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "data": {
    "tweet": {
      "id": "2000001",
      "likeCount": 3
    },
    "ancestors": [],
    "replies": [
      {
        "id": "2000002"
      }
    ],
    "nextCursor": "NEXT_CURSOR"
  }
}
```

## Account

### Remaining units, plan allowance and rate limit for the key.

`GET /account/usage`

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

Free: does not use API units.

Response fields:

- `data.availableUnits` (integer): Plan units remaining plus spendable pay-as-you-go units
- `data.plan.requestLimit` (integer): Units included in the current period
- `data.plan.usedUnits` (integer): Units used this period
- `data.plan.remainingUnits` (integer): Units left this period
- `data.plan.periodEnd` (string): End of the paid period
- `data.payg.availableUnits` (integer): Pay-as-you-go units
- `data.rateLimit.requestsPerMinute` (integer): Per-minute rate limit for the key

```bash
curl 'https://api.tweetapi.com/tw-v2/account/usage' \
  -H 'X-API-Key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "data": {
    "availableUnits": 108766,
    "plan": {
      "active": true,
      "requestLimit": 100000,
      "usedUnits": 1234,
      "remainingUnits": 98766,
      "periodEnd": "2026-11-20T10:00:00.000Z"
    },
    "payg": {
      "availableUnits": 10000
    },
    "rateLimit": {
      "requestsPerMinute": 1200
    }
  }
}
```

---

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/
