X (Twitter) Scraper: Tweets, Replies and Followers
This Actor returns tweets from X by search query, profile, tweet link or reply thread, plus the followers and following lists of public accounts, each tweet with its text, engagement counts, media and author. It is built for brand monitoring, audience research and anyone who needs clean tweet data in a dataset or over an API.
Main price: $0.25 per 1,000 tweets, same on every Apify plan.
What you can do with it
- Track a brand, product or hashtag with advanced X search operators such as from:, since:, min_faves: and lang:.
- Collect a profile's tweets, with or without its own replies.
- Read the replies under a launch post or announcement.
- Export the followers or following of public accounts for influencer and audience lists.
- Build text datasets with dates, language and engagement numbers for NLP work.
What you get
Results come as rows in an Apify dataset, which you can export as JSON, CSV or Excel or read over the API. These are the main fields:
| Field | Example | Meaning |
|---|---|---|
text | That's our jam... | Full tweet text |
createdAt | 2026-10-22T19:53:39.000Z | When the tweet was posted (UTC) |
likes, retweets, replies | 3070, 506, 209 | Engagement counts |
views | 535595 | View count, or null when X shows none |
author.username | NASA | Handle of the author, with followers and verified flags alongside |
media | [{ type: photo, url }] | Photos and videos, with video links |
source, input | profile, nasa | Which input produced the row |
Pricing
This Actor is pay per event, with one price for every Apify plan, the free plan included. Prices are per 1,000 events.
| Event | What is charged | Price per 1,000 |
|---|---|---|
| Tweet | One tweet from a search, profile or replies (duplicates, filtered and empty results are free). | $0.25 |
| Tweet by link | One tweet fetched by its link or ID. | $2.00 |
| Follower or following | One account from a followers or following list. | $0.25 |
No run start fee. Prices come from the Apify Store and can change; the Actor's Apify page always shows the current ones. Platform usage is billed through your Apify account.
Run it from code
Create an API token in Apify Console (Settings, API and Integrations) and replace YOUR_APIFY_TOKEN. This call starts a run with a small input and returns the rows when it finishes. Synchronous calls suit small inputs; for big jobs, start a run and read the dataset later.
curl
curl -X POST "https://api.apify.com/v2/acts/apisamurai~x-twitter-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchTerms": [
"openai"
],
"maxItems": 20
}'Python (pip install apify-client)
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"searchTerms": ["openai"],
"maxItems": 20,
}
# Start the Actor and wait for it to finish.
run = client.actor("apisamurai/x-twitter-scraper").call(run_input=run_input)
# Read the results from the run's default dataset.
items = client.dataset(run.default_dataset_id).list_items().items
for item in items:
print(item)JavaScript (npm install apify-client)
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const input = {
searchTerms: ['openai'],
maxItems: 20,
};
// Start the Actor and wait for it to finish.
const run = await client.actor('apisamurai/x-twitter-scraper').call(input);
// Read the results from the run's default dataset.
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);Client calls follow the Python and JavaScript client docs. The full input reference is on the Actor's Apify page.
FAQ
- Do I need an X account or API key?
- No. You only need an Apify account, and you never enter X credentials.
- How many tweets can I get?
- Up to 1,000,000 rows per input item on paid Apify plans and up to 100 results per run on the free plan. Profile timelines only reach back about 3,200 tweets, so for older history search from:handle with a date range.
- What is not charged?
- Duplicates, tweets skipped by your dates or filters, placeholder rows from the data source and empty runs. There is no start fee and no per-run fee.
- Why did I get fewer tweets than I asked for?
- Each run writes a SUMMARY record that says, per input, why it stopped: no more results, rows skipped by filters, duplicates, the spending limit or the free plan limit.
- Where do I report a problem?
- Email hello@apisamurai.com, or open an issue on the Actor's Apify page.