# Twitter / X API
> Read public Twitter/X data in real time — no login or key needed. Look up any tweet by its id (or by its URL) and get the full tweet: text, author, created date, language, like/retweet/reply/quote/view counts, attached photos and videos, and any quoted tweet. Look up any public account by @handle for its profile — display name, bio, location, follower/following counts, tweet and media counts and avatar. Tweets are read from X's own official syndication endpoint (the source that powers embedded tweets); profiles via the public FixTweet service. Every call is live (no cache). 4 endpoints. Built for tweet/embed enrichment, brand and author monitoring and content back-ends. Note: X exposes no public search or timeline, so this reads single tweets and profiles. No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/twitterx-api/..."
```

## Pricing
- **Free** (Free) — 3,600 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 68,000 calls/Mo, 8 req/s
- **Pro** ($35/Mo) — 340,000 calls/Mo, 20 req/s
- **Mega** ($79/Mo) — 1,660,000 calls/Mo, 50 req/s

## Endpoints

### Tweets

#### `GET /v1/tweet` — Tweet by id

**Parameters:**
- `id` (query, required, string) — Numeric tweet id Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/twitterx-api/v1/tweet?id=20"
```

**Response:**
```json
{
    "data": {
        "lang": "en",
        "text": "just setting up my twttr",
        "user": {
            "name": "jack",
            "id_str": "12",
            "verified": false,
            "screen_name": "jack",
            "is_blue_verified": true,
            "highlighted_label": {
                "url": {
                    "url": "https://twitter.com/Square",
                    "url_type": "DeepLink"
                },
                "badge": {
                    "url": "https://pbs.twimg.com/profile_images/1285655593592791040/HtwPZgej_bigger.jpg"
                },
                "description": "Square",
                "user_label_type": "BusinessLabel",
                "user_label_display_type": "Badge"
            },
            "profile_image_shape": "Circle",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg"
        },
        "id_str": "20",
        "entities": [],
        "isEdited": false,
        "__typename": "Tweet",
        "created_at": "2006-03-21T20:50:14.000Z",
        "isStaleEdit": false,
        "edit_control": {
            "edit_tweet_ids": [
                "20"
            ],
            "edits_remaining": "5",
            "is_edit_eligible": true,
            "editable_until_msecs": "1142976014000"
        },
        "favorite_count": 309474,
        "news_action_type": "conversation",
        "conversation_count": 17917,
        "display_text_range": [
            
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/tweet/by-url` — Tweet by URL

**Parameters:**
- `url` (query, required, string) — Tweet URL Example: `https://twitter.com/jack/status/20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/twitterx-api/v1/tweet/by-url?url=https%3A%2F%2Ftwitter.com%2Fjack%2Fstatus%2F20"
```

**Response:**
```json
{
    "data": {
        "lang": "en",
        "text": "just setting up my twttr",
        "user": {
            "name": "jack",
            "id_str": "12",
            "verified": false,
            "screen_name": "jack",
            "is_blue_verified": true,
            "highlighted_label": {
                "url": {
                    "url": "https://twitter.com/Square",
                    "url_type": "DeepLink"
                },
                "badge": {
                    "url": "https://pbs.twimg.com/profile_images/1285655593592791040/HtwPZgej_bigger.jpg"
                },
                "description": "Square",
                "user_label_type": "BusinessLabel",
                "user_label_display_type": "Badge"
            },
            "profile_image_shape": "Circle",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg"
        },
        "id_str": "20",
        "entities": [],
        "isEdited": false,
        "__typename": "Tweet",
        "created_at": "2006-03-21T20:50:14.000Z",
        "isStaleEdit": false,
        "edit_control": {
            "edit_tweet_ids": [
                "20"
            ],
            "edits_remaining": "5",
            "is_edit_eligible": true,
            "editable_until_msecs": "1142976014000"
        },
        "favorite_count": 309474,
        "news_action_type": "conversation",
        "conversation_count": 17917,
        "display_text_range": [
            
…(truncated, see openapi.json for full schema)
```

### Users

#### `GET /v1/user` — User profile

**Parameters:**
- `username` (query, required, string) — @handle (without @) Example: `NASA`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/twitterx-api/v1/user?username=NASA"
```

**Response:**
```json
{
    "data": {
        "id": "11348282",
        "url": "https://x.com/NASA",
        "name": "NASA",
        "likes": 16797,
        "joined": "Wed Dec 19 20:20:32 +0000 2007",
        "tweets": 74051,
        "website": {
            "url": "http://www.nasa.gov/",
            "display_url": "nasa.gov"
        },
        "location": "Pale Blue Dot",
        "followers": 92086705,
        "following": 119,
        "protected": false,
        "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
        "banner_url": "https://pbs.twimg.com/profile_banners/11348282/1775567134",
        "description": "Making the seemingly impossible, possible. ✨",
        "media_count": 27976,
        "screen_name": "NASA",
        "verification": {
            "type": "government",
            "verified": true,
            "verified_at": null
        },
        "raw_description": {
            "text": "Making the seemingly impossible, possible. ✨",
            "facets": []
        }
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:17.163Z",
        "request_id": "74cfb7c6-162b-4a85-850d-905f392ea754"
    },
    "status": "ok",
    "message": "User profile",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/twitterx-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; gateway requires x-api-key",
        "name": "Twitter / X API",
        "note": "Live, no cache. tweet takes a numeric tweet id (or use tweet/by-url with a tweet URL) and returns the full tweet with author, media, stats and any quoted tweet. user takes an @handle and returns the public profile (followers, counts, bio). Public tweets/accounts only; X exposes no public search or timeline.",
        "source": "X official syndication (tweets) + FixTweet public API (users)",
        "endpoints": 4
    },
    "meta": {
        "timestamp": "2026-06-02T16:53:17.287Z",
        "request_id": "b2a1977d-c21b-437b-b218-3041915b8be9"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/twitterx-api
OpenAPI spec: https://www.oanor.com/api/twitterx-api/openapi.json
