Tweet API (X Post API)
Get any tweet by id or URL: text, views, likes, retweets, media, and author. $0.01 per call.
Look up a single tweet (X post) by id or URL and get its full text, timestamp, language, views, likes, retweets, replies, quotes, bookmarks, hashtags, mentions, links, media with alt text, the quoted or retweeted tweet, reply context, and the author's profile.
Try it live
Fill in the fields and hit Run to see a real response.
{
"ok": true,
"data": {
"author": {
"avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"created_at": "2007-12-19T20:20:32+00:00",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": 92298687,
"following_count": 115,
"id": "11348282",
"is_blue_verified": true,
"likes_count": 17049,
"listed_count": 96842,
"location": "Pale Blue Dot",
"media_count": 28221,
"name": "NASA",
"pinned_tweet_ids": [
"2116263878807998722"
],
"protected": false,
"tweet_count": 74477,
"url": "https://x.com/NASA",
"username": "NASA",
"verified": false,
"verified_type": "Government",
"website": "http://www.nasa.gov/"
},
"bookmarks": 3460,
"conversation_id": "2116173868326846654",
"created_at": "2026-10-30T14:22:21+00:00",
"hashtags": [],
"id": "2116173868326846654",
"in_reply_to_tweet_id": null,
"in_reply_to_username": null,
"is_quote": false,
"is_retweet": false,
"lang": "en",
"likes": 100140,
"media": [
{
"alt_text": "Image description: A packed, sparkling starfield captured by our Hubble telescope — with strange new worlds potentially awaiting. Credit: ESA/Hubble and NASA, R. Cohen",
"duration_ms": null,
"height": 1200,
"type": "photo",
"url": "https://pbs.twimg.com/media/HV4o6wYXkAA3T9Q.jpg",
"video_url": null,
"width": 1600
}
],
"mentions": [],
"possibly_sensitive": false,
"quoted_tweet": null,
"quotes": 531,
"replies": 438,
"retweeted_tweet": null,
"retweets": 14918,
"text": "We mourn the passing of Patrick Stewart, who inspired countless individuals at NASA (and beyond) to boldly go where no one has gone before. https://t.co/qnLWiLX9RW",
"url": "https://x.com/NASA/status/2116173868326846654",
"urls": [],
"views": 1904085
}
}Features
Pass 2116173868326846654 or https://x.com/NASA/status/2116173868326846654. twitter.com URLs work too.
views, likes, retweets, replies, quotes, and bookmarks.
text, lang, hashtags, mentions, expanded urls, media items with alt text, and the quoted or retweeted tweet.
The author's full profile comes embedded, so no second lookup is needed.
Deleted tweets and tweets from protected accounts return NOT_FOUND, and you are not charged.
Use cases
Tweet Embeds & Previews
Render rich previews when users paste an X link.
Campaign Tracking
Track views and engagement on specific posts over time.
Evidence Capture
Store a structured copy of a tweet with its metrics.
Quick start
Copy this snippet and start making calls.
const res = await fetch('https://api.yepapi.com/v1/twitter/tweet', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"tweet": "2116173868326846654"
}),
});
const data = await res.json();
console.log(data);The Tweet API (X Post API) for single tweets
The YepAPI Tweet API returns any public tweet as structured data. Send a tweet id or x.com URL to /v1/twitter/tweet and get the text, timestamp, views, likes, retweets, replies, quotes, bookmarks, media, links, and author profile, at $0.01 per call.
It is the tweet lookup that used to need an approved developer account and a paid X API tier. Here it needs one YepAPI key.
What is a tweet API?
A tweet API returns the data behind a single post on X: what it says, who posted it, and how it performed. YepAPI's Tweet object includes id, url, text, created_at, lang, author, likes, retweets, replies, quotes, bookmarks, views, conversation_id, in_reply_to_tweet_id, in_reply_to_username, is_retweet, is_quote, possibly_sensitive, hashtags, mentions, urls, media, quoted_tweet, and retweeted_tweet.
Get a tweet in Python
requests.post("https://api.yepapi.com/v1/twitter/tweet", headers={"x-api-key": KEY}, json={"tweet": "https://x.com/NASA/status/2116173868326846654"}).json()["data"] gives you the whole tweet. Call it on a schedule to chart views and likes, or once to render a link preview.
Tweet API pricing: $0.01 per call
Every call costs a flat $0.01 and failed calls are free. There is no monthly tier to buy, no developer account to get approved, and no separate Twitter API key: one YepAPI key covers every endpoint. Tweets are cached for 15 minutes, and a 404 for a deleted or protected tweet costs nothing.
Go deeper on a tweet
Use the Tweet Replies API for the conversation, the Quote Tweets API for quote posts, and the Retweeters API for who shared it. All take the same tweet field.
Try the Tweet API free
Sign up and get $5 in free credit with no card required. That is 500 calls at $0.01 each to test the Tweet API on live X data before you spend anything. Replies, quotes, retweeters, search, and profiles are on the same key.
Start making API calls in 30 seconds
$5 free credit on signup. No credit card required. Pay per call.
What developers say
“Switched from SerpAPI and cut our SERP costs by 80%. Same data quality, way simpler billing.”
“One API key for AI models, SERP data, and web scraping. Saved us from managing 4 separate providers.”
“The $5 free credit let us prototype our entire rank tracking feature before committing. No other API does that.”
Frequently asked questions
Look up a single tweet (X post) by id or URL and get its full text, timestamp, language, views, likes, retweets, replies, quotes, bookmarks, hashtags, mentions, links, media with alt text, the quoted or retweeted tweet, reply context, and the author's profile.
Each API call costs $0.01. No monthly minimums or subscriptions — you only pay for what you use.
Sign up for a free API key, then send a POST request to /v1/twitter/tweet. Check the code example above for a ready-to-use snippet in JavaScript, cURL, or Python.
YepAPI bundles SEO, AI, and web scraping APIs under one key with no monthly minimums. You get lower per-call pricing, a unified dashboard, and one billing account instead of managing multiple providers.
Ready to integrate?
Get your API key and start making calls in 30 seconds. $5 free credit on signup — no credit card required.
More Twitter / X API endpoints
Tweet Replies API
$0.01Get the replies to any tweet, sorted by relevance, recency, or likes. $0.01 per call.
Quote Tweets API
$0.01Get every quote tweet of a post with the quoter's commentary and metrics. $0.01 per call.
Retweeters API
$0.01List the accounts that retweeted a post, with full profiles. $0.01 per call.
Twitter Trends API
$0.01Get X (Twitter) trending topics worldwide or for any country or city by WOEID. $0.01 per call.
Twitter Trends Locations API
$0.01List every place X (Twitter) publishes trends for, with WOEIDs. $0.01 per call.
Twitter Search API (X Search API)
$0.01Search tweets or people on X with full search operators. Top, latest, people, or media results. $0.01 per call.