Tweet X Scraper avatar

Tweet X Scraper

Pricing

from $0.15 / 1,000 tweets

Go to Apify Store
Tweet X Scraper

Tweet X Scraper

Collect public X/Twitter tweets from usernames, from:username queries, tweet URLs, and tweet IDs. Export clean tweet text, author info, engagement metrics, media, links, and run summaries without X login.

Pricing

from $0.15 / 1,000 tweets

Rating

0.0

(0)

Developer

Muhammad Qaseem Iqbal

Muhammad Qaseem Iqbal

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Categories

Share

Tweet X Scraper 🚀

Collect clean, ready-to-use public tweet data from X/Twitter without needing an X login. Tweet X Scraper currently focuses on public usernames, from:username queries, tweet URLs, and tweet IDs, then saves the results in a clear Apify dataset you can export, analyze, or send to your own tools. ✨

Use it for social listening, brand monitoring, market research, trend discovery, journalism, lead research, AI training datasets, RAG pipelines, and automated reporting. 📊

Tweet X Scraper works with public data only. It cannot access private or protected accounts, and it does not bypass X/Twitter permissions. Generic keyword, hashtag, mention, cashtag, and advanced search are reported as unsupported while X public search rejects guest requests. 🔒

🌟 What Can You Do With Tweet X Scraper?

  • 👤 Collect tweets from public usernames using simple profile inputs.
  • 🔎 Use simple from:username queries such as from:apify or from:elonmusk.
  • 🔗 Fetch exact tweets from tweet URLs or tweet IDs.
  • 🧹 Remove duplicate tweets when searches overlap.
  • 📈 Capture useful engagement data such as likes, replies, reposts, quotes, bookmarks, and views when available.
  • 🧑‍💼 Include author details such as username, display name, profile URL, verification signals, and follower counts when available.
  • 🖼️ Detect media, links, hashtags, mentions, and cashtags.
  • 🧠 Add optional local enrichments such as engagement score, simple sentiment, entities, and topics.
  • 🧾 Save a friendly run summary in OUTPUT so you can quickly see what happened.
  • ⚠️ Optionally save structured error records for unavailable tweets or failed lookups.
  • 💸 Run with cost-saving defaults from the first click.

📣 Brand Monitoring

Track posts from public accounts you care about, such as your brand, executives, competitors, partners, or industry voices.

Example sources:

  • from:openai
  • from:apify
  • openai in fromUsers
  • Exact tweet URLs from X/Twitter

🧭 Market Research

Discover what people are saying about products, industries, events, public figures, or fast-moving topics.

Great for:

  • 🧪 Product research
  • 🗣️ Voice-of-customer analysis
  • 🏁 Competitor monitoring
  • 📊 Trend reports
  • 📰 Newsroom research

🤖 AI & Data Pipelines

Export clean JSON records for:

  • 🧠 LLM research datasets
  • 🔍 Retrieval-augmented generation
  • 📚 Knowledge bases
  • 📈 Dashboards
  • 🧪 Data science notebooks
  • 🛠️ Internal automation

⏰ Scheduled Monitoring

Run the Actor every hour, day, or week to watch new posts appear over time. Use monitoringMode, lookbackMinutes, and stateKey to keep recurring jobs organized. 🔁

🏁 Quick Start

  1. Open the Actor on Apify.
  2. Choose one or more working sources: username, from:username query, tweet URL, or tweet ID.
  3. Set the maximum number of tweets you want.
  4. Click Start.
  5. Download results from the Apify dataset as JSON, CSV, Excel, XML, RSS, or HTML. 🎉

🧪 Simple Input Examples

👤 Tweets From A Public User

{
"fromUsers": ["openai"],
"maxItems": 100,
"sort": "latest"
}

🔎 Use A from:username Query

{
"queries": ["from:apify"],
"maxItems": 50
}

📣 Brand Account Monitoring

{
"fromUsers": ["AcmeBank", "AcmeSupport"],
"includeReplies": true,
"includeRetweets": false,
"maxItems": 1000
}

⚠️ Unsupported Keyword Search Diagnostic

{
"queries": ["openai"],
"includeErrors": true
}

🔗 Fetch Specific Tweet URLs

{
"tweetUrls": ["https://x.com/elonmusk/status/1846846285917131130"],
"includeAuthorDetails": true
}

📅 Scheduled User Monitoring

{
"fromUsers": ["openai"],
"monitoringMode": true,
"lookbackMinutes": 60,
"stateKey": "openai-hourly",
"maxItems": 5000
}

⏰ Hourly Monitoring

{
"fromUsers": ["AcmeBank"],
"monitoringMode": true,
"lookbackMinutes": 60,
"stateKey": "acme-bank-hourly",
"maxItems": 500
}

🧰 Input Options In Plain English

InputWhat it meansExample
queries 🔎Simple from:username queries. Generic keyword search is currently reported as unsupported.from:apify, from:openai
advancedQuery 🧠Currently unsupported for public guest scrapingLeave empty
tweetIds 🆔Exact tweet/status IDs to fetch"1846846285917131130"
tweetUrls 🔗Exact tweet links from x.com or twitter.comhttps://x.com/user/status/...
fromUsers 👤Public accounts to search fromopenai, elonmusk
hashtags 🏷️Currently unsupported for public guest scrapingLeave empty
mentions 📣Currently unsupported for public guest scrapingLeave empty
cashtags 💹Currently unsupported for public guest scrapingLeave empty
maxItems 🎯Maximum tweet records to save50, 1000, 5000
sort 🧭Result style where supportedlatest, top, mixed
startTime / endTime 📅Reserved for search-style sources; not required for username/tweet URL lookupsISO timestamps
language 🌍Prefer tweets in one languageen, es, fr
outputProfile 📦How much detail to saveminimal, standard, full
includeErrors ⚠️Save error rows for failed lookupstrue or false
proxyConfiguration 🌐Optional Apify proxy settingsOff by default

📦 What Data Do You Get?

Tweet X Scraper saves results into the default Apify dataset. Each row is either a tweet record or, if enabled, an error record.

🐦 Tweet Records

Depending on the selected output profile and what X/Twitter makes available, tweet records can include:

  • 🆔 Tweet ID
  • 🔗 X URL and Twitter URL
  • 📝 Tweet text
  • 📅 Created date and UNIX timestamp
  • 🌍 Language
  • 📱 Source client when available
  • 👤 Author profile details
  • 📈 Reply, repost, like, quote, view, and bookmark counts
  • 🧵 Conversation and reply information
  • 🖼️ Media details
  • 🔗 Links
  • 🏷️ Hashtags, mentions, and cashtags
  • 🚩 Flags such as retweet, quote, pinned, sensitive, or conversation-controlled
  • 🔎 Search metadata showing which input produced the tweet
  • 🧠 Optional enrichment fields
  • ⏱️ Scrape timestamp

⚠️ Error Records

When includeErrors is turned on, the Actor can save clear error rows for cases such as:

  • A tweet was deleted.
  • A tweet is private, protected, or unavailable.
  • A source could not be reached.
  • A request was blocked or timed out.

This is useful when you need a full audit trail of what happened during the run. 🧾

🧾 Sample Tweet Output

{
"recordType": "tweet",
"id": "1846846285917131130",
"url": "https://x.com/elonmusk/status/1846846285917131130",
"twitterUrl": "https://twitter.com/elonmusk/status/1846846285917131130",
"text": "True",
"createdAt": "2024-10-17T09:30:41.000Z",
"lang": "en",
"author": {
"username": "elonmusk",
"name": "Elon Musk",
"url": "https://x.com/elonmusk",
"isBlueVerified": true
},
"metrics": {
"replyCount": 3480,
"retweetCount": 18171,
"likeCount": 85815,
"quoteCount": 264,
"viewCount": 10913296,
"bookmarkCount": 1426
},
"entities": {
"hashtags": [],
"mentions": [],
"urls": [],
"cashtags": []
},
"media": [],
"scrapedAt": "2026-06-15T08:00:00.000Z"
}

⚠️ Sample Error Output

{
"recordType": "error",
"input": "0000000000000000004",
"operation": "tweetLookup",
"errorCode": "TWEET_UNAVAILABLE",
"errorMessage": "Tweet or source could not be found, is deleted, private, protected, or temporarily unavailable.",
"httpStatus": 404,
"retryCount": 0,
"scrapedAt": "2026-06-15T09:30:51.685Z"
}

💸 Built To Run Cheaply

Tweet X Scraper is configured to avoid surprise costs by default. The standard settings are intentionally conservative:

  • 💾 outputProfile starts at minimal to reduce dataset size.
  • 🎯 maxItems starts at 50 for small trial runs.
  • 📄 maxPagesPerQuery starts at 1 so runs do not automatically crawl deep result pages.
  • ⚠️ includeErrors starts at false so failed lookups do not add extra dataset rows unless you ask for them.
  • 🌐 Apify Proxy is off by default to avoid proxy charges unless you enable it.
  • 🔁 Retries are limited by default to avoid long, expensive failed runs.
  • 🧠 Deduplication is on, but persistent dedupe storage is off by default to reduce key-value store writes.
  • 🧮 The Actor supports low-memory runs starting at 256 MB.

For larger or more difficult jobs, you can increase limits, enable proxy, add retries, or use standard / full output. In short: start small, scale only when you need to. 🚦

📅 Reliable Username Monitoring

For recurring jobs, schedule the Actor with fromUsers, monitoringMode, lookbackMinutes, and a stable stateKey. This keeps runs small, predictable, and easier to compare over time. 🧩

🧠 Optional Enrichments

Tweet X Scraper can add lightweight local analysis fields without calling outside AI services:

  • 📈 Engagement score
  • 🙂 Basic sentiment
  • 🏷️ Entities
  • 🧵 Topics
  • 🗂️ Custom topic labels

These enrichments are optional. Keep them off for the smallest, fastest output. Turn them on when you want more analysis-ready data. ✨

🔌 API Usage Example

You can run the Actor through the Apify API and receive dataset items back.

curl --request POST \
"https://api.apify.com/v2/acts/qaseemiqbal~tweet-x-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"fromUsers": ["openai"],
"maxItems": 100,
"sort": "latest",
"outputProfile": "minimal"
}'

Replace YOUR_APIFY_TOKEN with your Apify API token. 🔑

🛡️ Important Notes

  • 🔒 Public data only: this Actor does not access private or protected accounts.
  • 🚫 No X login required: you do not need to provide X/Twitter credentials.
  • 🌦️ Availability can vary: X/Twitter may limit, throttle, omit, or change public profile results.
  • 🧪 Empty runs return no fake tweet records.
  • ⚠️ Generic keyword, hashtag, mention, cashtag, and advanced search inputs are reported as unsupported while public X search rejects guest requests.
  • ⚠️ If a tweet is deleted or unavailable, it cannot be recovered by the Actor.
  • 🌐 Proxy can improve reliability for difficult runs, but it may increase cost.

🧯 Troubleshooting

😕 I got no results. What should I try?

Try a public username, a from:username query, a tweet URL, or a tweet ID. Also remove strict filters such as includeImages, includeVideos, verifiedOnly, or high minimum engagement values.

📉 I expected more historical tweets.

Increase maxItems or split large username collections into separate runs. Public X availability can vary by account and by what the logged-out web app exposes.

🌐 Should I enable proxy?

Proxy is off by default to keep costs low. Enable Apify Proxy when reliability matters more than the cheapest possible run, especially for larger jobs or blocked requests.

🧾 Why do I see error records?

You turned on includeErrors. Error records help you see which inputs failed and why. Turn it off if you only want successful tweet records.

💾 My dataset is too large.

Use outputProfile: "minimal", keep includeRawData disabled, and collect fewer items per run.

🔁 I see duplicate-looking results.

Keep deduplicate enabled. Overlap can happen when a tweet URL, tweet ID, and username timeline point to the same tweet.

❓ FAQ

Do I need an X/Twitter account? 🔐

No. Tweet X Scraper is designed for public data and does not require your X/Twitter login.

Can it scrape protected accounts? 🔒

No. Protected/private content is not available.

Can I search by hashtag, keyword, mention, and cashtag? 🏷️

Not reliably through public guest access right now. The Actor reports these inputs as unsupported instead of spending requests on X search endpoints that currently return 404. Username timelines, from:username queries, tweet URLs, and tweet IDs are the supported paths.

Can I schedule it? ⏰

Yes. Use Apify schedules with monitoringMode, lookbackMinutes, and a stable stateKey.

Can I export the data? 📤

Yes. Apify datasets can be downloaded in common formats such as JSON, CSV, Excel, XML, RSS, and HTML.

Does it return fake data when nothing is found? 🧪

No. Empty runs produce zero tweet records and a summary explaining what happened.

What is the cheapest way to start? 💸

Start with maxItems: 50, outputProfile: "minimal", Apify Proxy disabled, and one focused username. Increase limits only after confirming the results look useful.

🧑‍💻 Local Development

Install dependencies:

$npm install

Run tests:

$npm test

Run locally with Apify CLI:

$apify run

Start the Node entrypoint:

$npm start

🗓️ Changelog

0.1.0

  • 🎉 Initial production-ready JavaScript Actor.
  • 🧾 Added Apify manifest, input schema, output schema, and dataset schema.
  • 🐦 Added public X/Twitter tweet lookup and search support.
  • 💸 Added low-cost defaults for smaller trial runs.
  • 🧪 Added automated tests and Docker support.