X Twitter Tweet Scraper
Pricing
from $0.15 / 1,000 results
X Twitter Tweet Scraper
Scrape X / Twitter tweets by keyword, URL, conversation ID, author, date, engagement, and media filters. Export structured tweet data for monitoring, research, and automation.
Pricing
from $0.15 / 1,000 results
Rating
0.0
(0)
Developer
simoit
Maintained by CommunityActor stats
1
Bookmarked
68
Total users
16
Monthly active users
2 days ago
Last modified
Categories
Share

Scrape X/Twitter tweets by keyword, advanced search query, search URL, author, date range, engagement threshold, media type, verified-account filter, or collect replies for specific tweet IDs. The Actor returns structured tweet records for brand monitoring, campaign research, market analysis, reporting, and automation workflows.
Quick start
Run a simple keyword search with a hard limit on the number of results:
{"searchTerms": "open source AI agents","sort": "latest","maxItems": 20}
The Actor stores matching tweets in the default Apify dataset. You can inspect them in the Dataset tab or export them as JSON, CSV, Excel, XML, RSS, or an HTML table.
Jump to: use cases · output · input reference · API examples · pricing · FAQ
What this Actor does
- finds tweets by simple keyword phrases or full X/Twitter advanced search queries
- collects tweets from X/Twitter search URLs
- collects replies for specific posts with
tweetIdsor tweet URLs - filters by author, reply target, mentioned users, date range, language, hashtags, and exact phrases
- filters by minimum likes, retweets, replies, image posts, video posts, or verified users
- supports
latestandtopsorting - paginates results and lets you cap output with
maxItems
Common use cases
- monitor brand, product, executive, or competitor mentions
- collect tweets for campaign hashtags and launches
- track high-engagement posts in a market or topic
- build social listening and sentiment-analysis datasets
- collect replies and reactions from a specific post
- export tweet datasets for BI, LLM enrichment, classification, or alerts
Output
The dataset contains matching tweet records with tweet text, URL, timestamp, author details, engagement counters, hashtags, links, media, conversation IDs, and other fields when available.
| Field | Description |
|---|---|
id_str, url | Tweet identifier and direct X/Twitter URL |
date, lang | Publication timestamp and detected language |
rawContent | Tweet text |
user | Author username, display name, follower count, and verification status |
likeCount, retweetCount, replyCount, quoteCount | Engagement counters |
viewCount | View count when available |
hashtags, cashtags, mentionedUsers, links | Extracted entities |
media | Attached photos, videos, and animated media |
conversationIdStr | Conversation identifier for grouping threads and replies |
Example output
{"id": 1891042203344556600,"id_str": "1891042203344556600","url": "https://x.com/openai/status/1891042203344556600","date": "2026-02-20T08:30:00+00:00","lang": "en","rawContent": "We shipped a new update today.","replyCount": 42,"retweetCount": 310,"likeCount": 1520,"quoteCount": 18,"bookmarkedCount": 0,"conversationId": 1891042203344556600,"conversationIdStr": "1891042203344556600","hashtags": ["AI", "OpenAI"],"cashtags": [],"mentionedUsers": [],"links": [],"viewCount": 120034,"user": {"id": 4398626122,"id_str": "4398626122","url": "https://x.com/openai","username": "openai","displayname": "OpenAI","followersCount": 5500000,"friendsCount": 12,"verified": true},"media": {"photos": [],"videos": [],"animated": []},"_type": "snscrape.modules.twitter.Tweet"}
How to use
- Open the Actor on Apify.
- Choose
Search tweetsfor keyword/query collection orReplies for specific tweetsfor tweet reply collection. - For search, enter
searchTermsfor a simple search,rawQueryfor advanced X/Twitter search syntax, orstartUrlsfor search URLs. For replies, entertweetIdsortweetUrls. - Add optional filters such as author, date range, engagement thresholds, language, hashtags, media type, or verified users for search runs.
- Set
maxItemsandlimitto control output size. The Actor automatically increases the effective page count whenmaxItemsneeds more pages thanmaxPages. - Run the Actor and use the dataset from Apify exports, API, integrations, or scheduled tasks.
No scraping infrastructure setup is required.
Pricing and cost control
This Actor uses Apify pay-per-event pricing with a minimum billable run size of 10 results.
| Dataset results | Standard result events | Minimum top-up events | Total billable results |
|---|---|---|---|
| 0 | 0 | 10 | 10 |
| 3 | 3 | 7 | 10 |
| 7 | 7 | 3 | 10 |
| 10 | 10 | 0 | 10 |
| 50 | 50 | 0 | 50 |
The top-up uses the tweet-result-minimum-top-up event and only fills the difference to 10. User-input errors and explicit temporary backend errors are not topped up. Your final price depends on the event price shown on the Actor page for your Apify plan.
To control cost:
- start with a narrow query and
maxItems: 10, - use a date range, author, language, or engagement filters,
- inspect a small dataset before increasing
maxItems, - use
maxPagesonly when you intentionally need deeper pagination.
Free account monthly limit
Apify FREE accounts can use up to 50 runs per calendar month across all SIMO IT X/Twitter Actors combined. The allowance resets at the start of each month (UTC). Paid Apify accounts are not subject to this free-account limit.
Need a custom plan, custom limits, or a tailored data workflow? Contact contact@simoit.tech.
Input reference
| Input | Type / default | Description |
|---|---|---|
inputTargetType | string / search | Use search for search results or tweet_replies for replies to specific posts. |
searchTerms | string | One or more comma/newline-separated queries. Use this for ordinary searches. |
rawQuery | string | Full X/Twitter advanced search query used as-is. It overrides the composed query when combined with searchTerms. |
startUrls | string | One or more x.com or twitter.com search URLs. |
tweetIds, tweetUrls | string | Tweet IDs or status URLs for tweet_replies mode. |
conversationIds | string | Converts IDs into conversation_id:<id> search queries. For actual replies, use tweetIds. |
sort | string / latest | Sort results by latest or top. |
fromUsers, toUsers, mentioningUsers | string | Comma-separated author, reply-target, or mentioned usernames. |
startDate, endDate | string | Date range in YYYY-MM-DD, D/M/YYYY, or M/D/YYYY format. |
minimumLikes, minimumRetweets, minimumReplies | integer | Minimum engagement thresholds. |
onlyImage, onlyVideo, onlyVerifiedUsers | boolean / false | Restrict results by media type or verified authors. |
includeReplies, includeRetweets | boolean / true | Include or exclude replies and retweets. |
withinRadius | string | Geographic filter such as 52.23,21.01,10km. |
page | integer / 1 | Starting page number. |
limit | integer / 20 | Requested records per page; maximum 100. |
maxPages | integer / 1 | Minimum pages to fetch. The Actor can increase it when required by maxItems. |
maxItems | integer | Hard cap on the total dataset records. |
Legacy compatibility:
- The Actor still accepts aliases such as
author,inReplyTo,mentioning,start,end,since,until, andminimumFavorites. - Those aliases are supported for backward compatibility, but they are intentionally not exposed in the public input UI.
Filters and pagination
- search target:
rawQuery,searchTerms,conversationIds,startUrls - tweet replies target:
inputTargetType: "tweet_replies"withtweetIdsortweetUrls - advanced query helpers:
rawQuery,exactPhrase,excludeTerms,hashtags,language - author/mention filters:
fromUsers/author,toUsers/inReplyTo,mentioningUsers/mentioning - date filters:
startDate/start/since,endDate/end/untilaccepted formats:YYYY-MM-DD,D/M/YYYY, andM/D/YYYY - quality filters:
minimumLikes/minimumFavorites,minimumRetweets,minimumReplies - media/account filters:
onlyImage,onlyVideo,onlyVerifiedUsers - inclusion switches:
includeReplies,includeRetweets - geo filter:
withinRadius - page controls:
page,limit,maxPages,maxItems
Example input
{"searchTerms": "open source ai agents","exactPhrase": "agent memory","excludeTerms": "spam,fake","hashtags": "ai,agents","language": "en","sort": "latest","fromUsers": "openai,apify","startDate": "2026-02-01","endDate": "2026-02-20","minimumLikes": 10,"includeReplies": true,"onlyVideo": false,"maxItems": 50}
Collect replies for one post:
{"inputTargetType": "tweet_replies","tweetIds": "2070555273467687257","page": 1,"limit": 100,"maxItems": 300}
Run the Actor by API
Replace YOUR_APIFY_TOKEN with your Apify API token. For production applications, keep the token in an environment variable or secret store instead of committing it to source control.
cURL
curl -X POST \"https://api.apify.com/v2/acts/simoit~x-twitter-search-tweets-scrapper/runs?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"searchTerms": "open source AI agents","sort": "latest","maxItems": 20}'
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('simoit/x-twitter-search-tweets-scrapper').call({searchTerms: 'open source AI agents',sort: 'latest',maxItems: 20,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("simoit/x-twitter-search-tweets-scrapper").call(run_input={"searchTerms": "open source AI agents","sort": "latest","maxItems": 20,})items = client.dataset(run["defaultDatasetId"]).list_items().itemsprint(items)
Troubleshooting
The dataset is empty
- Check the spelling and syntax of
searchTermsorrawQuery. - Remove restrictive date, engagement, media, or author filters.
- Try
sort: latestand a recent date range. - When using
rawQuery, do not repeat the same conditions in the helper fields.
An empty valid run is still subject to the 10-result minimum described in Pricing and cost control.
The Actor returns fewer results than requested
X/Twitter availability and the selected filters determine how many matching records exist. Increase maxPages, broaden the query, or reduce restrictive filters. maxItems is a maximum, not a guarantee that the requested number of matching tweets exists.
Replies are not being collected
Set inputTargetType to tweet_replies and provide tweetIds or tweetUrls. The conversationIds field performs an advanced search and is not the dedicated replies mode.
A run reports an input error
Open the run's key-value store and inspect USER_ERROR_REPORT or RUN_REPORT. These records contain a sanitized input summary and a user-facing explanation.
Suggested Apify task presets
These are reusable task ideas you can create from this Actor. They are suggested presets, not separate Actors.
| Task | Input preset | Expected output |
|---|---|---|
| Brand monitoring by keyword | searchTerms, language, maxItems, optional minimumLikes | Recent tweets mentioning a brand, product, or executive |
| Campaign hashtag analysis | hashtags, startDate, endDate, sort: latest | Tweets from a campaign window with engagement counters |
| Competitor mention tracking | searchTerms, fromUsers or mentioningUsers, maxItems | Mentions and conversations around competitor accounts |
| Tweet replies monitoring | inputTargetType: tweet_replies, tweetIds, maxItems | Replies for one or more specific posts |
| High-engagement tweet discovery | searchTerms, sort: top, minimumLikes, minimumRetweets | Strong-performing tweets for a topic or market |
| Video tweet collection | searchTerms, onlyVideo: true, maxItems | Video posts matching a query |
Related Actors
- Need tweets from one specific profile instead of broad search results? Use Profile Scraper.
- Need account metadata, followers, or following instead of tweets? Use User Scraper.
- Need posts from a curated X list? Use List Scraper.
- Need preset or country-level trend feeds before drilling into tweets? Use Trends Scraper or Global Trending Scraper.
About SIMO IT
SIMO IT delivers practical scraping and automation tools that help teams extract value from social platforms faster.
Support
For a reproducible issue, include the Apify run ID, a sanitized input, the expected result, and the actual result. Do not send API tokens or other credentials.
Contact: contact@simoit.tech
FAQ
Is this an official X/Twitter API?
No. This is an Apify Actor for collecting X/Twitter data. It is not an official X/Twitter API, and you are responsible for using the data in a compliant way.
Can I export tweets as JSON or CSV?
Yes. Results are stored in the Apify dataset, so you can use Apify exports such as JSON, CSV, Excel, XML, RSS, or HTML table where supported by your Apify workflow.
Can I run this Actor by API, schedule it, or integrate it with other tools?
Yes. You can run it manually, call it through the Apify API, create reusable Apify tasks, schedule recurring runs, and connect dataset output to Apify integrations or your own workflows.
Which input should I use first?
Use searchTerms for simple keyword searches, rawQuery for advanced X/Twitter search syntax, and startUrls when you already have search URLs. Use inputTargetType: "tweet_replies" with tweetIds or tweetUrls when you want replies for a specific post.
Can I collect more than one page of results?
Yes. Use page, limit, and maxPages for pagination. Use maxItems as the simplest hard cap for total dataset records. If maxItems needs more pages than maxPages, the Actor automatically increases the effective page count.
How do I control output size and cost?
Use narrower queries, date ranges, author filters, engagement filters, limit, maxPages, and maxItems. For most runs, start with maxItems and increase it only when the output quality is confirmed.
Can I narrow results to high-quality tweets only?
Yes. Use engagement filters like minimumLikes, minimumRetweets, and minimumReplies, or use sort: top.
Can I include or exclude replies and retweets?
Yes. Use includeReplies and includeRetweets.
What are the practical limitations?
Results depend on X/Twitter availability, the query, selected filters, date range, and pagination settings. Very broad or very old searches can return fewer useful records than focused queries.
Does this Actor support legacy alias fields?
Yes. It supports aliases like author, inReplyTo, mentioning, start/end, since/until, and minimumFavorites.