The twitter tweet API to get an X post by ID

Fetch a single X (Twitter) post by numeric ID and get its text and metrics as JSON. Pass the ID from a post URL to start.

X Post API at a glance

This API returns one X (Twitter) post as JSON. Send a POST request with a tweet_id and read the tweet object from the response. Run the example below to see the exact shape.

Endpoint
POST /v1/data/twitter/tweet
Authentication
API key as Authorization: Bearer wh_…
Stage
Stable
Output
A tweet object with text, post time, likes, reposts, replies, quotes, bookmarks, views, media, hashtags, urls and mentions
Input
One required field, tweet_id. It is a numeric post ID of up to 32 digits.
Where to find the ID
The post URL has the form x.com/<user>/status/<tweet_id>
Type flags
is_reply, is_retweet and is_quote, plus a conversation_id
Credit weight
1. See the pricing page for current rates.

One request, structured JSON.

This request fetches one NASA post by its ID. The response below keeps the main tweet fields. Copy the request to try it yourself.

POST /v1/data/twitter/tweet
curl -X POST "https://api.datablue.dev/v1/data/twitter/tweet" \
  -H "Authorization: Bearer wh_..." \
  -H "Content-Type: application/json" \
  -d '{
    "tweet_id": "2123820070803542306"
  }'
Response (trimmed to 20 of 26 post fields)
{
  "success": true,
  "source": "graphql",
  "tweet": {
    "id": "2123820070803542306",
    "text": "LIVE: Watch as an uncrewed SpaceX Dragon spacecraft undocks from the @space_station and begins its journey to bring research samples and hardware back to Earth. https://t.co/RQEa5gYSk3",
    "created_at": "Fri Nov 20 16:45:38 +0000 2026",
    "likes": 1988,
    "retweets": 304,
    "replies": 102,
    "quotes": 18,
    "bookmarks": 73,
    "views": 715692,
    "lang": "en",
    "url": "https://x.com/NASA/status/2123820070803542306",
    "author": {
      "id": "11348282",
      "username": "NASA",
      "name": "NASA",
      "blue_verified": true
    },
    "media": [],
    "hashtags": [],
    "urls": [
      {
        "url": "https://t.co/RQEa5gYSk3",
        "display_url": "x.com/i/broadcasts/2…",
        "expanded_url": "https://x.com/i/broadcasts/2evOEzWEYBkWyn"
      }
    ],
    "mentions": ["Space_Station"],
    "conversation_id": "2123820070803542306",
    "is_reply": false,
    "is_retweet": false,
    "is_quote": false
  }
}

What an X post lookup returns.

Each lookup returns one tweet object with named fields.

Text and time

The text field holds the post text, and the created_at field holds the post time as text. The lang field returned en for our NASA post.

Engagement

The likes and retweets fields hold counts, and the replies and quotes fields do too. The bookmarks and views fields complete the set. Each metric has a status field that read present, and our NASA post showed 715692 views and 1988 likes.

Author

The author object holds an id and a username, and it also holds the display name and a blue_verified flag. Join this data to X Profile through the author username.

Type and thread flags

The is_reply and is_quote flags describe the post type, and our post returned false for each flag. The conversation_id field holds the id of the conversation.

Links and media

The url field links to the post on x.com, and the urls array holds each short link with its expanded_url. Our post returned empty media and hashtags arrays, and its mentions array listed one handle only. Read expanded_url to see where each link leads.

One option that shapes your lookup.

This API takes one required field and no other options.

Post ID

Set tweet_id to the numeric post ID, and send it as a string like our example. The catalogue allows up to 32 digits.

Finding the ID

Open the post on x.com and read the URL, where the ID is the number after status. Our example request fetches a NASA post by that number.

Authentication

Add your API key to the Authorization header, and start the header value with the word Bearer. Store the key in server code only.

One post per call

This API returns one post per request, so loop over your own ID list for a batch. Use X Posts when you start from a username.

What teams build with it.

A post ID is enough to fetch its current metrics.

Metric refresh

Keep a list of post IDs from your own reports, then fetch each ID again later to compare views and likes.

Link to data

Turn a post URL in a report into data by reading the ID from the URL and requesting it here.

Thread review

Store conversation_id with each post you look up, then compare the values across posts to find shared conversations.

Record keeping

Save the text and metrics when you check a post, and keep the url field so reviewers open the same post.

Why call an API instead of scraping a single X post yourself.

This API fetches the one post you name by ID, while X Posts reported its coverage as a ranked public sample. Pick this API when you hold the ID already.

The response holds one tweet object and no array, so read the text and the metrics straight from that object. Each metric has a status field, and ours read present.

Author data comes embedded in the post object. The author object holds the account id and username. Pass that username to X Profile to read the bio.

Your first post lookup in a minute.

Sign up, grab a key and fetch one post.

  1. Create an account

    Sign up to get your API key.

  2. Send a lookup

    POST a tweet_id to /v1/data/twitter/tweet with your Bearer key. Copy the ID from the post URL.

  3. Read the tweet object

    Read the text and metrics from the tweet object. Save the id with each record you keep.

Responsible use of X data.

This API covers public X data only. X publishes its own terms of service. Read them before you use the data commercially.

You are responsible for how you use the data, including privacy law in your region. This page gives general information, not legal advice. Review the DataBlue terms of service before you build.

Twitter tweet API questions.

Short answers about data and billing before you start.

It turns one X (Twitter) post into structured JSON. You send the post ID and get one tweet object.

Send a POST request to /v1/data/twitter/tweet with a Bearer token. Put the tweet_id in the JSON body.

Open the post on x.com and read its URL. The ID is the number after status.

It returns the post text and the post time, and engagement metrics and the author arrive in the same object. Compare the fields with the sample response above.

X Posts starts from a username and returns recent posts. This API takes a post ID and returns one post.

It returns the post itself and a replies count. The sample response holds no list of reply posts.

Send one request for each ID in your list. Store each tweet object with the date of the call.

This API covers public X posts only. Send the ID of a public post.

This API is marked stable in our catalogue today. Build against the documented fields, then check the changelog before each upgrade you ship to production.

This API has a credit weight of 1. Check the pricing page for current rates.

Fetch an X post by ID in a minute.

Create an account and copy your key. Then run the request with the ID of a post from a brand account you follow.

Start free