X Twitter Scraper ($0.15 per 1000 results) avatar

X Twitter Scraper ($0.15 per 1000 results)

Pricing

from $0.13 / 1,000 results

Go to Apify Store
X Twitter Scraper ($0.15 per 1000 results)

X Twitter Scraper ($0.15 per 1000 results)

Low-cost X.com/Twitter scraper for search and user timelines. Filter by dates, media, replies/retweets/quotes, verified, links, news, safe, and location. Use query, username, or both to search within a user. Export JSON/CSV/XLSX.

Pricing

from $0.13 / 1,000 results

Rating

5.0

(6)

Developer

Iñigo Garcia Olaizola

Iñigo Garcia Olaizola

Maintained by Community

Actor stats

4

Bookmarked

628

Total users

68

Monthly active users

8.9 hours

Issues response

11 days ago

Last modified

Share

X (Twitter) Scraper — Low-Cost, Reliable Tweet Extraction for Search, Users & Filters

🤖 What does X (Twitter) Scraper do?

X (Twitter) Scraper extracts tweets from X.com for social listening, brand monitoring, competitor research, and trend analysis. Search by topic, download a user's tweets, or find matching posts within one account, then export the results as JSON, CSV, or Excel.

Collect tweets at low cost for social listening, monitoring, and research.

  • Tweet content: Text, publication dates, post links, and reply or retweet context.
  • Author information: Usernames, display names, profile links, avatars, and verification status.
  • Engagement: Likes, comments, retweets, quotes, and views when available.
  • Media: Image URLs, playable video URLs, animated GIFs, and links in posts.
  • Search filters: Dates, minimum likes, content types, verification, and location.

SEO keywords: Twitter scraper, X scraper, scrape tweets, download tweets, Twitter search scraper, Twitter username scraper, Twitter API alternative.

🧠 Scraping modes

Search across X

Set query to a topic, brand, or hashtag, such as bitcoin or #WorldCup. Leave username empty.

Collect a user's tweets

Set username to an X handle, such as nasa, and leave query empty. Add filters to narrow the user's posts.

Search within one account

Set both username and query. For example, username="nasa" and query="mars" searches for that account's tweets about Mars.

🚀 Quick start

  1. Choose your search: Enter query, username, or both. Use search text and handles rather than post or profile URLs.
  2. Set your limit: Choose maxItems and add any date, engagement, or content filters.
  3. Run the actor: Click Run in Apify Console, or start a run through Apify's API.
  4. Download your results: Open the run's Dataset tab to preview tweets and export JSON, CSV, or Excel. Choose All fields to include fields outside the overview.

📝 Configuration and input parameters

Configure these inputs in Apify Console or supply an input object through the API. Provide maxItems and at least one of query or username.

All content filters accept "" (any), "only", or "exclude". Their default is "", which applies no filter. Multiple filters narrow the same search.

Available Twitter scraper inputs

ParameterTypeRequiredDescription
maxItemsIntegerYesMaximum tweets to save. Minimum 1; default 10. This is a limit, not a guaranteed result count.
queryStringNo*Search text, such as bitcoin. With username, searches within that account. Very long queries are shortened automatically.
usernameStringNo*X handle, such as nasa, preferably without @. Leave empty for a general search. Do not supply a profile URL.
minDateStringNoLower date bound in YYYY-MM-DD format, such as 2024-05-01. Omit for no lower bound.
maxDateStringNoReturn tweets before this date (YYYY-MM-DD).
minLikesIntegerNoMinimum likes per tweet. Minimum 0; default 0 (no minimum).
repliesString (enum)NoReplies. Options: "" · "only" · "exclude"; default "".
retweetsString (enum)NoRetweets (reposts). Options: "" · "only" · "exclude"; default "".
quotesString (enum)NoQuote tweets. Options: "" · "only" · "exclude"; default "".
verifiedString (enum)NoTweets from verified accounts. Options: "" · "only" · "exclude"; default "".
linksString (enum)NoTweets containing links. Options: "" · "only" · "exclude"; default "".
mediaString (enum)NoTweets containing media. Options: "" · "only" · "exclude"; default "".
imagesString (enum)NoTweets containing images. Options: "" · "only" · "exclude"; default "".
videosString (enum)NoTweets containing videos. Options: "" · "only" · "exclude"; default "".
nativeVideosString (enum)NoTweets containing videos uploaded to X. Options: "" · "only" · "exclude"; default "".
proVideosString (enum)NoPro Video (Amplify) tweets. Options: "" · "only" · "exclude"; default "".
newsString (enum)NoTweets classified as news. Options: "" · "only" · "exclude"; default "".
safeString (enum)NoTweets classified as safe; "exclude" excludes safe content, rather than sensitive content. Options: "" · "only" · "exclude"; default "".
nearStringNoLocation to search near, such as Madrid or New York. Omit for no location filter.

* Conditional requirement: Provide query or username, or both.

Example inputs

Copy an example into the actor's JSON input editor and adjust the search and limit.

1️⃣ Topic search with image and date filters

{
"maxItems": 50,
"query": "pizza",
"images": "only",
"retweets": "exclude",
"minDate": "2024-05-01",
"maxDate": "2024-09-01"
}

2️⃣ User timeline

{
"maxItems": 100,
"username": "nasa"
}

3️⃣ Search within a user, excluding replies and reposts

{
"maxItems": 100,
"username": "nasa",
"query": "mars",
"replies": "exclude",
"retweets": "exclude",
"quotes": "exclude"
}

📊 Output and results

Each dataset item represents one tweet. The overview shows the main fields; choose All fields when exporting to include the full record.

Field reference

  • Post identity (strings): id is the tweet ID; permalink links to the post.
  • Author (strings): userUrl, username, fullname, and avatar contain the profile link, handle, display name, and avatar URL. verified contains the verification type, such as blue or gold, or an empty string when unavailable.
  • Content (strings): text contains plain text; html contains formatted tweet content.
  • Retweet context: isRetweet is a boolean; retweetedBy is the retweeter's display text, or an empty string for an original post.
  • Reply context (array of strings): replyingTo lists the handles being replied to when available.
  • Publication time (strings): displayTime is the displayed date and time; createdAt is the parsed timestamp.
  • Media and links (arrays of strings): images contains photo URLs; videos contains playable MP4 URLs for native videos and animated GIF attachments; links contains links found in the content.
  • Engagement (integers): comments, retweets, quotes, likes, and views contain the available counters. views is the view or impression count.

Media and reply arrays may be null when no values are available. Some author details and counters may be unavailable for individual posts; a zero counter does not necessarily confirm that the post received no engagement.

Example tweet

This illustrative record shows the output structure. Engagement counts change over time.

{
"id": "1819469673169408242",
"permalink": "https://x.com/elonmusk/status/1819469673169408242",
"userUrl": "https://x.com/elonmusk",
"username": "elonmusk",
"fullname": "Elon Musk",
"avatar": "https://pbs.twimg.com/profile_images/.../kqqe2iWO_bigger.jpg",
"verified": "blue",
"text": "I did all my coding with just Diet Coke, burgers & pizza",
"html": "I did all my coding with just Diet Coke, burgers & pizza",
"isRetweet": false,
"retweetedBy": "",
"replyingTo": [
"growing_daniel"
],
"displayTime": "Aug 2, 2024 · 8:25 PM UTC",
"createdAt": "2024-08-02T20:25:00Z",
"images": null,
"videos": null,
"links": null,
"comments": 430,
"retweets": 156,
"quotes": 59,
"likes": 3890,
"views": 120000
}

🧭 Common recipes

  • Original tweets only: Set replies="exclude", retweets="exclude", and quotes="exclude".
  • Video posts: Set videos="only", or use nativeVideos="only" for videos uploaded to X.
  • News posts: Set news="only".
  • Verified authors: Set verified="only".
  • Location search: Combine query with near="San Francisco".
  • Popular posts: Set minLikes to a threshold such as 100.
  • Event research: Combine minDate and maxDate to focus on a date range.

⚙️ Best practices

  • Start small: Test a search with maxItems=10, inspect the dataset, then increase the limit.
  • Keep searches focused: Use concise terms. Very long queries may lose terms when shortened.
  • Avoid conflicting filters: For example, media="exclude" together with images="only" can leave no matching posts.
  • Allow for fewer results: Runs can finish below maxItems when no more matching tweets are available.
  • Check dates: Use valid calendar dates in YYYY-MM-DD format. Invalid dates are ignored and reported in the run log.
  • Platform policies: Respect X's terms of service and applicable rules for accessing and using content.
  • Privacy: Handle personal data responsibly and comply with applicable privacy requirements, including GDPR and CCPA.
  • Responsible volume: Keep collection volumes and run frequency appropriate for your use case; avoid abusive traffic.
  • Attribution: Preserve source links and respect authors' rights when sharing tweets or publishing analysis.

This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by X Corp. All trademarks are the property of their respective owners.

❓ FAQ

Do I need both query and username?

No. Provide either one. When you provide both, the actor searches for matching tweets within that user's account.

Can I paste a tweet or profile URL?

No. Use search text in query or an X handle in username. Direct tweet URL collection is not an input mode.

How do I exclude sensitive content?

Set safe="only" to request content classified as safe. safe="exclude" excludes safe content. Classification does not guarantee that every result is suitable for every audience.

Why did I receive fewer tweets than maxItems?

maxItems is an upper limit. Narrow date ranges, high like thresholds, or combined filters may produce fewer matches. Try a broader query or remove a filter.

🛟 Support

Need a custom field, export, or search workflow? Open an issue from the actor's Issues tab in Apify Console, or contact the developer.