~ / endpoints / Tweet API

Twitter / X Tweet Scraper API

Our Twitter tweet scraper turns any tweet URL or numeric status id into structured JSON: the full text, the author, favorite and reply counts, language, entities, and any attached media, all from one request with no login and no developer account.

Get a free API keyView endpoints
1,000
free requests / mo
2.6s
median response
JSON
structured output
1
flat charge per tweet
the wall

Why Twitter / X Tweet data sits behind a login wall

X shut its free API tier in 2023 and now starts paid access around 100 dollars a month, while a logged-out visit to a tweet returns a JavaScript shell that hides the text behind a login wall. Reading one public tweet used to be a single GET; today it is an auth-gated, rate-limited endpoint or a brittle scrape.

quick start

One request to the Twitter / X Tweet Scraper API

cURL
curl "https://api.twitterscraperapi.com/api/v1/xtwitter/tweet?url=https://x.com/jack/status/20&api_key=$API_KEY"
Python
import requests, os

BASE = "https://api.twitterscraperapi.com"
API_KEY = os.environ["API_KEY"]

# Pass a full tweet URL or just the numeric status id.
resp = requests.get(
    f"{BASE}/api/v1/xtwitter/tweet",
    params={
        "url": "https://x.com/jack/status/20",  # or id="20"
        "api_key": API_KEY,
    },
    timeout=30,
)
tweet = resp.json()

print(tweet["user"]["screen_name"], "-", tweet["text"])
print(tweet["favorite_count"], "favorites,", tweet["reply_count"], "replies")
print("posted", tweet["created_at"], "in", tweet["lang"])
arguments

Parameters

ParameterRequiredDefaultNotes
urloptional-Any tweet URL, e.g. https://x.com/jack/status/20 or a twitter.com/.../status/ link. We parse the numeric status id out of it. One of url or id is required.
idoptional-The numeric tweet/status id on its own, e.g. 20. One of id or url is required.
langoptionalenBCP-47 language hint for the tweet payload, e.g. en, es, ja. Defaults to en.
api_keyrequired-Your API key, passed as a query parameter. Get one free at signup.
what you get

The Twitter / X Tweet Scraper API response, field by field

200 OK
{
  "id": "20",
  "id_str": "20",
  "url": "https://x.com/jack/status/20",
  "socialPlatform": "twitter",
  "text": "just setting up my twttr",
  "full_text": "just setting up my twttr",
  "lang": "en",
  "created_at": "2006-03-21T20:50:14.000Z",
  "favorite_count": 308537,
  "reply_count": 17947,
  "conversation_count": 17947,
  "retweet_count": null,
  "quote_count": null,
  "views": null,
  "possibly_sensitive": null,
  "is_edited": false,
  "user": {
    "screen_name": "jack",
    "name": "jack",
    "id_str": "12",
    "is_blue_verified": true,
    "verified": false,
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_normal.jpg",
    "url": "https://x.com/jack"
  },
  "entities": {
    "urls": [],
    "user_mentions": [],
    "hashtags": [],
    "symbols": []
  },
  "media": [],
  "thumbnail": null,
  "price": null,
  "currency": "USD",
  "rating": null,
  "reviews_count": null
}
FieldTypeDescription
id_strstringThe tweet's numeric status id as a string, the stable identifier for the post.
urlstringCanonical tweet URL, https://x.com//status/.
textstringThe tweet body. full_text carries the same value for consistency with X's own field name.
langstringDetected language of the tweet as a BCP-47 code, e.g. en.
created_atstringISO 8601 timestamp of when the tweet was posted.
favorite_countintegerNumber of likes. Guaranteed on the response along with reply_count.
reply_countintegerNumber of replies, taken from conversation_count. Guaranteed on the response.
conversation_countintegerReply count for the conversation, equal to reply_count.
retweet_countinteger or nullRetweets. Best-effort: X omits it on many tweets, in which case it returns null.
quote_countinteger or nullQuote tweets. Best-effort: null when X does not include it.
viewsinteger or nullView or impression count. Best-effort: present only for some tweets, otherwise null.
is_editedboolean or nullTrue when the tweet has been edited, false when not, null when X omits the flag.
userobjectThe author: screen_name, name, id_str, is_blue_verified, verified, profile_image_url_https, and url.
entitiesobjectParsed entities: urls, user_mentions, hashtags, and symbols. Any of them may be an empty array.
mediaarrayURLs of any attached photos or video thumbnails. thumbnail holds the first one, or null when the tweet has no media.
in practice

Where this Twitter / X Tweet data goes to work

>

Enrich saved tweet links

Resolve a list of tweet URLs into text, author, timestamp, and engagement so a spreadsheet of links becomes structured rows.
>

Track engagement over time

Poll a tweet on a schedule and store favorite_count and reply_count to build the like and reply history X does not chart for you.
>

Social listening and mentions

When a tweet URL surfaces in an alert or feed, pull its full text and author to score sentiment and route it to the right team.
>

Embed tweets in your app

Fetch the text, author handle, avatar, and media for a tweet id and render your own card without X's script or login gate.
>

Archive posts as clean JSON

Capture the full text, created_at, language, and entities of tweets you care about into a durable record before they are deleted.
>

Feed tweets to an LLM

Pass tweet text and entities straight into a summarization or classification pipeline as flat JSON, no HTML parsing first.
why this api

What sets our Twitter / X Tweet Scraper API apart

Pass a tweet URL or a bare status id and we return validated JSON: text, author, favorites, replies, language, entities, and media, with no OAuth, no paid X developer plan, and no login cookie to source. Every request runs through rotating proxies and retries and comes back in about 2.6 seconds with a stable schema, so favorites and replies are always present and best-effort fields like views and retweets return null rather than breaking your parser.

*

URL or status id input

One call takes a full tweet URL or a bare numeric id and resolves the id server side, so you pass whichever you have.
*

No login or paid X plan

We read the public tweet payload for you, so there is no OAuth, no X developer account, and no monthly API bill to authenticate a single call.
*

Guaranteed engagement fields

Favorites and replies come back on every tweet. Best-effort figures like views, retweets, and quotes return null when X omits them, keeping the shape stable.
*

Anti-bot and proxy rotation

Rotating residential and datacenter proxies with automatic retries keep tweet requests from getting rate-limited or blocked.
*

Entities and media parsed out

URLs, mentions, hashtags, and symbols arrive as arrays, and attached photo or video URLs come back in the media array.
*

Validated JSON schema

Parity-checked, regression-tested fields return in the same shape on every call, so your integration does not break on the next tweet.
side by side

Twitter / X Tweet Scraper API or the official X API

Our APIDIY (requests / headless)Official X API v2
Input by URL or idYes, tweet URL or status idManual fetch and JSON digTweet lookup by id, OAuth required
SetupAPI key onlyProxies, headless browser, parserDeveloper account plus paid tier
Cost to read one tweetFree tier, then per successful requestFree code, but you run the proxiesPaid plans start around 100 dollars a month
Logged-out accessHandled for youLogin wall returns a JS shellAuth token required on every call
Anti-bot and proxiesBuilt inYou build and maintain itNot applicable
OutputStable flat JSONWhatever you parse from the shellNested JSON you map yourself
what it costs

Start free, pay as you grow

PlanPriceBest for
Free1,000 requestsTesting and small jobs
Pro$0.60 / 1kProduction workloads
Pay-as-you-go$0.90 / 1kSpiky or one-off volume

Median response 2.6s. You only pay for successful requests.

FAQ

What is a Twitter tweet scraper?

A Twitter tweet scraper is a tool that reads a public tweet and returns its data in a structured format. Our tweet scraper API takes a tweet URL or a numeric status id and returns the full text, author, created_at timestamp, language, favorite and reply counts, entities, and any media as JSON from a single request, with no login required.

Do I need an X (Twitter) developer account or API key?

No. You authenticate with a single twitterscraperapi key passed as the api_key query parameter. There is no X developer account to apply for, no OAuth flow, and no paid X API tier, which as of 2023 starts at around 100 dollars a month. The free tier includes 1,000 requests so you can test first.

Can I pass a tweet URL or only the id?

Either works. Pass the full tweet URL, for example https://x.com/jack/status/20 or a twitter.com/.../status/ link, and we parse the numeric id out of it, or pass the bare id like 20 directly. One of url or id is required.

Which engagement metrics does it return?

Favorite count (likes) and reply count are guaranteed on every response. Retweet count, quote count, and view count are best-effort: X includes them on some tweets but not all, so when they are absent our API returns null for that field rather than omitting it, which keeps the JSON shape stable for your parser.

Does it return media, mentions, and hashtags?

Yes. The entities object breaks out urls, user_mentions, hashtags, and symbols as arrays, any of which can be empty. Attached photos and video thumbnails come back as URLs in the media array, and the first one is also set as thumbnail, or null when the tweet has no media.

How fast is the tweet scraper API?

Median end-to-end response is about 2.6 seconds, which includes proxy routing, anti-bot handling, retries, and parsing. One call returns the whole tweet, author, and engagement together, so you do not chain extra requests to assemble a single post.

Can it fetch deleted or protected tweets?

No. The API reads what is publicly visible, so a deleted, protected, or age-gated tweet has no public payload to return, and the request reports a clear not-found style error instead of guessing. Public tweets from public accounts are what it is built to read.

Start pulling tweet api data
Start free with 1,000 requests, no card required.
Get a free API key View endpoints