# Twitter Tweets Scraper (`gentle_cloud/twitter-tweets-scraper`) Actor

Enter the X URL to quickly collect the latest tweet data. Based on the X search interface, with countless quantity and time constraints, the tweet results are sorted in reverse chronological order.

- **URL**: https://apify.com/gentle_cloud/twitter-tweets-scraper.md
- **Developed by:** [Monkey Coder](https://apify.com/gentle_cloud) (community)
- **Categories:** Social media, News, Developer tools
- **Features:** Full permissions, Single-tenant, Server interface
- **Stats:** 4,889 total users, 91 monthly users, 99.9% runs succeeded, 135 bookmarks
- **User rating**: 4.97 out of 5 stars

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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/X Monitoring Scraper

Monitor Twitter/X accounts and collect the latest tweets in reverse chronological order.

This Actor is built for teams that need structured Twitter/X data for ongoing monitoring, research, and downstream analytics — without maintaining their own fragile scraping pipeline.

### Why use this Actor

- Monitor one or many Twitter/X accounts in a single run
- Collect structured tweet data with engagement metrics, media, entities, and author details
- Export results to JSON, CSV, Excel, HTML, or integrate them into your own workflow
- Save engineering time by using a maintained Twitter/X monitoring actor instead of building your own stack

### Best use cases

- **Brand monitoring** — Track official brand accounts, competitor brands, and public reactions over time
- **Competitor tracking** — Watch how competitors publish and what gets engagement
- **KOL / creator monitoring** — Follow founders, journalists, analysts, creators, and niche experts
- **Crypto and market intelligence** — Track token projects, exchanges, researchers, and security accounts
- **News discovery** — Watch fast-moving accounts and collect latest tweets for newsroom workflows
- **Research pipelines** — Build structured tweet datasets for analysis, reporting, and alerting

### How it works

1. Add one or more Twitter/X profile URLs
2. Set a `since_date` to control how far back the monitoring window should go
3. Set the number of results you want to collect
4. Run the Actor
5. Export the dataset or connect it to your downstream workflow

### Input

| Field | Type | Description |
|---|---|---|
| `start_urls` | Array | One or more Twitter/X profile URLs |
| `since_date` | String | Earliest date to collect from, in `YYYY-MM-DD` format |
| `result_count` | String | Maximum number of tweet results to return |

#### Example input

```json
{
  "start_urls": [
    { "url": "https://x.com/elonmusk" },
    { "url": "https://x.com/peckshield" }
  ],
  "since_date": "2026-04-01",
  "result_count": "50"
}
```

### What this Actor returns

The dataset focuses on the fields most useful for monitoring and analysis:

- `full_text`
- `created_at`
- `favorite_count`
- `retweet_count`
- `reply_count`
- `quote_count`
- `views_count`
- `url`
- `user.name`
- `user.screen_name`

It also includes media/entities when present, so you can use the same dataset for both alerting and richer analysis.

### Verification and trust

What you can verify after a run:

- Tweets are returned in reverse chronological order
- Multiple Twitter/X accounts can be monitored in one run
- Output contains structured engagement metrics and author metadata
- Results are exported through the standard Apify dataset

#### Known limitations

- This Actor is intended for public Twitter/X timeline monitoring, not protected/private content
- Very large runs may take longer because Twitter/X access is a high-friction environment
- Large result counts can be affected by rate limits or platform-side changes
- If no valid live results are available, fallback behavior may be triggered and should be interpreted accordingly

### Why the pricing is worth it

Twitter/X data collection is operationally fragile. Access patterns, anti-bot behavior, and extraction logic can change over time.

This Actor helps you avoid maintaining that stack yourself. Instead of building and maintaining your own Twitter/X monitoring pipeline, you get a maintained workflow that focuses on usable structured output.

### Sample output

```json
{
  "full_text": "New product launch this week.",
  "created_at": "Wed Mar 06 10:00:39 +0000 2024",
  "favorite_count": 124,
  "retweet_count": 34,
  "reply_count": 11,
  "quote_count": 2,
  "views_count": "160",
  "url": "https://twitter.com/example/status/1765316555607511292",
  "user": {
    "name": "Example Account",
    "screen_name": "example"
  }
}
```

### Feedback

If this Actor saves you time, please leave a rating on Apify Store. Feedback helps prioritize fixes, upgrades, and new monitoring features.

### Related Actors

- [youtube-user-channel-scraper](https://apify.com/gentle_cloud/youtube-user-channel-scraper)
- [tiktok-videos-watermark-free-scraper](https://apify.com/gentle_cloud/tiktok-videos-watermark-free-scraper)

### Maintenance

This Actor is actively maintained to preserve monitoring reliability and structured output quality over time.

# Actor input Schema

## `start_urls` (type: `array`):

Paste the X urls

## `since_date` (type: `string`):

Start date of tweet collection, default to yesterday

## `result_count` (type: `string`):

result count limit, default to 10,

## Actor input object example

```json
{
  "start_urls": [
    {
      "url": "https://x.com/peckshield"
    }
  ],
  "since_date": "2024-03-05",
  "result_count": "10"
}
```

# 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 = {
    "start_urls": [
        {
            "url": "https://x.com/peckshield"
        }
    ],
    "since_date": "2024-03-05",
    "result_count": "10"
};

// Run the Actor and wait for it to finish
const run = await client.actor("gentle_cloud/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 = {
    "start_urls": [{ "url": "https://x.com/peckshield" }],
    "since_date": "2024-03-05",
    "result_count": "10",
}

# Run the Actor and wait for it to finish
run = client.actor("gentle_cloud/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 '{
  "start_urls": [
    {
      "url": "https://x.com/peckshield"
    }
  ],
  "since_date": "2024-03-05",
  "result_count": "10"
}' |
apify call gentle_cloud/twitter-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gentle_cloud/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/2dZb9qNraqcbL8CXP/builds/saNcfzApeBasVmF3x/openapi.json
