# Tweet Scraper - X / Twitter, No Login, Cheapest (`dami_studio/tweet-scraper`) Actor

The cheapest no-login X/Twitter scraper on the store. No minimums, no item caps - just paste a handle, URL or search and run. Get full tweet text plus likes, retweets, replies, views, media and author. Failed runs cost nothing. Export to JSON, CSV or Excel. ~$0.13/1k.

- **URL**: https://apify.com/dami\_studio/tweet-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 tweet returneds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## ⚡ Tweet Scraper — X / Twitter Scraper (No Login, No API Key)

**Scrape X (Twitter) at scale without a login, an account, or an API key.** Pull tweets by **profile**, by **tweet URL**, or by **search query** and get back the full text plus every engagement metric — likes, retweets, replies, **views**, quotes and bookmarks — with author, media, hashtags and mentions. Export to **JSON, CSV or Excel**, hit it from the **API**, or have results delivered straight to **Notion**. **Just $0.30 per 1,000 tweets** — ideal for researchers, marketers, traders, and builders who need Twitter data *now*.

> No `sessionid`. No bearer token to find. No cookies to paste. Paste a handle and run.

### Why this scraper beats the rest

- 🔓 **Truly keyless** — uses X's public guest-token GraphQL API + the syndication CDN. You never supply credentials.
- 🛡️ **Self-healing** — X rotates its GraphQL feature flags constantly; this actor detects the change mid-run and repairs the request automatically, so it keeps working when other scrapers 400.
- 💸 **Cheaper** — $0.30 / 1,000 tweets, billed per tweet actually returned (no charge on empty/failed runs).
- 🧹 **Clean, flat output** — one tidy record per tweet, ready for spreadsheets, dashboards, or LLM pipelines. No raw nested soup.
- 🔁 **Auto-dedupe** — the same tweet is never returned (or charged) twice in a run.
- 📬 **Built-in delivery** — optionally push every run straight into **Notion** via Apify connectors, with zero extra code (most scrapers stop at the dataset).
- 🚦 **Honest errors** — if X blocks or rate-limits, you get a clear `errorCode` row instead of silent emptiness.

### What you can scrape

| Mode | Input | Reliability |
|---|---|---|
| **Profile timeline** | `twitterHandles` or a profile URL | ✅ Fully keyless, most reliable |
| **Single tweet** | a `…/status/123` URL | ✅ Rock-solid (syndication CDN) |
| **Replies timeline** | profile + `includeReplies` | ✅ Keyless |
| **Search** | `searchTerms` (supports `from:`, `min_faves:`, `filter:media`, date ops) | ⚠️ Keyless search is rate-limited by X — use profiles/URLs for volume |

### Input

- **`twitterHandles`** — usernames to scrape recent tweets from (e.g. `nasa`, `elonmusk`).
- **`startUrls`** — profile URLs (timeline) or `status` URLs (single tweet).
- **`searchTerms`** — full X search queries + `sort` (Latest/Top).
- **`maxItems`** — cap the number of tweets (you pay per tweet).
- **`includeReplies`**, **`onlyVerifiedUsers`**, **`since`/`until`** — filters.
- **`proxyConfiguration`** — Residential recommended (datacenter IPs hit X's limits faster).
- **`notionConnector`** — optional, deliver results to Notion.

### Output (one record per tweet)

```json
{
  "id": "20",
  "url": "https://x.com/Twitter/status/20",
  "text": "just setting up my twttr",
  "createdAt": "Tue Mar 21 20:50:14 +0000 2006",
  "lang": "und",
  "replyCount": 1300,
  "retweetCount": 112000,
  "likeCount": 175000,
  "quoteCount": 8200,
  "viewCount": null,
  "hashtags": [], "mentions": [], "urls": [],
  "media": [],
  "author": {
    "id": "12", "userName": "jack", "name": "jack",
    "followersCount": 6400000, "verified": true, "isBlueVerified": true
  }
}
````

### Pricing

**$0.30 per 1,000 tweets** (pay-per-result). You are only charged for tweets actually returned — failed or empty runs cost nothing.

### FAQ

**Do I need a Twitter account or API key?** No. Profiles, timelines and individual tweets work entirely keyless.

**Is search reliable?** Keyless search is rate-limited by X. For large/steady volume, scrape by profile handle or tweet URL.

**Why residential proxy?** X rate-limits datacenter IP ranges quickly. Residential keeps success rates high on sustained runs.

**It returned an `errorCode` row — why?** That's the actor telling you exactly what happened (e.g. `RATE_LIMITED`, `BLOCKED`, `NOT_FOUND`) instead of failing silently. Retry, lower volume, or switch proxy country.

# Actor input Schema

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

X / Twitter usernames (with or without @) to scrape recent tweets from. The most reliable, fully keyless mode. Example: elonmusk, nasa.

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

Paste X/Twitter URLs directly — a profile URL (https://x.com/nasa) scrapes its timeline, a status URL (https://x.com/nasa/status/123) scrapes that single tweet via the stable syndication CDN.

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

Full X search queries (supports advanced operators like from:, since:, filter:media, min\_faves:). Note: keyless search is rate-limited by X and less reliable than profile/URL modes.

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

For search terms: newest tweets (Latest) or most relevant (Top).

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

Maximum number of tweets to collect across all inputs. You are charged per tweet returned.

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

For profile timelines: include the account's replies, not just top-level tweets.

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

Keep only tweets whose author is verified (legacy or X Premium / blue).

## `since` (type: `string`):

Only keep tweets on/after this date (YYYY-MM-DD).

## `until` (type: `string`):

Only keep tweets on/before this date (YYYY-MM-DD).

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

Proxy settings. Residential proxy is strongly recommended for sustained scraping (datacenter IPs get rate-limited by X faster).

## `notionConnector` (type: `string`):

Optional. If set, the tweets are also delivered to your connected Notion via Apify MCP connectors — no extra code. Leave empty to just use the dataset.

## `notionParentId` (type: `string`):

Optional Notion database/data-source id to create the pages in. If empty, pages are created privately in your workspace.

## Actor input object example

```json
{
  "twitterHandles": [
    "elonmusk",
    "nasa"
  ],
  "startUrls": [
    "https://x.com/nasa",
    "https://x.com/Twitter/status/20"
  ],
  "searchTerms": [
    "apify",
    "\"web scraping\" min_faves:50"
  ],
  "sort": "Latest",
  "maxItems": 100,
  "includeReplies": false,
  "onlyVerifiedUsers": false,
  "since": "2024-01-01",
  "until": "2024-12-31",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Scraped tweets are stored in the default dataset (one row per tweet). Blocked/empty/error runs return a single uncharged diagnostic row instead.

# 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 = {
    "twitterHandles": [
        "nasa"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/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 = { "twitterHandles": ["nasa"] }

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/tweet-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 '{
  "twitterHandles": [
    "nasa"
  ]
}' |
apify call dami_studio/tweet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tweet Scraper - X / Twitter, No Login, Cheapest",
        "description": "The cheapest no-login X/Twitter scraper on the store. No minimums, no item caps - just paste a handle, URL or search and run. Get full tweet text plus likes, retweets, replies, views, media and author. Failed runs cost nothing. Export to JSON, CSV or Excel. ~$0.13/1k.",
        "version": "0.1",
        "x-build-id": "uvcsYGNLEvlJCTKOU"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dami_studio~tweet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dami_studio-tweet-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dami_studio~tweet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dami_studio-tweet-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dami_studio~tweet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dami_studio-tweet-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "twitterHandles": {
                        "title": "Profile handles",
                        "type": "array",
                        "description": "X / Twitter usernames (with or without @) to scrape recent tweets from. The most reliable, fully keyless mode. Example: elonmusk, nasa.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs (profiles or tweets)",
                        "type": "array",
                        "description": "Paste X/Twitter URLs directly — a profile URL (https://x.com/nasa) scrapes its timeline, a status URL (https://x.com/nasa/status/123) scrapes that single tweet via the stable syndication CDN.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "Full X search queries (supports advanced operators like from:, since:, filter:media, min_faves:). Note: keyless search is rate-limited by X and less reliable than profile/URL modes.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "sort": {
                        "title": "Search sort",
                        "enum": [
                            "Latest",
                            "Top"
                        ],
                        "type": "string",
                        "description": "For search terms: newest tweets (Latest) or most relevant (Top).",
                        "default": "Latest"
                    },
                    "maxItems": {
                        "title": "Max tweets",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of tweets to collect across all inputs. You are charged per tweet returned.",
                        "default": 100
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "For profile timelines: include the account's replies, not just top-level tweets.",
                        "default": false
                    },
                    "onlyVerifiedUsers": {
                        "title": "Only verified authors",
                        "type": "boolean",
                        "description": "Keep only tweets whose author is verified (legacy or X Premium / blue).",
                        "default": false
                    },
                    "since": {
                        "title": "Since date",
                        "type": "string",
                        "description": "Only keep tweets on/after this date (YYYY-MM-DD)."
                    },
                    "until": {
                        "title": "Until date",
                        "type": "string",
                        "description": "Only keep tweets on/before this date (YYYY-MM-DD)."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy settings. Residential proxy is strongly recommended for sustained scraping (datacenter IPs get rate-limited by X faster).",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    },
                    "notionConnector": {
                        "title": "Notion connector ID (optional)",
                        "type": "string",
                        "description": "Optional. If set, the tweets are also delivered to your connected Notion via Apify MCP connectors — no extra code. Leave empty to just use the dataset."
                    },
                    "notionParentId": {
                        "title": "Notion data-source ID (optional)",
                        "type": "string",
                        "description": "Optional Notion database/data-source id to create the pages in. If empty, pages are created privately in your workspace."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
