X (Twitter) Tweet Scraper | Search, Hashtags & Profiles
Pricing
from $3.00 / 1,000 tweets
X (Twitter) Tweet Scraper | Search, Hashtags & Profiles
Scrape tweets from X.com (Twitter) by search query, hashtag, username, or URL. Returns tweet text, engagement metrics, author info, media, and more $3.00/1K. MCP/API-ready.
Pricing
from $3.00 / 1,000 tweets
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
68
Total users
8
Monthly active users
2 days ago
Last modified
Categories
Share
๐ฆ X (Twitter) Tweet Scraper | Search, Hashtags, Profiles & URLs
This Apify Actor collects tweets from X.com based on a search query, hashtag list, username list, direct X URL, or mentioning username. It accepts one source or multiple sources in a single run, and each dataset record represents one scraped tweet. The output includes tweet text, full text, author details, engagement metrics, media URLs, hashtags, external URLs, language, conversation data, source URL, and scrape timestamp, so the result is ready for analysis, filtering, and downstream workflows.
Best fit and connected workflows
This Actor fits workflows that need tweet-level data from X.com in a structured Apify dataset. It is a strong routing choice for:
- keyword and phrase monitoring with
searchQuery - hashtag collection with
hashtags - profile-based tweet collection with
handles - URL-based scraping with
startUrls - mention-based monitoring with
mentioning - AI or automation workflows that read Apify datasets through the platform or Apify MCP
It also connects naturally to Apify platform steps such as dataset export, scheduled runs, and API-based processing. If you already work with Apify MCP, this Actor is usable as an Apify Actor endpoint inside that workflow.
Input fields
| Field | Type | Purpose |
|---|---|---|
searchQuery | string | Keywords or X advanced search syntax |
hashtags | array[string] | Hashtags to scrape, one query per hashtag |
handles | array[string] | X usernames to scrape via from:username queries |
startUrls | array[object] | Direct X.com or twitter.com profile/search URLs |
mentioning | string | Username to find tweets that mention that account |
sort | string | Latest, Top, or Both |
maxTweetsPerQuery | integer | Max tweets per source |
lang | string | ISO 639-1 language filter |
startDate | string | Since date in YYYY-MM-DD format |
endDate | string | Until date in YYYY-MM-DD format |
minimumLikes | integer | Minimum likes filter |
minimumRetweets | integer | Minimum retweets filter |
minimumReplies | integer | Minimum replies filter |
onlyVerified | boolean | Verified-account filter |
onlyImages | boolean | Image-only filter |
onlyVideos | boolean | Video-only filter |
excludeReplies | boolean | Excludes reply tweets |
excludeRetweets | boolean | Excludes retweets |
includeSourceQuery | boolean | Adds source_query to each record |
Focused input example
{"handles": ["OpenAI"],"sort": "Latest","lang": "en","maxTweetsPerQuery": 10,"excludeRetweets": true,"excludeReplies": true,"includeSourceQuery": true}
Output fields
| Field | Type | Purpose |
|---|---|---|
tweet_id | string | Unique tweet identifier |
text | string | Tweet display text |
full_text | string | Complete tweet text |
author_handle | string | Author username without @ |
author_name | string | Author display name |
author_id | string | Numeric author ID |
author_followers | number or null | Followers count |
author_following | number or null | Following count |
author_verified | boolean | Verified status |
created_at | string | Tweet timestamp |
like_count | number | Like count |
retweet_count | number | Retweet count |
reply_count | number | Reply count |
quote_count | number | Quote count |
view_count | number or null | View count when available |
is_reply | boolean | Reply indicator |
is_retweet | boolean | Retweet indicator |
is_quote | boolean | Quote-tweet indicator |
has_media | boolean | Media indicator |
media_urls | array[string] | Media URLs |
hashtags | array[string] | Hashtags in the tweet |
urls | array[string] | Expanded external URLs |
lang | string or null | Detected language |
conversation_id | string or null | Conversation root ID |
in_reply_to_user | string or null | Replied-to username |
url | string | Direct tweet permalink |
source_url | string | Queried API URL |
scraped_at | string | Extraction timestamp |
Illustrative output record
{"tweet_id": "1773456789012345678","text": "Just launched our new AI product! ๐ #AI #tech","full_text": "Just launched our new AI product! ๐ #AI #tech https://t.co/example","author_handle": "openai","author_name": "OpenAI","author_id": "1288285673","author_followers": 2500000,"author_following": 342,"author_verified": true,"created_at": "Mon Mar 25 14:30:00 +0000 2024","like_count": 4200,"retweet_count": 1100,"reply_count": 830,"quote_count": 210,"view_count": 980000,"is_reply": false,"is_retweet": false,"is_quote": false,"has_media": true,"media_urls": ["https://pbs.twimg.com/media/example.jpg"],"hashtags": ["AI", "tech"],"urls": ["https://openai.com/blog/example"],"lang": "en","conversation_id": "1773456789012345678","in_reply_to_user": null,"url": "https://x.com/openai/status/1773456789012345678","source_url": "https://twitter.com/i/api/2/search/adaptive.json?q=AI&count=40","scraped_at": "2026-03-31T12:00:00.000Z"}
How it works
The Actor uses managed owner provider secrets (ScrapeCreators โ SociaVault โ TwitterAPI.io) for cookieless collection. Optional owner TWITTER_AUTH_TOKEN / TWITTER_CSRF_TOKEN env secrets can enable a browser path; customers never supply API keys or cookies. It supports search queries, hashtags, handles, direct URLs, and mention searches with sort, volume, language, date, and engagement filters. Each dataset record is one tweet with author, engagement, media, URL, and provenance fields. Default run options: latest build, 600s timeout, 512 MB.
Pricing
This Actor uses Apify's Pay Per Event pricing model. Charges are based on scraped tweet events, and Apify platform usage is billed separately according to your account and execution settings. Event-based pricing also applies to Actor start events as defined in the live contract. For the current pricing details, open the live Pricing tab on the Actor page.
For an event-count example in words: if a execution produces one hundred Tweet events, you are charged for one hundred scraped tweet events, plus the Apify platform usage tied to the run.
Use with AI agents (MCP)
This Actor is available as an Apify Actor usable through Apify MCP. The exact Actor identity is khadinakbar/x-tweet-scraper. In MCP-based automation, the tool helps an AI agent request tweet collection from X.com, then read the resulting dataset records for analysis or routing.
Collect the latest English tweets from the handle OpenAI, keep original tweets only, and return the dataset records with author, engagement, and URL fields.
When an agent reads the output, each dataset item represents one tweet. The tweet_id and url support deduplication and direct lookup, while source_url shows the queried API source. Pagination is handled by the Actor based on the requested inputs and maxTweetsPerQuery. Cost scales with the number of Tweet events returned, so smaller targeted queries usually stay easier to reason about than broad multi-source runs.
Example with the Apify API
import { ApifyClient } from 'apify-client';const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const input = {handles: ['OpenAI'],sort: 'Latest',lang: 'en',maxTweetsPerQuery: 5,excludeRetweets: true,};const run = await client.actor('khadinakbar/x-tweet-scraper').call(input);const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Best results and outcome guidance
Target one clear source per run when you want easier analysis. searchQuery works well for keywords and X advanced search syntax, hashtags fits topic monitoring, handles fits profile timelines, and mentioning fits brand mention tracking. Latest is useful for recency-focused review, Top is useful for engagement-focused review, and Both broadens coverage across the two sort modes. Use includeSourceQuery when combining multiple sources so each tweet keeps its origin visible in the dataset.
Continue the workflow
- Then use X Twitter Profile Scraper - Public Profile Details to extend ๐ฆ X (Twitter) Tweet Scraper | Search, Hashtags, Profiles & URLs research with a complementary enrichment contract.
- Then use X Twitter Replies Scraper - No Cookies to extend ๐ฆ X (Twitter) Tweet Scraper | Search, Hashtags, Profiles & URLs research with a complementary content contract.
Design note
I found that the live dataset contract requires tweet_id, text, author_handle, created_at, like_count, retweet_count, url, and scraped_at in every record. That makes the output easy to join, trace, and timestamp even before optional fields are considered.
FAQ
Can I scrape by keyword, hashtag, or profile in the same Actor?
Yes. The input schema includes searchQuery, hashtags, handles, startUrls, and mentioning, so you can route different X collection patterns through one Actor.
When should I use handles instead of searchQuery?
Use handles when the source is a username or profile timeline. Use searchQuery for keywords, phrases, or advanced X search syntax.
What is the difference between startUrls and handles?
startUrls accepts direct X.com or twitter.com profile or search URLs. handles accepts usernames and converts them into from:username queries.
How can I monitor mentions of a brand name?
Use mentioning with the brand username, for example OpenAI, to collect tweets that mention @OpenAI.
Can I trace which query produced each tweet?
Yes. Enable includeSourceQuery to add source_query to each dataset record.
Which fields are suited to analysis?
text, full_text, author_handle, author_name, created_at, like_count, retweet_count, reply_count, quote_count, view_count, hashtags, and urls are the main analysis fields in the dataset contract.
Responsible use
Use the Actor in ways that align with X.com access rules and Apify platform terms. Provider keys and any owner session cookies are Actor env secrets only โ never paste them into run input. When working with large or repeated collections, structure the run around the smallest clear query set that matches your workflow.