X Twitter Tweet Scraper avatar

X Twitter Tweet Scraper

Pricing

from $0.15 / 1,000 results

Go to Apify Store
X Twitter Tweet Scraper

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

simoit

Maintained by Community

Actor stats

1

Bookmarked

68

Total users

16

Monthly active users

2 days ago

Last modified

Share

SIMO IT logo

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 tweetIds or 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 latest and top sorting
  • 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.

FieldDescription
id_str, urlTweet identifier and direct X/Twitter URL
date, langPublication timestamp and detected language
rawContentTweet text
userAuthor username, display name, follower count, and verification status
likeCount, retweetCount, replyCount, quoteCountEngagement counters
viewCountView count when available
hashtags, cashtags, mentionedUsers, linksExtracted entities
mediaAttached photos, videos, and animated media
conversationIdStrConversation 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

  1. Open the Actor on Apify.
  2. Choose Search tweets for keyword/query collection or Replies for specific tweets for tweet reply collection.
  3. For search, enter searchTerms for a simple search, rawQuery for advanced X/Twitter search syntax, or startUrls for search URLs. For replies, enter tweetIds or tweetUrls.
  4. Add optional filters such as author, date range, engagement thresholds, language, hashtags, media type, or verified users for search runs.
  5. Set maxItems and limit to control output size. The Actor automatically increases the effective page count when maxItems needs more pages than maxPages.
  6. 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 resultsStandard result eventsMinimum top-up eventsTotal billable results
001010
33710
77310
1010010
5050050

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 maxPages only 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

InputType / defaultDescription
inputTargetTypestring / searchUse search for search results or tweet_replies for replies to specific posts.
searchTermsstringOne or more comma/newline-separated queries. Use this for ordinary searches.
rawQuerystringFull X/Twitter advanced search query used as-is. It overrides the composed query when combined with searchTerms.
startUrlsstringOne or more x.com or twitter.com search URLs.
tweetIds, tweetUrlsstringTweet IDs or status URLs for tweet_replies mode.
conversationIdsstringConverts IDs into conversation_id:<id> search queries. For actual replies, use tweetIds.
sortstring / latestSort results by latest or top.
fromUsers, toUsers, mentioningUsersstringComma-separated author, reply-target, or mentioned usernames.
startDate, endDatestringDate range in YYYY-MM-DD, D/M/YYYY, or M/D/YYYY format.
minimumLikes, minimumRetweets, minimumRepliesintegerMinimum engagement thresholds.
onlyImage, onlyVideo, onlyVerifiedUsersboolean / falseRestrict results by media type or verified authors.
includeReplies, includeRetweetsboolean / trueInclude or exclude replies and retweets.
withinRadiusstringGeographic filter such as 52.23,21.01,10km.
pageinteger / 1Starting page number.
limitinteger / 20Requested records per page; maximum 100.
maxPagesinteger / 1Minimum pages to fetch. The Actor can increase it when required by maxItems.
maxItemsintegerHard cap on the total dataset records.

Legacy compatibility:

  • The Actor still accepts aliases such as author, inReplyTo, mentioning, start, end, since, until, and minimumFavorites.
  • 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" with tweetIds or tweetUrls
  • advanced query helpers: rawQuery, exactPhrase, excludeTerms, hashtags, language
  • author/mention filters: fromUsers/author, toUsers/inReplyTo, mentioningUsers/mentioning
  • date filters: startDate/start/since, endDate/end/until accepted formats: YYYY-MM-DD, D/M/YYYY, and M/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 os
from apify_client import ApifyClient
client = 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().items
print(items)

Troubleshooting

The dataset is empty

  • Check the spelling and syntax of searchTerms or rawQuery.
  • Remove restrictive date, engagement, media, or author filters.
  • Try sort: latest and 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.

TaskInput presetExpected output
Brand monitoring by keywordsearchTerms, language, maxItems, optional minimumLikesRecent tweets mentioning a brand, product, or executive
Campaign hashtag analysishashtags, startDate, endDate, sort: latestTweets from a campaign window with engagement counters
Competitor mention trackingsearchTerms, fromUsers or mentioningUsers, maxItemsMentions and conversations around competitor accounts
Tweet replies monitoringinputTargetType: tweet_replies, tweetIds, maxItemsReplies for one or more specific posts
High-engagement tweet discoverysearchTerms, sort: top, minimumLikes, minimumRetweetsStrong-performing tweets for a topic or market
Video tweet collectionsearchTerms, onlyVideo: true, maxItemsVideo posts matching a query

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.