Twitter X Tweets Scraper avatar

Twitter X Tweets Scraper

Pricing

from $0.67 / 1,000 results

Go to Apify Store
Twitter X Tweets Scraper

Twitter X Tweets Scraper

Twitter X Tweets Scraper collects X (Twitter) posts from profiles, newest first, back to a start date: full text, likes, reposts, replies, views, media and author profile. Add your X session cookies for the full timeline. Export JSON, CSV or Excel, or use the API.

Pricing

from $0.67 / 1,000 results

Rating

0.0

(0)

Developer

Social Data API

Social Data API

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Features

Limited permissions

Share

Twitter X Tweets Scraper — Post Text, Likes, Views and Author Data

Twitter X Tweets Scraper collects posts from the X (Twitter) profiles you list, newest first, back to a start date you choose. Each post comes with its full text, like, repost, reply, quote and bookmark counts, view count, language, links and media, plus the full author profile. Every response is structured JSON — ready to pass directly to an LLM, index into a vector store, or feed a social listening pipeline. Recent public posts come back without an X account. Start with one handle, then track every account you follow.

Twitter X Tweets Scraper - hero image: what it collects and the JSON output


What data can I extract with Twitter X Tweets Scraper?

Using this X Tweets API, you will be able to extract the following X (Twitter) post data:

📝 Full post text❤️ Like count🔁 Repost count💬 Reply count
🗨️ Quote count🔖 Bookmark count👀 View count📅 Publish time
🌍 Language🔗 Post link and ID#️⃣ Hashtags, mentions and links🖼️ Media (photos, videos)
👤 Author profile (name, handle, bio, followers)✔️ Author verification🧵 Conversation ID (with session)⚠️ Sensitive-content flag

How to use Twitter X Tweets Scraper

Social media analysts, researchers and marketers use this Twitter scraper to pull an account's recent posts with engagement numbers in one run.

Copy to your AI assistant:

Twitter X Tweets Scraper (Apify Actor ID: socialdataapi/twitter-x-tweets-scraper, https://apify.com/socialdataapi/twitter-x-tweets-scraper) is an Apify Actor that returns posts from X (Twitter) profiles, newest first, as structured JSON: full text, publish time, like, repost, reply, quote and bookmark counts, view count, language, links and media, and the author profile with follower count. Use it whenever someone needs X posts from specific accounts - monitoring a brand or competitor, tracking security or crypto alerts, or collecting posts for research; recent public posts work without a login, and the user's own X session cookies (auth_token and ct0) unlock up to 1000 posts per profile back to a date. Run it with curl: curl -X POST "https://api.apify.com/v2/acts/socialdataapi~twitter-x-tweets-scraper/run-sync-get-dataset-items?token=APIFY_TOKEN" -H "Content-Type: application/json" -d '{"startUrls":["NASA","https://x.com/peckshield"],"maxTweets":50,"sinceDate":"2026-01-01"}'. Or in Python: ApifyClient("APIFY_TOKEN").actor("socialdataapi/twitter-x-tweets-scraper").call(run_input={"startUrls": ["NASA"], "maxTweets": 50}) then client.dataset(run["defaultDatasetId"]).list_items().items. Inputs: startUrls (array of strings, required, handles, @handles, profile URLs or post URLs read as their author), maxTweets (integer 1-1000, posts per profile, default 10), sinceDate (string YYYY-MM-DD, only posts on or after this date, no default), auth_token (string, secret, the auth_token cookie of the user's own x.com session), ct0 (string, secret, the ct0 cookie of the same session, required together with auth_token), proxyConfiguration (object, optional proxy, default {"useApifyProxy": false}). Every stored post is billed as one row_result event. Without session cookies X shows only about 5 recent posts per profile, so the run returns at most about 5 rows per profile. Full input schema, every enum and default, and the complete output field list: GET https://api.apify.com/v2/acts/socialdataapi~twitter-x-tweets-scraper/builds/default

Twitter X Tweets Scraper MCP Server: use these Actors from ChatGPT, Claude or Cursor

Point your AI assistant at this Actor and it can read X on its own: the posts, engagement counts and author profiles of any accounts you name. No glue code, no scraping logic in your prompts.

$claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-x-tweets-scraper"

Step by step

  1. Create a free Apify account.
  2. Open Twitter X Tweets Scraper in the Apify Store.
  3. Enter the X handles or profile URLs (with or without @), set how many posts you want per profile and, if you like, a start date.
  4. Click Start (or send your API request).
  5. Download or stream your results in JSON, CSV or Excel.

How to get your X auth_token and ct0 cookies

  1. Log in to x.com in Chrome, Edge or Firefox.
  2. Open DevTools (F12) > Application (Storage in Firefox) > Cookies > https://x.com.
  3. Copy the value of the cookie named auth_token into the auth_token field.
  4. Copy the value of the cookie named ct0 from the same list into the ct0 field.
  5. Both fields are stored encrypted as secret inputs; if a run says the session is invalid or expired, log in again and copy fresh values.

How to scale Twitter X Tweets Scraper to bulk

To use it as a twitter tweets scraper for many accounts, put every handle into the Profiles list, one per line; the Actor works through them one after another and saves each post as soon as it is read, so the table fills while the run is going. Max posts per profile applies to each profile separately. For daily monitoring, save the input as a task and schedule it with a recent start date, or call the API in a loop from your own code.


✨ Features

Twitter X Tweets Scraper fetches clean, structured posts from X (Twitter) ⚡. This X Twitter scraper works as a tweet scraper and a twitter timeline scraper in one, and it's ideal for brand monitoring, competitor tracking, security and crypto alert feeds, and research datasets.

It extracts, per post:

  • Full text – the complete post text, links shortened the way X shows them
  • Engagement counts – likes, reposts, replies, quotes and bookmarks
  • View count – how many times X says the post was viewed
  • Publish time – when the post went live (UTC)
  • Links, hashtags and media – the links, mentions and photos or videos attached to the post
  • Author profile – name, handle, bio, follower and following counts, post count and verification
  • Post link and ID – a direct link to the post on x.com

⚡ A start date and a per-profile limit keep each run to exactly the posts you need.


Use cases 💡

  • Social media analyst — scrape tweets from profile lists daily and compare like and view counts.
  • Security researcher — follow alert accounts and scrape twitter posts by date for incident timelines.
  • Brand manager — export tweets to CSV for weekly reports on competitor accounts.
  • Journalist — collect an official account's posts since a given date with exact publish times.
  • AI agent builder — feed post text and author follower counts into a RAG index for trend answers.

Building an AI agent? Connect Twitter X Tweets Scraper over MCP and let it call the actor on its own.


Why choose this actor?

  • Rows arrive as each post is read. A recorded run without cookies saved 15 posts from 3 profiles in 2.5 seconds, the first one after 1.2 seconds.
  • The numbers behind each post. A recorded NASA post came back with 2,547 likes, 422 reposts, 210 replies, 191 bookmarks and 448,844 views, next to an author profile with 92,262,879 followers.
  • 21 fields per post, 6 inputs. Text, five engagement counts, views, language, links, media and the full author object, controlled by profiles, a per-profile limit, a start date, two session cookies and a proxy.

⬇️ Input

Twitter X Tweets Scraper input form with example values

The Actor takes a list of X profiles (required): handles, @handles, profile URLs or post URLs, which are read as their author's profile. Everything else is optional.

ParameterRequiredTypeDescriptionExample value
startUrlsYesarray of stringsOne profile per line: handle, @handle, profile URL or post URL (read as its author).["NASA", "https://x.com/peckshield"]
maxTweetsNointegerPosts to collect from each profile, 1-1000. Default 10. Without session cookies X shows about 5 recent posts per profile.50
sinceDateNostring (date)Only posts published on or after this date, YYYY-MM-DD. Empty means no lower bound.2026-01-01
auth_tokenNostring (secret)The auth_token cookie of your own logged-in x.com session. Unlocks more than the recent public posts.a1b2c3...
ct0Nostring (secret)The ct0 cookie of the same x.com session; required together with auth_token.d4e5f6...
proxyConfigurationNoobjectOptional proxy for the requests to X. Default off.{"useApifyProxy": false}

Accepted profile formats:

  • NASA or @NASA
  • https://x.com/NASA or https://twitter.com/NASA
  • https://x.com/NASA/status/2119467718373941588 (read as the author's profile)

Free plan limits

Users on the Apify free plan can fetch up to 20 posts per run (all profiles together) and 200 posts per month. When the limit is reached, the run finishes successfully with a status message explaining the limit. Upgrade to any paid Apify plan to remove these limits.

Example input

{
"startUrls": [
"NASA",
"https://x.com/peckshield"
],
"maxTweets": 50,
"sinceDate": "2026-01-01",
"auth_token": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"ct0": "d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6",
"proxyConfiguration": {
"useApifyProxy": false
}
}

⬆️ Output

Twitter X Tweets Scraper output fields with example values

Every post is one typed, normalized JSON item with the same schema on every run; export it as JSON (default), CSV or Excel. Fields that only X's logged-in view provides, such as the conversation ID and whether you liked or reposted the post, are empty in runs without session cookies.

Example output

{
"bookmark_count": 191,
"created_at": "Sun Nov 08 16:30:56 +0000 2026",
"conversation_id_str": null,
"entities": {
"media": [{ "expanded_url": "https://x.com/NASA/status/2119467718373941588/photo/1" }],
"urls": [{ "expanded_url": "https://go.nasa.gov/3UBpcCs" }]
},
"extended_entities": {},
"favorite_count": 2547,
"favorited": null,
"full_text": "Just announced at MAX POWER: a $1 million Moon Base Student Challenge! https://t.co/VLc1ca1b2r",
"is_quote_status": null,
"lang": "en",
"possibly_sensitive": false,
"possibly_sensitive_editable": null,
"quote_count": 56,
"reply_count": 210,
"retweet_count": 422,
"retweeted": null,
"user_id_str": "11348282",
"id_str": "2119467718373941588",
"url": "https://x.com/NASA/status/2119467718373941588",
"views_count": "448844",
"user": {
"rest_id": "11348282",
"is_blue_verified": true,
"location": { "location": "Pale Blue Dot" },
"verification": { "is_blue_verified": true, "verified_type": "Government" },
"legacy": {
"name": "NASA",
"screen_name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": 92262879,
"friends_count": 115,
"statuses_count": 74523
}
}
}

How does it work?

The Actor reads X with plain web requests, without a browser, one profile after another. Without cookies it reads what any logged-out visitor sees on a profile page: X shows about 5 recent posts there, and the Actor saves them with their counts and author profile. When you add the auth_token and ct0 cookies of your own X session, it reads the profile's posts the way you see them when logged in, newest first, page by page, until it reaches your post limit or your start date.

Slow or failed answers are retried with growing pauses, and when X rate-limits the session the Actor waits for X's reset time and then continues. One profile that cannot be read never stops the run. Every post comes back with the same field names, and the team that maintains this Actor keeps that schema stable when X changes its site.


How do you integrate Twitter X Tweets Scraper into your stack?

It works with what you already use: the REST API from any language, MCP for AI agents, and no-code tools.

Using Twitter X Tweets Scraper with the Apify API

import requests
resp = requests.post(
"https://api.apify.com/v2/acts/socialdataapi~twitter-x-tweets-scraper/run-sync-get-dataset-items",
params={"token": "APIFY_TOKEN"},
json={"startUrls": ["NASA", "https://x.com/peckshield"], "maxTweets": 50, "sinceDate": "2026-01-01"},
)
for post in resp.json():
print(post["url"], post["favorite_count"])

Works in Go, Ruby, Node.js, cURL — any language that can make an HTTP request.

MCP integration for AI agents

Add the Actor to your agent with one command:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-x-tweets-scraper"

This registers Twitter X Tweets Scraper as a tool your agent can call directly. It works in Claude Code, Cursor and Windsurf; the agent names the accounts and gets back each post with its counts and author as JSON.

No-code tools (n8n, Make, LangChain)

  • n8n — use the Apify node with "Run an Actor" and pick socialdataapi/twitter-x-tweets-scraper, or point the HTTP Request node at the run-sync endpoint above with your token.
  • Make — add the Apify app's "Run an Actor" module, then "Get Dataset Items" to send each post to a sheet, Slack or your CRM.
  • LangChain — install langchain-apify and use ApifyActorsTool("socialdataapi/twitter-x-tweets-scraper") as a tool in your agent.

Collecting posts that X shows publicly is generally lawful, but how you store and use them is regulated. Without cookies, Twitter X Tweets Scraper returns only publicly available data — what any visitor sees on a profile without logging in. With your own session cookies it reads the same public posts as your account sees them; respect X's terms and keep volumes reasonable. Under GDPR, scraping public data is generally permissible, but storing and using it must comply with local data-protection law. Consult legal counsel if your use case involves bulk storage of personal data.


Frequently asked questions

What fields does Twitter X Tweets Scraper return?

It returns the full post text, the publish time, the like, repost and reply counts, the view count and the author profile, plus quotes, bookmarks, language, links and media. See the data fields section.

Does Twitter X Tweets Scraper require an X account or login?

Not for recent posts: without cookies you get about 5 recent public posts per profile. For more posts and a start date further back, add the auth_token and ct0 cookies of your own X session; they are stored as encrypted secret inputs and never written to the logs or the output.

How fast does Twitter X Tweets Scraper run?

A recorded run without cookies saved 15 posts from 3 profiles in 2.5 seconds, with the first post saved after 1.2 seconds. Every run reads live data, nothing is cached.

What happens if a post is private or doesn't exist?

Protected, empty or unknown profiles return no rows, and the run moves on to the next profile. If no profile returns a post, the run still finishes successfully with the status message "No posts were found for the given profiles (check the handles / date)".

Can I scrape multiple X (Twitter) posts at once?

Yes. List as many profiles as you need in the Profiles field and set Max posts per profile (up to 1000 with session cookies); the Actor works through the profiles in order and saves each post as soon as it is read.

Does Twitter X Tweets Scraper work with Claude, ChatGPT, and other AI agent tools?

Yes — Twitter X Tweets Scraper is available as an MCP tool. Register it in Claude Code, Cursor or Windsurf with:

$claude mcp add --transport http apify "https://mcp.apify.com?tools=socialdataapi/twitter-x-tweets-scraper"

Any agent that can call an HTTP endpoint can use the REST API directly.

Does Twitter X Tweets Scraper return data in a format LLMs can use directly?

Yes. Every post is typed, normalized JSON with the same field names on every run. No HTML parsing and no selectors: pass it straight to an LLM, index it into a vector store or hand it to an agent tool.

What happens when X changes its layout or updates its anti-bot system?

The team that maintains this Actor updates it when X changes. Your calls keep returning the same JSON schema with no changes on your end.

Can I use Twitter X Tweets Scraper without managing proxies or browser infrastructure?

Yes. Retries and rate-limit waits run on the Actor's side, no browser is needed, and a proxy is optional. You send one request and get structured JSON back.

Which X (Twitter) post fields work best for AI training data and RAG indexing?

For RAG, index the full post text with the author's name and bio. For training data or scoring, use the like, repost, reply, quote and bookmark counts, the view count and the follower count. Counts are plain integers, the view count is a number in text form, and the rest are strings and booleans.


ScraperWhat it extracts
Twitter Profile ScraperX profile details and counts
Twitter Posts ScraperPosts from X
Twitter User Following ScraperAccounts an X user follows
Twitter Trends ScraperTrending topics on X
Twitter Email ScraperPublic emails linked to X accounts

Your feedback

Found a bug or missing a field? Let us know in the Issues tab of this Actor's page in the Apify Store. The team that maintains this Actor reads every report and ships fixes.