# Twitter (X) Scraper - Tweets, Profiles & Monitor (`scrapesage/twitter-scraper`) Actor

Scrape Twitter / X tweets and profiles by handle or tweet URL — no login, no cookies, no API key. Full tweet text, likes, replies, retweets, views, media, hashtags, mentions, quoted tweets and complete profiles. Monitor mode pulls only new tweets. Export to CSV/JSON/Excel.

- **URL**: https://apify.com/scrapesage/twitter-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Social media, AI, Lead generation
- **Stats:** 34 total users, 16 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 tweet scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Twitter / X Scraper — Tweets & Profiles (No Login, No API Key)

Scrape **Twitter / X** the reliable way — by **handle** or **tweet URL** — with **no login, no cookies, and no API key**. Get full tweet text, **likes, retweets, replies, quotes and view counts**, media (photos & video URLs), hashtags, mentions, links and quoted-tweet context, plus **complete profiles** (followers, following, bio, verification, location, website, join date). Turn on **monitor mode** to pull only new tweets on each run.

Built on X's own public syndication data — the same source that powers embedded tweets across the web — so it keeps working when cookie-based and guest-token scrapers break.

### Why this Twitter / X scraper?

X removed cheap API access and aggressively rate-limits its logged-out site, so most scrapers rely on **auth cookies** (which get throttled or banned) or **fragile guest-token GraphQL** calls (whose query IDs rotate and break). This actor reads X's stable public syndication endpoints instead — **no credentials, no breakage**.

| | Cookie / token scrapers | This actor |
|---|---|---|
| Login / cookies required | ⚠️ usually | ✅ never |
| API key required | ⚠️ sometimes | ✅ never |
| Breaks when X rotates tokens / bans cookies | ❌ often | ✅ stable source |
| Full tweet text, likes, retweets, replies | ✅ | ✅ |
| View counts (when X exposes them) | partial | ✅ |
| Media (photo + video URLs), hashtags, mentions, links | partial | ✅ |
| Quoted-tweet context | ❌ | ✅ |
| Full profile (followers, bio, verified, joined…) | partial | ✅ |
| Monitor mode — only **new** tweets | ❌ | ✅ |
| Start fee | 💲 common | **$0 — never** |

### Use cases

- **Brand & competitor monitoring** — track specific accounts and get only their **new tweets** each run (monitor mode) for engagement, launches and announcements.
- **Social listening & sentiment** — pull recent tweets and metrics (likes, retweets, replies, views) for known handles to feed dashboards or LLMs.
- **Tweet lookup & archiving** — paste any tweet URL to capture its full data (text, media, metrics, author, quoted tweet) for research, embedding or compliance.
- **Influencer & lead research** — profile data (followers, bio, website, verification) to qualify creators, brands and prospects.
- **LLM / AI pipelines** — clean, structured JSON ready for summarization, classification and RAG.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **Twitter / X Scraper**, add one or more **handles** (e.g. `NASA`) and/or **tweet URLs**, and click **Start**.
3. Watch tweets and profiles stream into the dataset table (switch between the **Tweets** and **Profiles** views).
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "handles": ["NASA", "Tesla"],
    "tweetUrls": ["https://x.com/NASA/status/2068333045510291908"],
    "includeProfile": true,
    "includeTweets": true,
    "includeReplies": false,
    "maxTweetsPerProfile": 20,
    "onlyTweetsNewerThan": "7 days",
    "monitorMode": false
}
```

- **handles** — usernames (with/without `@`) or profile URLs. Each returns the profile + recent tweets.
- **tweetUrls** — individual tweet (status) URLs or numeric IDs → full tweet data.
- **startUrls** — any mix of profile/tweet URLs (auto-detected).
- **includeProfile / includeTweets** *(default true)* — choose profile records, tweets, or both.
- **includeReplies** *(default false)* — include the account's replies in its timeline.
- **maxTweetsPerProfile** *(default 20)* — X's public timeline exposes roughly the latest 20 tweets per profile.
- **onlyTweetsNewerThan** — `"7 days"`, `"24 hours"`, `"3 months"`, or an ISO date.
- **monitorMode** *(default false)* — only new tweets / changed profiles (see below).

### Output

One record per tweet (`type: "tweet"`) and one per profile (`type: "profile"`):

```json
{
    "type": "tweet",
    "id": "2068333045510291908",
    "url": "https://x.com/NASA/status/2068333045510291908",
    "text": "The official FIFA World Cup ball went to space! …",
    "createdAt": "2026-06-20T14:00:00.000Z",
    "lang": "en",
    "favoriteCount": 24314,
    "retweetCount": 3120,
    "replyCount": 982,
    "quoteCount": 145,
    "viewCount": 4200000,
    "isReply": false,
    "isQuote": false,
    "hashtags": [],
    "mentions": [],
    "links": [],
    "media": [{ "type": "photo", "url": "https://pbs.twimg.com/media/….jpg" }],
    "mediaCount": 1,
    "authorHandle": "NASA",
    "authorName": "NASA",
    "authorVerified": true,
    "authorFollowers": 92134498,
    "source": "twitter",
    "scrapedAt": "2026-06-23T16:00:00.000Z"
}
```

```json
{
    "type": "profile",
    "handle": "NASA",
    "url": "https://x.com/NASA",
    "name": "NASA",
    "bio": "Making the seemingly impossible, possible. ✨",
    "followersCount": 92134498,
    "followingCount": 119,
    "tweetsCount": 74138,
    "verified": true,
    "isBlueVerified": true,
    "location": "",
    "website": "https://t.co/9NkQJKAVks",
    "createdAt": "2007-12-19T20:20:32.000Z",
    "profileImageUrl": "https://pbs.twimg.com/profile_images/….jpg"
}
```

Empty fields are omitted, so CSV/Excel exports have no always-blank columns.

### Monitor mode — only new tweets

Turn on **monitorMode** and the actor remembers every tweet it has emitted (by ID) and every profile's follower/tweet counts. On the next run it returns **only new tweets** (and profiles whose counts changed, tagged `monitorStatus`). This runs **independently of [Apify Schedules](https://docs.apify.com/platform/schedules)** — schedule the actor hourly/daily and each run delivers a clean diff, ideal for account-tracking and new-tweet alerts. Use distinct `monitorStoreName` values to track separate account sets.

### Automate & schedule

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it with `monitorMode` to watch accounts for new tweets.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger CRM, Slack or email actions when a run finishes.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/twitter-scraper').call({
    handles: ['NASA', 'Tesla'],
    maxTweetsPerProfile: 20,
    monitorMode: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} tweets & profiles`);
```

### Integrate with any app

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new tweets into Sheets, Slack or your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored account tweets.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework via the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — e.g. "get NASA's latest tweets and summarize the engagement."

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **social & web data stack**:

- **[Reddit Scraper](https://apify.com/scrapesage/reddit-scraper)** — posts, comments, subreddits & users.
- **[YouTube Scraper](https://apify.com/scrapesage/youtube-scraper)** — videos, channels & metadata.
- **[Threads Scraper](https://apify.com/scrapesage/threads-scraper)** — posts & profiles from Threads.
- **[Bluesky Scraper](https://apify.com/scrapesage/bluesky-scraper)** — posts & profiles from Bluesky.
- **[Telegram Scraper](https://apify.com/scrapesage/telegram-scraper)** — public channel messages.
- **[Substack Scraper](https://apify.com/scrapesage/substack-scraper)** — newsletters, posts & authors.
- **[Google News Scraper](https://apify.com/scrapesage/google-news-scraper)** — news articles by topic.
- **[Website Contact Scraper](https://apify.com/scrapesage/website-contact-scraper)** — emails, phones & socials from any site.

### Tips

- **Recent tweets**: the actor fetches and merges several public timeline windows per account to assemble its recent tweets (typically ~20–50, depending on how active the account is), capped by `maxTweetsPerProfile`. It does not do keyword search or full historical backfill (those require logged-in scraping, which breaks).
- **Track accounts cheaply**: combine `monitorMode` with a daily [Schedule](https://docs.apify.com/platform/schedules) to collect each account's new tweets over time.
- **Protected / suspended accounts** return no data — those tweets/profiles are simply skipped.
- **View counts** are included when X exposes them (most often on individual tweets fetched by URL); they can be absent on older timeline tweets.
- **Proxies**: the default Apify Proxy is fine; no residential proxy is required.

### FAQ

**Do I need a Twitter/X account, cookies, or an API key?** No. The actor reads X's public syndication data — no login, no cookies, no key.

**Can I search tweets by keyword?** No. This scraper targets specific handles and tweet URLs (the reliable public path). Keyword search requires a logged-in session, which is fragile.

**How many tweets per profile?** The actor merges several public timeline windows to assemble the account's recent tweets — typically ~20–50 depending on activity, capped by `maxTweetsPerProfile`. Use `monitorMode` + a schedule to accumulate more over time.

**How do I get a single tweet's data?** Put its URL (or numeric ID) in `tweetUrls` — you'll get the full tweet including media, metrics, views and author.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**Is scraping Twitter/X legal?** This actor collects publicly available data only. You are responsible for using the data in compliance with applicable laws (e.g. GDPR/CCPA for personal data) and X's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Twitter / X usernames to scrape (with or without @, or full profile URLs). Each returns the full profile plus its most recent tweets.

## `tweetUrls` (type: `array`):

Individual tweet (status) URLs or numeric tweet IDs — each returns the full tweet (text, metrics, views, media, author, quoted tweet).

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

Any mix of X/Twitter profile or tweet URLs — the actor auto-detects each.

## `includeProfile` (type: `boolean`):

Emit one profile record per handle (name, bio, followers, following, tweet count, verified, location, website, created date, avatar).

## `includeTweets` (type: `boolean`):

Emit the recent tweets for each handle.

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

Include the account's replies in its timeline (off = original tweets & retweets only).

## `maxTweetsPerProfile` (type: `integer`):

Cap recent tweets returned per handle. The actor merges several public timeline windows to assemble an account's recent tweets (typically ~20-50 depending on activity).

## `onlyTweetsNewerThan` (type: `string`):

Keep only tweets newer than this. Accepts a relative window like "7 days", "24 hours", "3 months", or an ISO date (2026-06-01). Leave empty for no date filter.

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

Maximum total records (tweets + profiles) across the run. 0 = no limit.

## `deduplicateResults` (type: `boolean`):

Skip duplicate tweets/profiles within a run.

## `monitorMode` (type: `boolean`):

Remember tweets across runs and emit only NEW tweets (and profiles whose follower/tweet counts changed, tagged monitorStatus). Works independently of Apify Schedules — schedule the actor and each run returns only what's new. Perfect for tracking accounts.

## `monitorStoreName` (type: `string`):

Named key-value store that remembers seen tweets between runs. Use distinct names to track different account sets separately. Lowercase letters, digits and hyphens only.

## `maxRunSeconds` (type: `integer`):

The run stops gracefully after this many seconds so scheduled runs never hit the platform timeout. Default 240s. Raise it for very large handle lists.

## `maxConcurrency` (type: `integer`):

Parallel requests.

## `proxyConfiguration` (type: `object`):

Proxy for requests. The default Apify Proxy spreads any per-IP rate limit; datacenter is enough (no residential needed).

## Actor input object example

```json
{
  "handles": [
    "NASA"
  ],
  "includeProfile": true,
  "includeTweets": true,
  "includeReplies": false,
  "maxTweetsPerProfile": 20,
  "onlyTweetsNewerThan": "",
  "maxItems": 0,
  "deduplicateResults": true,
  "monitorMode": false,
  "monitorStoreName": "twitter-scraper-monitor",
  "maxRunSeconds": 240,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

All scraped records in the default dataset — tweets with text, engagement, views, media and entities, plus profile records.

# 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": [
        "NASA"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/twitter-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": ["NASA"],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    "NASA"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapesage/twitter-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/twitter-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/FqR0b3b6K64iyiDHL/builds/ryoYglE2sgInahyWS/openapi.json
