# Twitter Tweets Scraper - Account Timelines (`toolzerhub/twitter-tweets-scraper`) Actor

Export the tweets of any public Twitter (X) account, newest first. Add several handles, include or skip replies, and cap the total. Every row has the text, time, likes, reposts, replies, views, media and any quoted or reposted tweet.

- **URL**: https://apify.com/toolzerhub/twitter-tweets-scraper.md
- **Developed by:** [ToolzerHub](https://apify.com/toolzerhub) (community)
- **Categories:** Social media, Automation, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.08 / 1,000 results

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

## Twitter Tweets Scraper — Account Timelines

Export the tweets of any public Twitter (X) account, newest first. Add several handles, include or skip the replies an account wrote, and set a cap. Every row has the text, time, counters, media and — for a repost or quote — the original tweet.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| **`handles`** | list of text | — | **Required.** Handles, with or without the @, or profile links, mixed freely. |
| **`includeReplies`** | boolean | `false` | Also saves the replies the account wrote. They arrive in time order with its own tweets. |
| **`maxItems`** | integer | `100` | Caps the whole run, across every handle. `0` means no limit. |

```json
{
  "handles": ["elonmusk"],
  "includeReplies": false,
  "maxItems": 100
}
```

Handles run in the order you list them. If `maxItems` is 100 and the first account has more than that, the rest are never reached — raise the cap or run them separately.

### Output

One row per tweet.

| Field | What it holds |
|---|---|
| **`id`**, **`url`** | The tweet's ID and its link on x.com |
| **`text`**, **`lang`**, **`created_at`** | What it says, the language X detected, and when it went out |
| **`like_count`**, **`reply_count`**, **`repost_count`**, **`quote_count`**, **`bookmark_count`**, **`view_count`** | The six counters |
| **`is_reply`**, **`in_reply_to_post_id`**, **`in_reply_to_handle`**, **`conversation_id`** | Thread position |
| **`is_pinned`** | `true` on the account's pinned tweet |
| **`author_handle`**, **`author_name`**, **`author_id`**, **`author_followers_count`**, **`author_is_blue_verified`**, **`author`** | The author, flattened, and as a full record |
| **`media`**, **`hashtags`**, **`mentions`**, **`urls`**, **`card`**, **`article`**, **`place`** | Attachments and entities |
| **`quoted_post`**, **`reposted_post`** | The tweet it quotes, or the original it reposts |
| **`input_handle`** | The handle you gave, reduced to the bare handle |

```json
{
  "id": "2110988635264950570",
  "url": "https://x.com/elonmusk/status/2110988635264950570",
  "text": "RT @Tesla: Holy smokes https://t.co/rTnRobllwc",
  "lang": "en",
  "source": "Twitter for iPhone",
  "created_at": "2026-10-16T06:58:05.000Z",
  "like_count": 14929,
  "reply_count": 574,
  "repost_count": 1579,
  "quote_count": 476,
  "view_count": 579889,
  "bookmark_count": 691,
  "is_reply": false,
  "in_reply_to_post_id": null,
  "in_reply_to_user_id": null,
  "in_reply_to_handle": null,
  "conversation_id": "2110988635264950570",
  "is_pinned": null,
  "hashtags": [],
  "author_id": "44196397",
  "author_handle": "elonmusk",
  "author_name": "Elon Musk",
  "author_followers_count": 241485286,
  "author_is_blue_verified": true,
  "input_handle": "elonmusk"
}
```

Nested fields are cut from this example for length.

### Pricing

You pay for each tweet saved. A tweet that is skipped is never charged.

| Plan | Per 1,000 tweets |
|---|---|
| Free | $2.00 |
| Bronze | $1.69 |
| Silver | $1.38 |
| Gold and above | $1.08 |

Each run also carries a $0.00005 start charge. The Free plan covers the first 50 rows you save with this Actor; after that you need a paid plan.

### Questions

**Where is the pinned tweet?**
It comes first, once, with `is_pinned` set. The rest follow newest first. If the pinned tweet also appears further down the feed, it is saved only once.

**This row's `text` starts with "RT @". Where is the real text?**
Reposts keep X's shortened text. The original, in full and with its own author and counters, is in `reposted_post`.

**Does `includeReplies` change the count?**
Yes, upwards. Replies are tweets too, and each one is a billed row. Leave it off when you only want what the account chose to broadcast.

**Why did the run stop before `maxItems`?**
It ends when X stops returning pages for that account, or returns an empty one. If you need further back than a timeline reaches, use the [Twitter Scraper](https://apify.com/toolzerhub/twitter-scraper) with `from:handle` and a `since:`/`until:` window for each stretch of time.

**What if an account is missing or private?**
A handle that does not resolve gives no rows and no charge, and the log names it. The other handles carry on. An account that limits its posts to approved followers may come back empty.

**Can I collect several accounts into one dataset and still tell them apart?**
Yes. `input_handle` is on every row.

### Related Actors

| Actor | Use it when |
|---|---|
| [Twitter Profile Scraper](https://apify.com/toolzerhub/twitter-profile-scraper) | You need the account itself — bio, counts, join date |
| [Twitter Comments Scraper](https://apify.com/toolzerhub/twitter-comments-scraper) | You want the replies under one of these tweets |
| [Twitter Scraper](https://apify.com/toolzerhub/twitter-scraper) | You want to search across accounts instead of walking one |

### Support

Questions, bugs, or feature requests: **contact@toolzerhub.com**

Browse the rest: [apify.com/toolzerhub](https://apify.com/toolzerhub)

# Actor input Schema

## `handles` (type: `array`):

One or more accounts. A handle (`openai`), an @handle (`@openai`) or a profile link (`https://x.com/openai`) all work, and one list can mix them.

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

Also save the replies this account wrote, not only its own posts.

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

Most rows to save in this run, across everything in the list. Set 0 for no limit.

## Actor input object example

```json
{
  "handles": [
    "openai"
  ],
  "includeReplies": false,
  "maxItems": 50
}
```

# Actor output Schema

## `dataset` (type: `string`):

Every record collected during this run

# 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 = {
    "handles": [
        "openai"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("toolzerhub/twitter-tweets-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 = {
    "handles": ["openai"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("toolzerhub/twitter-tweets-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 '{
  "handles": [
    "openai"
  ],
  "maxItems": 50
}' |
apify call toolzerhub/twitter-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,toolzerhub/twitter-tweets-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/K4dY7hwlr4Fdcik06/builds/OSd5ljkdhEKKTn3tt/openapi.json
