EN

Twitter Advanced Search Scraper

Social MediaMCP

Collect tweets, likes, retweets, replies, and media automatically. Save hours of manual work and get ready-to-use data to Excel/CSV/JSON in seconds.

Templates are view-only on mobile. Please switch to a desktop to run this template.

Why Use This Twitter/X Search Scraper?

 🚀 Fast & Scalable

 Collect hundreds or thousands of tweets automatically without scrolling manually.

 📊 Rich Metadata Extraction

 Capture everything you need for deeper insights-engagement, media URLs, timestamps, and more.

 🔎 Targeted, Keyword-Based Scraping

 Type in keywords or hashtags (e.g., "Black Friday deals", "AI tools") and instantly fetch relevant, real-time or historical tweets.

 💼 Ideal for Teams & Organisations

 Researchers, marketers, analysts, and agencies rely on this template to extract structured Twitter/X data for reporting and analysis.

🔍 Explore Our Fastest Twitter/X Scraper Options

TemplateWhat to scrape
Twitter Advance Search ScraperTweets related data only
Twitter (X) Comments ScraperBoth tweets and comments data
Twitter Advanced Search Comments ScraperBoth tweets and comments data
Twitter Scraper (by Account URL)Tweets related data only
Twitter Scraper (by hashtag)Tweets related data only
Get Twitter CookiesCookies for Twitter Follower & Following Scraper to use
Twitter Follower & Following ScraperFollower and Following

Who Is This For?

📈 Marketers & Social Media Managers

Track hashtags, campaign performance, and emerging trends.

📚 Researchers & Analysts

Collect large datasets for sentiment analysis, topic modeling, or academic research.

🧠 Content Creators & Influencers

Identify trending conversations to optimize content ideas.

🏢 Agencies & Enterprises

Monitor brand mentions, competitors, public reactions, and industry discussions at scale.


🐙 Why Choose Octoparse?

  • Truly No-Code: Start collecting data in minutes - no scripts, no setup.
  • No Login Required: Scrape public tweets without Twitter/X authentication.
  • Automatic Anti-Blocking & Retries: Built-in logic for stable, continuous runs.
  • Cloud Runs: Run this template in the cloud without leaving your computer on.
  • Instant Exports to Excel/CSV: Download clean datasets for analysis or reporting.
  • Beginner-Friendly UI: Point, click, run - this template works right out of the box.
Start Scraping Twitter Data in Under 60 Seconds.
Join 100,000+ users extracting Twitter insights with Octoparse.

Input and Output

Input

{
  "dates": "Example: 2020-01-01",
  "dates_2": "Example: 2024-10-15",
  "max_Tweets_to_Extract": "Example: 100. (Enter how many tweets you want to scrape.)",
  "all_of_these_words": "Example: what's happening · contains both \"what's\" and \"happening\"",
  "this_exact_phrase": "Example: happy hour · contains the exact phrase \"happy hour\"",
  "any_of_these_words": "Example: cats dogs · contains either \"cats\" or \"dogs\" (or both)",
  "none_of_these_words": "Example: cats dogs · does not contain \"cats\" and does not contain \"dogs\"",
  "these_hashtags": "Example: #ThrowbackThursday · contains the hashtag #ThrowbackThursday",
  "from_these_accounts": "Example: @X · sent from @X",
  "to_these_accounts": "Example: @X · sent in reply to @X",
  "mentioning_these_accounts": "Example: @SFBART @Caltrain · mentions @SFBART or mentions @Caltrain",
  "minimum_replies": "Example: 280 · posts with at least 280 replies",
  "minimum_likes": "Example: 280 · posts with at least 280 Likes",
  "minimum_reposts": "Example: 280 · posts with at least 280 reposts",
  "language": "option-value",
  "include_\"Top\"_Results": "Switch Off to scrape only the Latest tab. Switch On to scrape both Top and Latest results.",
  "scraping_mode": [
    "day"
  ],
  "reply_Filter": "true",
  "include_replies_and_original_posts": "true",
  "only_show_replies": "true"
}

Output

[
  {
    "Ads": "False",
    "Author_Handle": "stretchcloud",
    "Author_Name": "Prasenjit Sarkar",
    "Author_Web_Page_URL": "https://x.com/stretchcloud",
    "Bookmark_Count": "1",
    "Language": "en",
    "Like_Count": "3",
    "Post_ID": "2126099180883984437",
    "Post_URL": "https://x.com/search?q=Apify+lang%3Aen+since%3A2026-10-28+until%3A2026-11-28+-filter%3Areplies+max_id%3A2126466096952246271&src=typed_query&f=live",
    "Query_Str": "Apify",
    "QuoteContent": "This is pretty neat.\n\nMakes your site searchable by agents.",
    "QuoteTwitterURL": "https://x.com/virattt/status/2126066339441746283",
    "Reply_Count": "3",
    "Reply_to_Whom": "",
    "Reply_to_Whom_Handle": "",
    "Reply_to_Whom_URL": "",
    "Reply_to_Whom_Username": "",
    "Replying_to": "False",
    "Repost_Count": "0",
    "Tweet_Content": "Cloudflare just made \"make my site agent-searchable\" a single toggle. Flip it and you get automatic content indexing, a discoverable search API, and native HTTP QUERY support. AI Search (their AutoRAG rebrand) went GA on October 1 and started metered billing on November 1 at $0.75 per million tokens.\n\nMy read: this is the same instinct showing up everywhere right now, just packaged differently depending on who owns the infrastructure. Firecrawl raised a $14.5M Series A in August 2025 selling \"web data on tap for agents,\" then raised $75M more in September 2026 once it repositioned as a knowledge library rather than a scraper. Browserbase raised a $40M Series B building raw browser automation for the same demand. Apify shipped MCP Server Actors this year so its existing scraping jobs could be called directly as agent tools. Different layers, same realization: a webpage built for a human eyeball is not a data source an agent can use.\n\nWhat nobody's pricing in is the part that breaks the moment a page redesigns. Most of these pipelines either re-run an LLM over the page every time to relearn structure it already learned yesterday, or lock the search layer to infrastructure you don't control. Neither is cheap at scale, and neither travels to a site outside that one host's stack.\n\nThat is the gap I built DeepScrape to close. It generates deterministic CSS selectors once, self-heals them when a page's layout changes, and only calls an LLM for the targeted work: generating, validating, and adapting selectors, never re-reading the whole document to re-learn what it already knows. It ships its own MCP server and a site-to-MCP mode that turns any website, not just ones sitting behind a particular CDN, into a structured source an agent can query directly, with markdown, HTML, screenshots, PDFs, and change tracking as output.\n\nThe CDNs and crawlers are each building their own walled version of agent-readable web data. The open, self-hosted version should work on every site, not just the ones that pay a particular vendor's toll.\n\ngithub.com/stretchcloud/d…\nx.com/virattt/status…",
    "Tweet_Image_URL": "",
    "Tweet_URL": "https://x.com/stretchcloud/status/2126099180883984437",
    "Type": "Latest",
    "UTC_Time": "2026-11-26 23:42:00+00:00",
    "Verified_Status": "True",
    "View_Count": "292"
  }
]

⚠️ Important Notes Before You Start


❓ FAQs

1. Can I scrape private or protected tweets?

No, only public tweets are accessible.

2. Can I schedule automatic Twitter scraping?

Yes! Use cloud-based scheduled runs to scrape Twitter data automatically at set intervals (hourly, daily, weekly).

3. How many tweets can be scraped at one time?

You can extract unlimited tweets based on your search parameters. However, Twitter/X rate limits may apply. For best results, we recommend batching large datasets.

4. How fast can I scrape Twitter data?

Our scraper can extract hundreds of tweets in minutes, depending on your search criteria and date range.

5. Do I need a Twitter API key to use this scraper?

No! Unlike Twitter's official API, Octoparse scrapes public data without requiring API keys, developer accounts, or authentication.


🛠 How to Use: Step‑by‑Step Guide

1. Start the template

Click "Try it!" to load the template.

2. Fill in your parameters

On the input screen, enter the criteria you want to use - just like on Twitter/X's Advanced Search page:

⚠️ Note: Avoid entering keywords and hashtags at the same time - doing both together may disable the date‑range filter and lead to duplicate or unexpected results.

✍🏻 Input Fields Explained

ParameterRequired?Example
Dates (From)RequiredExample: 2020-01-01
Dates (To)RequiredExample: 2024-10-15
All of these wordsOptionalExample: what’s happening · contains both "what's" and "happening"
This exact phraseOptionalExample: happy hour · contains the exact phrase “happy hour”
Any of these wordsOptionalExample: cats dogs · contains either “cats” or “dogs” (or both)
None of these wordsOptionalExample: cats dogs · does not contain “cats” and does not contain "dogs"
These hashtagsOptionalExample: #ThrowbackThursday · contains the hashtag #ThrowbackThursday
From these accountsOptionalExample: @X · sent from @X
To these accountsOptionalExample: @X · sent in reply to @X
Mentioning these accountsOptionalExample: @SFBART @Caltrain · mentions @SFBART or mentions @Caltrain
Minimum repliesOptionalExample: 280 · posts with at least 280 replies
Minimum likesOptionalExample: 280 · posts with at least 280 Likes
Minimum repostsOptionalExample: 280 · posts with at least 280 reposts
LanguageOptionalExample: Any language, en, jp, fr, de
Max Tweets to ExtractRequiredExample: 100. (Enter how many tweets you want to scrape.)
Include "Latest" ResultsOptionalSwitch Off to scrapes only the Top tab. Switch On to Scrapes both Top and Latest results.

3. Run the scraper

  • Click "Start" to begin a Cloud run. (Greyed-out modes are not supported for this template.)
  • Octoparse will simulate browsing Twitter/X, applying your search query, scrolling through results, and extracting matching tweets.

4. Monitor & handle interruptions

  • If a sub‑task shows status "Stopped" (e.g. due to network glitch), re‑run that sub‑task to continue scraping.
  • Depending on how many tweets and how far back the date range goes, scraping may take time.

5. Export your data

  • Once scraping completes, go to the Output section to review.
  • Export the results - e.g. as CSV or Excel - for further analysis, filtering, or storage.

💡Tips

  • Use fewer keywords per run for higher accuracy.
  • For large datasets, break keywords or dates into multiple runs.