# X (Twitter) Tweet Scraper: $0.20 per 1,000 Tweets (`rowfinch/x-tweet-scraper`) Actor

Scrape X (Twitter) tweets by search, account or link: full text, likes, reposts, replies, views, hashtags and media, with each tweet's replies and account profiles. No login. $0.20 per 1,000 tweets.

- **URL**: https://apify.com/rowfinch/x-tweet-scraper.md
- **Developed by:** [Rowfinch](https://apify.com/rowfinch) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 9 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / 1,000 tweets

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## X (Twitter) Tweet Scraper

Get X (Twitter) tweets by search, by account or by link: the full text, likes, reposts, replies, quotes, views, hashtags, links and media, with the author's name, followers and verification. Add each tweet's replies, accounts' profiles, or both. No login.

**$0.20 per 1,000 tweets on Apify's Starter plan, less on bigger plans.**

The input and output names match the most used X tweet scraper's, so its users can switch without changing code.

### What it's for

- **Brand and market research**: what people say about a brand, a product or a competitor, tweet by tweet, with the replies under them.
- **Social listening**: a search's new tweets on a schedule, with the newest first.
- **Account analysis**: an account's tweets and its profile in one table.
- **Research and AI**: tweet text with dates, counts and links, ready for sentiment, classification or RAG.

### Input

| Field                                                                                       | What it does                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `searchTerms`                                                                               | Search terms, one per line. X's search operators work: `from:NASA`, `min_faves:500`, `since:2026-11-01`                                                                      |
| `twitterHandles`                                                                            | Usernames, `@names` or profile links (`x.com/…`), one per line                                                                                                               |
| `startUrls`                                                                                 | X links, one per line: profiles, tweets (`x.com/…/status/…`), or search pages (`x.com/search?q=…`)                                                                           |
| `maxItems`                                                                                  | Most rows in the run (tweets, replies and profiles), across all searches, accounts and links (empty or 0: no total, and 100 per search or account unless `maxTweets` is set) |
| `sort`                                                                                      | `Latest` (newest first), `Top` (ranked by engagement) or `Latest + Top` (both tabs, each tweet saved once)                                                                   |
| `tweetLanguage`                                                                             | ISO 639-1 code, like `en` or `pt`                                                                                                                                            |
| `onlyVerifiedUsers`, `onlyTwitterBlue`                                                      | Only tweets by verified users, or by Twitter Blue subscribers                                                                                                                |
| `onlyImage`, `onlyVideo`, `onlyQuote`                                                       | Only tweets with photos, with videos, or quote tweets                                                                                                                        |
| `minimumFavorites`, `minimumRetweets`, `minimumReplies`                                     | Only tweets with at least this many likes, retweets or replies                                                                                                               |
| `author`, `mentioning`                                                                      | Only tweets sent by, or mentioning, this username                                                                                                                            |
| `start`, `end`                                                                              | Tweets from this day, and before this day (`YYYY-MM-DD`; an ISO datetime keeps its day). Accounts are read by search when these are set                                      |
| `inReplyTo`, `conversationIds`, `geocode`, `placeObjectId`, `geotaggedNear`, `withinRadius` | Searches only: replies to a username, one search per conversation ID, or tweets by place and radius (see below)                                                              |
| `maxTweets`                                                                                 | Tweets per search term or account, newest first (default: `maxItems`, or 100; 0 returns the accounts' profiles alone)                                                        |
| `includeProfiles`                                                                           | Adds one profile row per account                                                                                                                                             |
| `includeReplies`                                                                            | Adds the replies under each tweet, as X's thread returns them (default off)                                                                                                  |
| `maxReplies`                                                                                | Replies per tweet (default 20)                                                                                                                                               |

A search sends each filter to X as a search operator. Accounts and links get the same filters checked on each tweet they give, for `tweetLanguage`, the `only…` flags, the minimums, `author` and `mentioning`. `start` or `end` read an account through one Latest search for `from:<account>` with every filter, since X applies dates to searches only, so `sort` doesn't apply to it. Without a date, an account's timeline doesn't get `inReplyTo`, `conversationIds` or the location filters, and a tweet link gets none of the search-only filters; a run's log names the ones skipped. With only `author`, `mentioning` or `inReplyTo` set, the filters alone become the search. `customMapFunction` and the connector and delivery fields are not read: a run names them in its log and carries on.

A timeline read ends after 5 pages in a row with no matching tweet.

### Output

One row per tweet, with the reply rows among them (`isReply` is true):

```json
{
  "type": "tweet",
  "id": "2120216592395174382",
  "url": "https://x.com/OpenAI/status/2120216592395174382",
  "twitterUrl": "https://twitter.com/OpenAI/status/2120216592395174382",
  "text": "Now in beta: Businesses in ChatGPT. Claim your business, manage your information…",
  "retweetCount": 1443,
  "replyCount": 1472,
  "likeCount": 17778,
  "quoteCount": 1558,
  "viewCount": 6145450,
  "bookmarkCount": 19210,
  "createdAt": "Tue Nov 10 18:06:42 +0000 2026",
  "lang": "en",
  "quoteId": null,
  "inReplyToId": null,
  "conversationId": "2120216592395174382",
  "isReply": false,
  "isRetweet": false,
  "isQuote": false,
  "author": {
    "type": "user",
    "userName": "OpenAI",
    "url": "https://x.com/OpenAI",
    "twitterUrl": "https://twitter.com/OpenAI",
    "id": "4398626122",
    "name": "OpenAI",
    "isVerified": false,
    "isBlueVerified": true,
    "verifiedType": "Business",
    "profilePicture": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg",
    "description": null,
    "location": null,
    "followers": 5539622,
    "following": null
  },
  "retweetOfId": null,
  "media": [
    {
      "type": "video",
      "url": "https://video.twimg.com/amplify_video/…/vyZP9JTfX10iThi9.mp4?tag=29"
    }
  ],
  "hashtags": [],
  "mentions": [],
  "links": ["https://openai.com/index/introducing-businesses-chatgpt/"],
  "input": "openai",
  "scrapedAt": "2026-11-15T10:00:00Z"
}
```

`input` is the search term, account or link that found the tweet. A retweet has X's short retweet text in `text`, and the tweet it shares in `retweetOfId`. A quote tweet names the tweet it quotes in `quoteId`. A reply names the tweet it answers in `inReplyToId`, and X leaves out the follower count on replies, so `author.followers` is null there. X's blue check reads as `isBlueVerified` on a search row, so `isVerified` is false there.

With `includeProfiles`, one row per account, with the author's fields:

```json
{
  "type": "profile",
  "id": "4398626122",
  "userName": "OpenAI",
  "url": "https://x.com/OpenAI",
  "twitterUrl": "https://twitter.com/OpenAI",
  "name": "OpenAI",
  "isVerified": false,
  "isBlueVerified": true,
  "verifiedType": null,
  "profilePicture": "https://pbs.twimg.com/profile_images/1885410181409820672/ztsaR0JW_normal.jpg",
  "description": "OpenAI's mission is to ensure that artificial general intelligence benefits all of humanity…",
  "location": null,
  "followers": 5539577,
  "following": 4,
  "tweetsCount": 2241,
  "website": "https://openai.com",
  "createdAt": "Sun Dec 06 22:51:08 +0000 2015",
  "input": "openai",
  "scrapedAt": "2026-11-15T10:00:00Z"
}
```

Accounts and links that can't be read get a row with the reason, free of charge:

```json
{ "input": "nobody", "error": "Not found" }
```

### Price

Per 1,000, by your Apify plan:

|                    | Free  | Starter | Scale | Business |
| ------------------ | ----- | ------- | ----- | -------- |
| Tweets and replies | $0.25 | $0.20   | $0.17 | $0.15    |
| Profiles           | $2.00 | $1.80   | $1.60 | $1.50    |

- **$0.0025 per search term, account or link** that returns results
- **$0.0015 per tweet** whose replies you get
- Accounts, tweets and links that can't be read: free

| Run, on Starter                             | Cost  |
| ------------------------------------------- | ----- |
| 1,000 tweets for a search                   | $0.20 |
| 10 accounts, 200 tweets each, with profiles | $0.44 |
| 100 tweets with 20 replies each             | $0.57 |
| 50 tweet links                              | $0.14 |

A run stops at the maximum cost you set for it. On Apify's free plan, a run returns up to 25 results. The free plan includes 5 runs of this actor a month.

### FAQ

**Do I need an X account?**
No. It reads what X shows anyone, with no login.

**Why is a retweet's text cut short?**
That is the text X gives for the retweet itself. The tweet it shares is in `retweetOfId`; add its link to `startUrls` to get its full text.

# Actor input Schema

## `startUrls` (type: `array`):

X links: profiles, tweets, or search pages (x.com/search?q=…). One per line.

## `searchTerms` (type: `array`):

X search works too: from:NASA, min_faves:500, since:2026-11-01. One per line.

## `twitterHandles` (type: `array`):

Usernames, @names or profile links, one per line.

## `maxItems` (type: `integer`):

Most rows in the run: tweets, replies and profiles, across all searches, accounts and links. Empty or 0 sets no total: each search or account then gives 100, or Tweets per search or account when that is set.

## `sort` (type: `string`):

Top ranks by engagement. Latest + Top reads both tabs, and each tweet is saved once.

## `tweetLanguage` (type: `string`):

ISO 639-1 code, like en or pt.

## `onlyVerifiedUsers` (type: `boolean`):

Accounts with any verified badge.

## `onlyTwitterBlue` (type: `boolean`):

Accounts with a paid X Premium badge.

## `onlyImage` (type: `boolean`):

Tweets with at least one image.

## `onlyVideo` (type: `boolean`):

Tweets with a video.

## `onlyQuote` (type: `boolean`):

Tweets that quote another tweet.

## `minimumFavorites` (type: `integer`):

Only tweets with at least this many likes.

## `minimumRetweets` (type: `integer`):

Only tweets with at least this many retweets.

## `minimumReplies` (type: `integer`):

Only tweets with at least this many replies.

## `author` (type: `string`):

Only tweets sent by this username.

## `mentioning` (type: `string`):

Only tweets mentioning this username.

## `start` (type: `string`):

Tweets on or after this day. Accounts are read by search when set.

## `end` (type: `string`):

Tweets before this day. Accounts are read by search when set.

## `inReplyTo` (type: `string`):

Searches only: replies to this username.

## `conversationIds` (type: `array`):

Searches only: each tweet ID's conversation, one search per ID.

## `geocode` (type: `string`):

Searches only: tweets within a radius, as latitude,longitude,radius, like 37.78,-122.4,10km.

## `placeObjectId` (type: `string`):

Searches only: tweets tagged with this place ID.

## `geotaggedNear` (type: `string`):

Searches only: tweets sent near this place, like New York.

## `withinRadius` (type: `string`):

Searches only: tweets sent within this radius of the place, like 15km.

## `maxTweets` (type: `integer`):

Newest first. Empty uses the maximum above, or 100 when that is empty or 0. 0 returns the accounts' profiles alone.

## `includeProfiles` (type: `boolean`):

One row per account.

## `includeReplies` (type: `boolean`):

The replies under each tweet, as X's thread returns them.

## `maxReplies` (type: `integer`):

0 leaves replies out.

## Actor input object example

```json
{
  "searchTerms": [
    "openai"
  ],
  "maxItems": 1000,
  "sort": "Latest",
  "onlyVerifiedUsers": false,
  "onlyTwitterBlue": false,
  "onlyImage": false,
  "onlyVideo": false,
  "onlyQuote": false,
  "includeProfiles": false,
  "includeReplies": false,
  "maxReplies": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `profiles` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerms": [
        "openai"
    ],
    "maxItems": 1000,
    "sort": "Latest"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfinch/x-tweet-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerms": ["openai"],
    "maxItems": 1000,
    "sort": "Latest",
}

# Run the Actor and wait for it to finish
run = client.actor("rowfinch/x-tweet-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "openai"
  ],
  "maxItems": 1000,
  "sort": "Latest"
}' |
apify call rowfinch/x-tweet-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowfinch/x-tweet-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/B3BkdczuflPxW5whl/builds/Myu9mxskEsamWNo2V/openapi.json
