# Twitter (X) Scraper ✅ No Login or Cookies (`atomus/twitter-scraper`) Actor

Scrape X.com (Twitter) with no login and no cookies. Extract a profile's tweets, run advanced keyword search, pull single tweet details, or fetch full user profiles. Get likes, retweets, replies, quotes, views, media URLs, author, and conversation context as clean JSON. Add followers and comments.

- **URL**: https://apify.com/atomus/twitter-scraper.md
- **Developed by:** [Atomus APIs](https://apify.com/atomus) (community)
- **Categories:** Social media, Lead generation, Automation
- **Stats:** 1 total users, 1 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

![Atomus](https://atomusapi.dev/images/atomus-readme-bg.png)

## Twitter (X) Scraper: Tweets, Profiles, Search & Followers (No Login)

The **Twitter (X) Scraper** extracts public data from X.com with no cookies and no login: a profile's tweets, advanced keyword search, single tweet details, and full user profiles. Each tweet returns 30+ fields, including likes, retweets, replies, quotes, bookmarks, views, media (image and MP4 URLs), author, and conversation context, as clean structured JSON.

Give it a username, a tweet URL, or a search query and it returns ready-to-use data in seconds. No X account, no cookie, no browser automation to maintain.

### What does this Twitter (X) Scraper do?

Four modes, one clean tweet and profile shape across all of them:

| Mode | Input | Returns |
|---|---|---|
| **Profile timeline** | usernames | A user's recent tweets, plus the full profile (free) |
| **Advanced search** | query + filters | Tweets matching keyword, users, dates, engagement, media |
| **Tweet details** | tweet URLs | Full data for specific tweets, incl. quoted tweet and reply context |
| **User profile** | usernames | Bio, follower and following counts, verification, location, website |

Optional paid add-ons compose on top: **followers** and **following** on the profile mode, **comments** and **retweeters** on the tweet-details mode, each delivered as its own records.

#### What data can you extract from a tweet?

`tweet_id`, `url`, `text`, `created_at`, `lang`, `source`, `favorite_count`, `retweet_count`, `reply_count`, `quote_count`, `bookmark_count`, `view_count`, `conversation_id`, reply context (`in_reply_to_screen_name`, `in_reply_to_status_id`), the full `quoted_tweet` object, `sensitive`, `hashtags`, `mentions`, `urls`, `media` (type, image URL, highest-bitrate MP4 URL), and an `author` block (username, name, avatar, follower count, blue-verified).

### How do I scrape Twitter (X)?

1. Pick a **mode** (What to scrape) at the top of the input.
2. Fill the matching field: usernames for a profile timeline, a query for search, or tweet URLs for tweet details.
3. Set **Max tweets** per handle or query.
4. Click **Start**. Results stream into the dataset as they are collected.

No coding required. Total time from input to data is usually under a minute.

### Input

| Field | Used by | Notes |
|---|---|---|
| `handles` | Profile timeline, User profile | `@openai`, `openai`, or `https://x.com/openai` |
| `tweetUrls` | Tweet details | Status URL or numeric tweet ID |
| `searchQuery` | Advanced search | Free text; raw X operators also work verbatim |
| Search filters | Advanced search | from/to/mentions, hashtags, date range, min likes/retweets/replies, language, media, verified (all free) |
| `maxItems` | Timeline, search | Tweets per handle or query |

**Advanced search operators** pass straight through to X, so a query like `from:openai min_faves:5000 filter:videos` works exactly as it does on X.com. The filter fields build that query string for you.

### Output

```json
{
  "tweet_id": "1846846285917131130",
  "url": "https://x.com/OpenAI/status/1846846285917131130",
  "text": "True",
  "created_at": "Thu Oct 17 09:30:41 +0000 2024",
  "lang": "en",
  "favorite_count": 175957,
  "retweet_count": 36419,
  "reply_count": 5599,
  "quote_count": 635,
  "bookmark_count": 3015,
  "view_count": 28146703,
  "conversation_id": "1846846285917131130",
  "media": [],
  "author": {
    "screen_name": "OpenAI",
    "name": "OpenAI",
    "followers_count": 5097390,
    "blue_verified": true
  }
}
```

### How much does it cost to scrape Twitter (X)?

Pay per result, billed as a per-event charge:

| Event | Free plan | Gold+ Apify plans |
|---|---|---|
| Tweet (timeline, search, tweet detail) | $4 / 1,000 tweets | $2 / 1,000 tweets |
| Profile | $4 / 1,000 profiles | $2 / 1,000 profiles |
| Follower / following / retweeter (add-on) | $0.50 / 1,000 | $0.15 / 1,000 |
| Comment (add-on) | $3 / 1,000 | $1 / 1,000 |

Every run bills a minimum of 1 result, which covers the request even when a query returns nothing (a private or suspended account, or a search with no matches). Search filters are free.

### Platform limits (reported honestly)

X's public API caps a single profile timeline near ~100 tweets per pass. This is a limit of the X.com platform, not the scraper, and every X scraper shares it. To build a deeper archive, use the search mode (which paginates further) or re-run on a schedule and append to the same dataset.

### Use it with AI agents and MCP

Every result is clean structured JSON, so the actor drops straight into an agent pipeline, a RAG index, or an MCP tool call. Point your agent at a handle or a search query and hand the structured tweets back to your model.

### Use cases

- Brand and competitor monitoring on X
- Social listening and sentiment analysis
- Influencer and audience research (followers, following, engagement)
- Trend and topic tracking with advanced search
- Building tweet datasets for AI training and research

### Twitter (X) Scraper vs cookie-based tools vs the official X API

| | This scraper | Cookie-based scrapers | Official X API |
|---|---|---|---|
| Login / cookies | None | Your X cookie required | Developer account + keys |
| Setup | Paste input and run | Extract and paste cookies | App approval, OAuth |
| Cost | From $0.15/1k tweets (Gold) | Varies | High monthly tiers |
| Risk | Public data only | Your account can be flagged | Rate-limited, restrictive |

### Other scrapers by Atomus

- [TikTok Scraper](https://apify.com/atomus/tiktok-scraper) - profiles, videos, search, comments
- [Bilibili Scraper](https://apify.com/atomus/bilibili-scraper) - videos, comments, danmaku, transcripts
- [Xiaohongshu (小红书) Scraper](https://apify.com/atomus/xiaohongshu-scraper) - notes, search, profiles
- [LinkedIn Profile Scraper](https://apify.com/atomus/linkedin-profile-scraper) - profile enrichment

### FAQ

**Is there an official Twitter (X) API?**
Yes, but it requires a developer account and paid tiers that are expensive and rate-limited for most data needs. This actor is a practical alternative: no keys, no OAuth, structured JSON, pay per result.

**Do I need an X account or cookies?**
No. The actor scrapes only public data and handles request signing for you, so there is nothing to log into.

**Can I search tweets by date, engagement, or user?**
Yes. The advanced search mode accepts from/to/mentions, hashtags, a date range, minimum likes/retweets/replies, language, and media filters. They compile into X's own search operators.

**How many tweets can I get from one profile?**
X caps a profile timeline near ~100 tweets per pass. Use search or scheduled re-runs to collect more over time.

**Is it legal to scrape X?**
The actor collects only publicly available data. You are responsible for using scraped data in line with applicable laws and X's terms.

***

> **Disclaimer:** this actor is an independent tool and is not affiliated with, endorsed by, or sponsored by X Corp. It collects only publicly available data. All trademarks are the property of their respective owners.

# Actor input Schema

## `searchType` (type: `string`):

Choose the mode. Each mode uses a different input field below and is billed per result: tweets are $4/1,000 (Free) → $2/1,000 (Gold+); a profile is billed as one result. A run always bills at least 1 result.

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

Used by "Profile timeline" and "User profile". One or more X usernames — @openai, openai, or a full profile URL like https://x.com/openai.

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

Used by "Tweet details". Paste tweet URLs (https://x.com/openai/status/1846846285917131130) or bare numeric tweet IDs.

## `searchQuery` (type: `string`):

Used by "Advanced search". Free text to search for. You can also paste raw X advanced-search operators here (e.g. "from:openai min\_faves:5000 filter:videos") — they work verbatim. Combine with the filters below.

## `sortOrder` (type: `string`):

Used by "Advanced search". "Top" ranks by relevance/engagement; "Latest" is reverse-chronological.

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

Used by "Profile timeline" and "Advanced search". How many tweets to return per username (timeline) or per query (search). This is your main cost lever — those modes bill per tweet. X caps a profile timeline near ~100 tweets per pass (a platform limit every scraper shares). Default 20.

## `fromUsers` (type: `array`):

Search filter (free). Only tweets authored by these usernames.

## `toUsers` (type: `array`):

Search filter (free). Only tweets that are replies to these usernames.

## `mentioning` (type: `array`):

Search filter (free). Only tweets that mention these usernames.

## `hashtags` (type: `array`):

Search filter (free). Only tweets containing these hashtags (with or without the #).

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

Search filter (free). Only tweets on/after this date, format YYYY-MM-DD.

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

Search filter (free). Only tweets on/before this date, format YYYY-MM-DD.

## `minRetweets` (type: `integer`):

Search filter (free). Only tweets with at least this many retweets.

## `minFaves` (type: `integer`):

Search filter (free). Only tweets with at least this many likes.

## `minReplies` (type: `integer`):

Search filter (free). Only tweets with at least this many replies.

## `language` (type: `string`):

Search filter (free). Two-letter language code, e.g. en, es, pt, ja.

## `onlyVerified` (type: `boolean`):

Search filter (free). Only tweets from Blue-verified accounts.

## `onlyMedia` (type: `boolean`):

Search filter (free). Only tweets that include an image or video.

## `onlyLinks` (type: `boolean`):

Search filter (free). Only tweets that contain a link.

## `excludeReplies` (type: `boolean`):

Search filter (free). Drop reply tweets from the results.

## `excludeRetweets` (type: `boolean`):

Search filter (free). Drop native retweets from the results.

## `maxFollowers` (type: `integer`):

Add-on for "User profile" mode (paid plans). Also fetch up to this many of the profile's followers, delivered as separate follower records. Billed as follower-scraped. 0 = off.

## `maxFollowing` (type: `integer`):

Add-on for "User profile" mode (paid plans). Also fetch up to this many accounts the profile follows, as separate following records. Billed as follower-scraped. 0 = off.

## `maxComments` (type: `integer`):

Add-on for "Tweet details" mode (paid plans). Also fetch up to this many replies/comments under each tweet, as separate comment records. Billed as comment-scraped. 0 = off.

## `maxRetweeters` (type: `integer`):

Add-on for "Tweet details" mode (paid plans). Also fetch up to this many users who retweeted each tweet, as separate retweeter records. Billed as follower-scraped. 0 = off.

## Actor input object example

```json
{
  "searchType": "user-tweets",
  "handles": [
    "openai"
  ],
  "sortOrder": "Top",
  "maxItems": 20,
  "onlyVerified": false,
  "onlyMedia": false,
  "onlyLinks": false,
  "excludeReplies": false,
  "excludeRetweets": false,
  "maxFollowers": 0,
  "maxFollowing": 0,
  "maxComments": 0,
  "maxRetweeters": 0
}
```

# Actor output Schema

## `results` (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 = {
    "handles": [
        "openai"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("atomus/twitter-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"
  ]
}' |
apify call atomus/twitter-scraper --silent --output-dataset

```

## MCP server setup

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