# Tweet Scraper — X/Twitter Search, Profiles, Replies | $0.35/1K (`agentxpro/x-twitter-scraper`) Actor

Scrape X (Twitter) search results, profiles, replies, and quotes with one actor. Full advanced-search operators and date filters, no X account or login needed, pay per result — $0.35 per 1,000 posts, no minimums, no per-query fees.

- **URL**: https://apify.com/agentxpro/x-twitter-scraper.md
- **Developed by:** [Agent X](https://apify.com/agentxpro) (community)
- **Categories:** Social media, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 search 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

## X (Twitter) Scraper — Advanced Search, Profiles, Replies & Quotes in One Actor

**Every X data job in a single actor:** tweet search with the full advanced-search language, search within one profile, single-post lookup, profile timelines, quotes, and recent replies. No X account. No login. No API key of your own. You pay only for results delivered.

Most X tools on this store split these jobs across separate actors, charge per-query fees on top of per-post prices, or force a 50-post minimum on every run. This actor does the whole job in one place, at one flat rate, with no minimum — a one-post lookup costs the same per result as a 10,000-post harvest.

### What you can do

| Mode | What it returns |
| --- | --- |
| **Search posts** | Posts matching any keyword or advanced-search query, newest first, top-ranked, or media-only — paged as deep as you set |
| **Single post by ID** | One post with full text, engagement counts, media links, and the complete author profile block |
| **Profile timeline** | The recent posts of any public account, optionally including its replies |
| **Profile search** | The account's own posts pulled page by page — posts, replies and reposts — as deep as you set; add a keyword to keep only the posts that contain it. Reposts are marked `is_repost: true` and billed at a lower rate; switch them off to get only the account's own posts and replies |
| **Quotes of a post** | Posts that quoted a given post — the reaction side of any viral moment |
| **Conversation / replies** | The recent replies under any post, sortable by likes or recency |
| **List timeline** | The posts of any public X List, by List ID or URL — a curated feed as a dataset |
| **User profiles** | Full profile records (bio, followers, following, joined date, verification) for one or many handles — no posts, just the accounts |
| **Start URLs (any mode)** | Paste post URLs, profile URLs, list URLs, search URLs, bare post IDs or bare handles — each entry is detected and fetched the right way, in order |

### Why this one

| Capability | This actor | Typical X scraper |
| --- | --- | --- |
| Search + single post + profiles + quotes + replies | ✅ One actor, one rate | ❌ Split across 3–6 separate actors |
| Full advanced-search operators (`from:`, `filter:`, `since:`, `until:`, `within_time:`, `min_faves:`, `lang:`, `list:`) | ✅ All pass through | 🟡 Partial — date filters often missing |
| Date-range filtering (from/to) | ✅ Built-in fields | ❌ A top review complaint on rivals |
| Minimum results per run | ✅ None — 1 result is fine | ❌ 50-post minimums are common |
| Engagement filters (min reposts / replies / views / quotes / bookmarks, verified-only, drop replies / quotes / reposts) | ✅ Built-in fields | ❌ Usually query-only or missing |
| Bulk inputs (many post IDs or handles in one run) | ✅ `statusIds`, `handles`, `startUrls` | 🟡 Rare |
| Output shaping (keep/remove fields, flat spreadsheet columns, article text) | ✅ Built-in | ❌ Fixed shape |
| Per-query / per-URL fees | ✅ None | ❌ $0.004–$0.016 per query on top |
| Your own X account or login needed | ✅ Never | 🟡 Varies |
| Output for AI agents | ✅ Clean structured rows + Markdown digest option | ❌ JSON only |
| Pay only for delivered results | ✅ Yes, duplicates removed before billing | 🟡 Varies |

### Inputs

One **Mode** switch picks the job; the rest of the fields adapt to it.

| Field | Applies to | What it does |
| --- | --- | --- |
| **Mode** | all | `search` · `status` (single post) · `profile` · `profileSearch` · `quotes` · `conversation` |
| **Search query** | search, profileSearch | Keywords or hashtags — or the full X advanced-search language, typed exactly as you would on X: `from:`, `filter:`, `since:`, `until:`, `within_time:`, `min_faves:`, `lang:`, `list:{id}`, quote searches, and more. In profileSearch mode the query is a plain keyword or phrase matched against the post text; leave it empty to pull the account's posts unfiltered |
| **Feed** | search | Latest (newest first) · Top (ranked by likes + reposts) · Media only |
| **Results per page** | search, profile, profileSearch, quotes | Page size, 1–100 (default 20) |
| **Max pages** | search, profile, profileSearch, quotes | How deep to page, 1–50. More pages = older results. In profileSearch mode this is the harvest depth — each page pulls the account's next posts, replies included |
| **Date from / Date to** | search | Only posts in this window (YYYY-MM-DD). Set either or both |
| **Language** | search | Only posts in this language (ISO code, e.g. `en`, `es`, `ja`) |
| **From users** | search | Only posts by these accounts (handles without @; several allowed) |
| **Media only** | search | Only posts with photos or videos |
| **Minimum likes** | search | Only posts with at least this many likes |
| **Fast mode** | search | Lightweight preview rows — text, author, time — at maximum speed, without engagement stats. Best for cheap discovery before a full pull |
| **Post ID** | status, quotes, conversation | The numeric ID from any post URL (`x.com/.../status/{id}`) |
| **Profile handle** | profile, profileSearch | Account handle without @ (numeric account IDs also accepted) |
| **Include reposts** | profileSearch | On (default): the account's reposts are included, delivered as the original posts, marked `is_repost: true` on every row, and billed at the lower repost rate. Off: only the account's own posts and replies are returned (`is_repost: false` on every row) |
| **Profile handles (bulk)** | profile, profileSearch, user | Several handles at once; each account is processed in order. Replaces the single-handle field when set |
| **Post IDs (bulk)** | status | Several post IDs at once — one row per post that exists |
| **Start URLs** | any | Post URLs, profile URLs, list URLs, search URLs, bare post IDs or bare handles — detected per entry and fetched with the matching mode |
| **List ID or URL** | list | The numeric List ID or a full list URL; rows are the list timeline, billed as search results |
| **Feed: Latest + Top** | search | Set Feed to `both` to merge the Latest and Top feeds in one run, duplicates removed |
| **Minimum reposts / replies / views / quotes / bookmarks** | search, profile, profileSearch | Only posts at or above each threshold. Filtered-out posts are not delivered and not charged |
| **Verified authors only** | search, profile, profileSearch | Only posts whose author has a verified account |
| **Exclude replies / quotes / reposts** | search, profile, profileSearch | Drop replies, quote posts, or reposts before delivery and billing |
| **Fields to keep / remove** | all | `fields` keeps only the listed top-level fields per row; `omitFields` removes the listed ones. Leaner rows for pipelines |
| **Add flat columns** | all | `flatten` adds spreadsheet-ready columns: authorUsername, authorName, authorFollowers, mediaUrls, imageUrls, videoUrls, tweetUrl and totalEngagement |
| **Render article text** | all | `includeArticleText` adds `articleText` (plain) and `articleMarkdown` (Markdown) to rows whose post carries an X Article |
| **AI agent context** | all | `agentContext` adds an `agentContext` object to every delivered row (see *For AI agents* below). Never changes charges |

#### Example inputs

Deep, date-boxed search:

```json
{
  "mode": "search",
  "query": "free mint",
  "feed": "latest",
  "count": 20,
  "maxPages": 10,
  "dateFrom": "2026-11-10",
  "dateTo": "2026-11-19",
  "minLikes": 5
}
```

Everything one account posted this week:

```json
{ "mode": "profile", "handle": "someaccount", "count": 50, "maxPages": 3 }
```

Only what one account said about one topic:

```json
{ "mode": "profileSearch", "handle": "someaccount", "query": "bitcoin", "count": 20, "maxPages": 3 }
```

The reaction to a viral post:

```json
{ "mode": "quotes", "statusId": "1963528916284440649", "count": 50 }
```

Mixed inputs in one run — a post, two profiles:

```json
{ "startUrls": ["https://x.com/jack/status/20", "https://x.com/elonmusk", "nasa"], "count": 10 }
```

Only proven posts — high reposts, no replies, verified authors:

```json
{ "mode": "search", "query": "ethereum", "minRetweets": 100, "excludeReplies": true, "onlyVerified": true }
```

Profile records only (no posts):

```json
{ "mode": "user", "handles": ["jack", "elonmusk", "nasa"] }
```

A public List as a dataset:

```json
{ "mode": "list", "listId": "1477950212878618625", "count": 20, "maxPages": 2 }
```

### Output

One structured row per post. Every row carries the full post and a complete author block:

```json
{
  "id": "20",
  "text": "just setting up my twttr",
  "created_at": "Tue Mar 21 20:50:14 +0000 2006",
  "created_timestamp": 1142974214,
  "lang": "en",
  "likes": 325040,
  "reposts": 124700,
  "replies": 18100,
  "quotes": 7200,
  "bookmarks": 21800,
  "views": 0,
  "url": "https://x.com/jack/status/20",
  "replying_to": null,
  "media": { "photos": [], "videos": [], "gifs": [] },
  "author": {
    "id": "12",
    "name": "jack",
    "screen_name": "jack",
    "description": "…",
    "followers": 12465898,
    "following": 3,
    "verified": true,
    "avatar_url": "https://…",
    "banner_url": "https://…",
    "joined": "…"
  }
}
```

Exports: JSON, CSV, Excel, or straight into your stack via the Apify API, webhooks, and integrations (Make, Zapier, n8n, Google Sheets, and AI-agent frameworks via MCP).

### For AI agents

Turn on `agentContext` and every delivered row also carries an
`agentContext` object, shaped the way AI-agent context APIs answer:
the content cleaned and ready to paste straight into an LLM prompt,
where it came from, and how big it is.

```json
{
  "agentContext": {
    "text": "just setting up my twttr",
    "source": { "type": "x", "url": "https://x.com/jack/status/20" },
    "citation": "jack (@jack) on X — Tue Mar 21 20:50:14 +0000 2006 — https://x.com/jack/status/20",
    "tokens": 6,
    "retrievedAt": "2026-11-22T10:15:30.123Z"
  }
}
```

- `text` — the post's full text (the article text when
  `includeArticleText` is on and the post carries an X Article). For
  profile rows (`user` mode) it is the account headline plus bio.
- `source` — `{type, url, title}`: where this row came from.
- `citation` — a ready-to-paste citation line with author and date.
- `tokens` — estimated token count of `text` (≈4 characters per
  token), so an agent can budget its context window.
- `retrievedAt` — ISO 8601 UTC time the row was retrieved.

`agentContext` is attached after any `fields` / `omitFields` /
`flatten` shaping, so it always describes the row as delivered. It
is off by default, adds no rows, and never changes charges — it
rides on the rows you already pay for.

### Use it from code (API)

Run it with the Apify API — replace `YOUR_API_TOKEN` with your token from Apify Console → Settings → API & Integrations:

```bash
curl -X POST "https://api.apify.com/v2/acts/agentxpro~x-twitter-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "mode": "search", "query": "bitcoin", "count": 20, "maxPages": 2 }'
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("agentxpro/x-twitter-scraper").call(run_input={
    "mode": "search", "query": "bitcoin", "count": 20, "maxPages": 2,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["id"], item["text"][:80])
```

```javascript
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "YOUR_API_TOKEN" });
const run = await client.actor("agentxpro/x-twitter-scraper").call({
  mode: "search", query: "bitcoin", count: 20, maxPages: 2,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length);
```

### Use with AI agents (MCP)

This actor works with Apify's official MCP server, so Claude, ChatGPT, Cursor and other MCP clients can run it as a tool: connect the client to Apify MCP (https://mcp.apify.com) with your Apify token, add this actor (`agentxpro/x-twitter-scraper`) to the tool list, and ask for X data in plain language — the agent fills the inputs above and reads the dataset rows back. Pay-per-result pricing applies exactly as with API runs.

### Use cases

- **Lead research & prospecting** — find everyone posting about a problem, product, or niche; export authors with follower counts and bios, ready for outreach lists.
- **Airdrop & alpha hunting** — watch keywords like "free mint", "whitelist", or "testnet" in near-real time, filter by date and minimum likes, and catch launches while they are still early.
- **Brand & competitor monitoring** — schedule daily runs on your brand, your competitors, and your category keywords; diff the datasets and never miss a spike.
- **AI-agent data** — feed LLM pipelines, RAG indexes, and research agents with clean, structured X data — or take the Markdown digest option and drop posts straight into a model's context.
- **Market & sentiment research** — pull Top-feed results around an event, a token, or a launch and measure what actually got engagement.
- **Content research** — quotes + replies on any viral post show you both sides: what the author said, and how the audience reacted.

### Pricing

**Pay per result, priced per mode** — you only pay for what you ask for, and every mode is priced under the comparable big-name tools. Search posts, search within a profile, profile timelines and single-post lookups: **$0.35 per 1,000 results**. Reposts inside profile search: **$0.20 per 1,000**. Quotes: **$0.13 per 1,000**. Replies: **$0.45 per 1,000**. User profiles (user mode): **$0.35 per 1,000 profiles**. List timelines bill as search results. No minimum per run, no per-query fees, no per-URL fees. Duplicates are removed before billing. If a run returns nothing, you pay nothing for results.

### FAQ

**Do I need an X account, login, or my own API key?**
No. You bring nothing — no X account, no cookies, no keys. Set the inputs and run.

**How does it work?**
The actor runs on our own maintained data engine, built for exactly this job and updated continuously as X changes. You send a query; the engine collects matching public posts through its live pipelines, cleans and deduplicates them, and returns structured rows. The plumbing is deliberately not the product — the data is.

**How much can one search return?**
A single deep walk typically returns 100–300 posts for an active keyword, and repeat runs across days build up to roughly 500 unique posts per keyword. Sparse phrases end honestly at their true total instead of padding with junk.

**Can I search by date?**
Yes — Date from / Date to fields, or `since:` / `until:` typed directly in the query. One bound per query is enforced most strictly; set both and the actor still returns exactly the window you asked for.

**Are replies complete?**
Conversation mode returns the recent replies under a post — the first, most visible page of the thread — sortable by likes or recency. For very large threads, treat it as the top slice of the conversation, not an exhaustive archive.

**Are quote counts exact?**
Quotes mode returns the findable quotes of a post. X's displayed quote counter also counts protected and deleted posts that nobody can return, so the list can be shorter than the counter.

**How far back does profile search go?**
It searches the account's posts with the same engine and practical depth as keyword search and returns posts authored by that account matching your keywords or phrases. The account's reposts are delivered as the original posts — never disguised as its own posts: every row carries an `is_repost` flag, reposts bill at the lower repost rate, and the Include reposts switch drops them entirely if you only want the account's own posts and replies.

**Can it find people / accounts by keyword?**
No — this actor returns posts and profiles, not account search. Start from a known handle, or harvest authors from a keyword search.

**Can I get just the profiles, without posts?**
Yes — `user` mode returns one full profile record per handle (bulk via `handles`), billed per profile at the search rate.

**Can I scrape an X List?**
Yes — `list` mode takes a List ID or URL and returns the list timeline, billed as search results. Lists also work inside a search query with the `list:{id}` operator.

**Can I get the full text of X Articles?**
Yes — turn on `includeArticleText` and rows whose post carries an article gain `articleText` and `articleMarkdown` fields.

**Which languages and filters are supported?**
Any language X indexes (filter by ISO code), plus the full operator set: author, media, links, date, recency window, minimum likes, lists, and more — typed in the query or set as fields.

**Is this a Twitter API alternative?**
Yes — it returns the same public post, profile, quote and reply data most people use the official X API for, at $0.35 per 1,000 posts, with no developer account, no app review and no API key of your own. And if you are comparing it with a tweet downloader or a Twitter monitoring tool, the difference is the output: clean structured rows (JSON, CSV or Excel) built for datasets, pipelines and agents, not one-off downloads.

**Is fast mode worse data?**
Fast mode rows are real posts with real text, author, and time — they simply skip the engagement stats and media detail. Use it to scout cheaply, then run the winners in full mode.

### Honest limits

- Public posts and profiles only. Protected or deleted posts cannot be returned.
- Search depth per keyword is roughly 500 unique posts accumulated over days; a single run usually lands between 100–300 for active terms.
- Replies are the recent, most visible slice of a thread — not a guaranteed-complete archive of very large conversations.
- Quote lists can be shorter than X's on-screen counter (protected/deleted quotes are unfindable by anyone).
- No people-search.
- Like any X data tool, brief upstream hiccups can make a single run return less; re-running the same input resumes normally and duplicates are removed before billing.

### Support

Issues and feature requests are read daily. If a run under-delivers, send the run ID — we would rather fix it than argue about it.

# Actor input Schema

## `count` (type: `integer`):

Page size, 1-100. Search results come in pages; the actor walks up to Max pages pages and merges them, duplicates removed.

## `dateFrom` (type: `string`):

Search modes: YYYY-MM-DD. Only posts on or after this date (UTC). Can be combined with Date to.

## `dateTo` (type: `string`):

Search modes: YYYY-MM-DD. Only posts up to this date (UTC). Can be combined with Date from.

## `excludeQuotes` (type: `boolean`):

Search, profile and profile search modes: drop quote posts (posts that quote another post). Dropped posts are not delivered and not charged.

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

Search, profile and profile search modes: drop replies (posts replying to another post). Dropped posts are not delivered and not charged.

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

Profile and profile search modes: drop reposts (retweets) — only the account’s own posts are delivered. In profile search this combines with the Include reposts switch.

## `fastMode` (type: `boolean`):

Search modes: lightweight preview rows (real text, author and time, WITHOUT engagement stats or media detail) at maximum speed. Best for cheap discovery before a full pull. Never treat the missing stats as zeroes.

## `feed` (type: `string`):

Search modes feed. Latest = newest first. Top = a wider pool ranked by likes + replies. Media = posts with media. Both = Latest and Top in one run, deduplicated — a post found by both feeds is delivered and charged once.

## `fields` (type: `array`):

Keep only these top-level fields on every row (for example: text, likes, author, media). The id, mode and is_repost fields are always kept. Leave empty to keep all fields.

## `flatten` (type: `boolean`):

Add flat spreadsheet-friendly columns to every row: authorUsername, authorName, authorId, authorFollowers, authorFollowing, authorVerified, mediaUrls, imageUrls, videoUrls, tweetUrl and totalEngagement (likes + replies + reposts + quotes + bookmarks). The original nested fields stay in place.

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

Search mode: only posts by these authors (handles without @; several allowed and combined). Author match is exact, mere mentions do not count.

## `handle` (type: `string`):

Profile timeline and profile search modes: X handle without @ (numeric account IDs also accepted). Required for profile search. Profile search pulls the account's posts including replies, page by page; add a keyword to keep only matching posts. The account's reposts are included too unless Include reposts is switched off.

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

Profile, profile search and user modes: several handles at once (without @). Each account is processed in order. When set, this replaces the single Profile handle field.

## `includeArticleText` (type: `boolean`):

When a delivered post carries an X Article, add two rendered fields to its row: articleText (plain text) and articleMarkdown (Markdown), built from the article body. Posts without an article are unchanged.

## `includeReposts` (type: `boolean`):

Profile search mode only: include the account's reposts (posts by other authors that this account reposted, delivered as the original posts and marked is_repost: true in the results). Repost rows are billed at the lower repost rate. Turn off to receive only the account's own posts and replies.

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

Search modes: ISO 639-1 code (en, es, ja...). Only posts in this language. This is a filter, not a translation.

## `listId` (type: `string`):

List mode: the numeric X List ID, or a full list URL (x.com/i/lists/… or x.com/…/lists/…). Rows are the list timeline posts, charged as search results.

## `maxPages` (type: `integer`):

How many pages to walk (search, profile search, profile and quotes modes), 1-50. More pages = older results. In profile search mode this is the harvest depth: each page pulls the account's next posts (including replies), so 25 pages is roughly 500 posts. A single deep search walk typically returns 100-300 posts for an active keyword; roughly 500 unique posts per keyword is the practical ceiling accumulated over days.

## `mediaOnly` (type: `boolean`):

Search modes: only posts with photos or videos.

## `minBookmarks` (type: `integer`):

Search, profile and profile search modes: only posts with at least this many bookmarks (0 = no minimum).

## `minLikes` (type: `integer`):

Search modes: only posts with at least this many likes (0 = no minimum).

## `minQuotes` (type: `integer`):

Search, profile and profile search modes: only posts with at least this many quote posts (0 = no minimum).

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

Search, profile and profile search modes: only posts with at least this many replies (0 = no minimum).

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

Search, profile and profile search modes: only posts with at least this many reposts/retweets (0 = no minimum).

## `minViews` (type: `integer`):

Search, profile and profile search modes: only posts with at least this many views (0 = no minimum). Posts whose view count is not public are dropped when a minimum is set.

## `mode` (type: `string`):

What to fetch. Search, single post, profile timeline, profile search, quotes, conversation (replies), list timeline, or user (profile metadata only). The Start URLs input overrides this field.

## `omitFields` (type: `array`):

Remove these top-level fields from every row (for example: raw_text, card, embed_card). Leave empty to keep all fields.

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

Search, profile and profile search modes: only posts whose author has a verified account.

## `query` (type: `string`):

Search mode: keywords or hashtags, or the full X advanced-search language typed exactly as on X (from:, filter:, since:, until:, within_time:, min_faves:, lang:, list:{id} as the whole query, quote searches, and more). The structured fields below (From users, dates, language, Media only, Minimum likes) are merged into the search for you. Profile search mode: a plain keyword or phrase - the actor pulls the account's posts (including replies) page by page and keeps only the posts whose text contains it; leave it empty to return the account's posts unfiltered.

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

Universal input: paste post URLs, profile URLs, list URLs, search URLs, bare post IDs or bare handles — each entry is detected and fetched with the matching mode, in order. When set, this replaces the Mode field. Count, Max pages, filters and shaping options apply to every entry.

## `statusId` (type: `string`):

Single post, quotes and conversation modes: the numeric post ID (the digits in x.com/.../status/{id}).

## `statusIds` (type: `array`):

Single post mode: several post IDs at once. One row per found post, in the order given; missing posts are skipped. When set, this replaces the single Post ID field.

## `agentContext` (type: `boolean`):

Add an agentContext object to every delivered row: the post text (or profile headline + bio) as clean text ready to paste into an LLM prompt, a source block (type, URL, title), a ready-to-paste citation with author and date, an estimated token count and the retrieval time. Modelled on the response style AI-agent APIs use. Off by default; never changes charges.

## Actor input object example

```json
{
  "count": 20,
  "dateFrom": "2026-11-16",
  "dateTo": "2026-11-19",
  "excludeQuotes": false,
  "excludeReplies": false,
  "excludeRetweets": false,
  "fastMode": false,
  "feed": "latest",
  "flatten": false,
  "fromUsers": [
    "Enter_Elysium",
    "kalosfun"
  ],
  "handle": "Enter_Elysium",
  "includeArticleText": false,
  "includeReposts": true,
  "language": "en",
  "maxPages": 1,
  "mediaOnly": false,
  "minBookmarks": 0,
  "minLikes": 0,
  "minQuotes": 0,
  "minReplies": 0,
  "minRetweets": 0,
  "minViews": 0,
  "mode": "search",
  "onlyVerified": false,
  "query": "free mint",
  "statusId": "1963528916284440649",
  "agentContext": false
}
```

# Actor output Schema

## `posts` (type: `string`):

One row per post delivered by the run: search results, timeline posts, quotes, or replies, depending on the chosen mode. Every row carries the full post and author block, plus a mode field naming the operation that produced it.

## `summary` (type: `string`):

Small JSON record in the default key-value store under the OUTPUT key: which mode ran, what was asked, how many pages were walked, and how many results were delivered.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("agentxpro/x-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 = {}

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

```

## MCP server setup

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