# X/Twitter Tweet Scraper (`datadoping/x-twitter-tweet-scraper`) Actor

Fastest⚡️ Twitter (X) scraping from searches, URLs, lists, and profiles with customizable filters. Extract data at high speed (100 tweets/sec) and scale efficiently. Perfect for researchers, businesses, and developers looking for detailed Twitter insights.

- **URL**: https://apify.com/datadoping/x-twitter-tweet-scraper.md
- **Developed by:** [Data Doping](https://apify.com/datadoping) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## X Tweet Scraper New | Twitter Tweet, Replies & Conversation Scraper

**Scrape any public tweet — details, replies, quotes, reposters, likers, media, polls, cards, and Community Notes — from one Actor.**

This is a production-ready **Tweet Scraper** / **Twitter Scraper** for Apify. Paste tweet URLs or IDs, choose the datasets you need, and export structured JSON for analytics, monitoring, research, and automation.

If you need a practical **Twitter API alternative** for conversation-level data — without building GraphQL clients or maintaining browser farms — this Actor is built for you.

***

### Why use this Actor

A single viral post can contain the story: the original message, the thread underneath it, quote commentary, and the people amplifying it. Collecting that manually doesn’t scale. Official API access is often expensive, rate-limited, or incomplete for engagement graphs.

#### Problems it solves

| Problem | How this Actor helps |
|---|---|
| You need the full conversation under a post | Replies + thread expansion with depth |
| You track brand crises or campaigns | Scrape quotes, replies, and engagement users |
| You measure amplification | Export reposters (and likers when X exposes them) |
| You archive evidence for research/journalism | Snapshot tweet details + media + notes |
| You train models / RAG systems | Structured tweet + reply corpora |
| You monitor competitor announcements | Schedule scrapes of known tweet URLs |
| You hate juggling 4 scrapers for one post | One Actor, feature toggles, typed outputs |

#### Who it's for

- Social listening and brand protection teams
- Growth / performance marketers
- Journalists, investigators, and OSINT analysts
- Academic researchers studying discourse
- Agencies reporting on campaign performance
- Data scientists building NLP / RAG datasets
- Product and trust-and-safety teams
- Developers wiring Apify into pipelines

***

### Features

| Capability | Included |
|---|:---:|
| Tweet details (text, author, counts, URLs) | ✓ |
| Conversation / replies timeline | ✓ |
| Thread expansion with reply depth | ✓ |
| Quote tweets | ✓ |
| Likers (when publicly available) | ✓ |
| Reposters / retweeters | ✓ |
| Media extraction (photos, videos, variants) | ✓ |
| Polls (choices + vote counts when present) | ✓ |
| Cards / link previews | ✓ |
| Community Notes / Birdwatch (when present) | ✓ |
| Multiple tweets per run | ✓ |
| URL or numeric tweet ID inputs | ✓ |
| Per-feature limits | ✓ |
| Parallel tweet processing | ✓ |
| Rate limiting + empty-page retries | ✓ |
| Typed Apify Output tabs | ✓ |
| Combined default dataset | ✓ |
| Apify Tasks & Schedules | ✓ |

***

### What can be scraped

#### Tweet details

- Tweet ID
- Canonical `x.com` URL (and Twitter URL when available)
- Full text (including long-form note text when present)
- Created time
- Language
- Conversation ID
- Like / reply / repost / quote / bookmark counts
- View count (when available)
- Reply / quote / repost flags
- Author profile snapshot (id, username, name, avatar, verification, follower counts)

#### Conversation & replies

- Reply tweets under the root post
- Parent tweet IDs
- Nested **depth** when thread expansion is enabled
- Author + engagement fields on each reply

#### Quotes & amplification

- Quote tweets referencing the root
- Quoted tweet ID linkage
- Users who **reposted** the tweet
- Users who **liked** the tweet (subject to X visibility — see Limitations)

#### Rich entities (from detail payload)

- Media objects (type, URLs, dimensions, video variants when present)
- Polls (labels, votes, end time, finality flag)
- Cards (name, URL, binding values)
- Community Notes / Birdwatch pivot text and links when X attaches them

***

### How it works

1. Paste one or more **tweet URLs or IDs**.
2. Enable Tweet Details, Replies/Conversation, Quotes, Likers, and/or Reposters.
3. Optionally include media, polls, cards, and Community Notes on detail rows.
4. Set max limits per feature.
5. Run and download typed datasets (`tweets`, `replies`, `quotes`, `engagement`) or the combined default dataset.

Only enabled features are requested. That keeps costs predictable.

***

### Input options

#### Sources

| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
| `tweets` | `string[]` | *(required)* | Public tweet URLs or numeric IDs. Duplicates are removed. | `["https://x.com/elonmusk/status/2066538446781382800"]` |

Accepted forms:

```text
2066538446781382800
https://x.com/user/status/2066538446781382800
https://twitter.com/user/status/2066538446781382800
```

#### What to scrape

| Parameter | Type | Default | Description |
|---|---|---|---|
| `scrapeTweetDetails` | `boolean` | `true` | Scrape the root tweet detail record. |
| `scrapeReplies` | `boolean` | `true` | Scrape replies to each tweet. |
| `scrapeConversationThread` | `boolean` | `true` | Fetch the conversation timeline (same backend path as replies). |
| `expandThread` | `boolean` | `true` | Compute reply `depth` from parent relationships. |
| `scrapeQuotes` | `boolean` | `false` | Scrape quote tweets. |
| `scrapeLikers` | `boolean` | `false` | Scrape users who liked the tweet (when available). |
| `scrapeReposters` | `boolean` | `false` | Scrape users who reposted the tweet. |

#### Rich entities

These fields are parsed from the tweet detail payload when present — they do **not** add separate list endpoints:

| Parameter | Type | Default | Description |
|---|---|---|---|
| `includeMedia` | `boolean` | `true` | Attach media objects on tweet detail rows. |
| `includePolls` | `boolean` | `true` | Attach poll data when the tweet is a poll. |
| `includeCards` | `boolean` | `true` | Attach card / link-preview metadata. |
| `includeCommunityNotes` | `boolean` | `true` | Attach Community Notes when X provides them. |

#### Limits

| Parameter | Type | Default | Description |
|---|---|---|---|
| `maxReplies` | `integer` | `100` | Max replies / conversation items per root tweet. |
| `maxQuotes` | `integer` | `100` | Max quote tweets per root tweet. |
| `maxLikers` | `integer` | `100` | Max likers per tweet. |
| `maxReposters` | `integer` | `100` | Max reposters per tweet. |

***

### Output

| Dataset / tab | Contains |
|---|---|
| **Tweets** | Root tweet detail rows (`type: "tweet"`) |
| **Replies** | Conversation replies (`type: "reply"`) |
| **Quotes** | Quote tweets (`type: "quote"`) |
| **Engagement** | Likers + reposters (`type: "liker"` / `"reposter"`) |
| **All Fields (combined)** | Every row together |

#### Sample tweet detail

```json
{
  "type": "tweet",
  "id": "2066538446781382800",
  "url": "https://x.com/elonmusk/status/2066538446781382800",
  "text": "Sample announcement text",
  "createdAt": "Wed Jun 18 18:22:11 +0000 2025",
  "lang": "en",
  "conversationId": "2066538446781382800",
  "likeCount": 15420,
  "replyCount": 2103,
  "retweetCount": 3401,
  "quoteCount": 512,
  "bookmarkCount": 880,
  "viewCount": 2400000,
  "author": {
    "id": "44196397",
    "username": "elonmusk",
    "name": "Elon Musk",
    "verified": true,
    "avatar": "https://pbs.twimg.com/profile_images/.../normal.jpg",
    "followersCount": 220000000,
    "followingCount": 1200
  },
  "media": [
    {
      "type": "photo",
      "url": "https://pbs.twimg.com/media/abc.jpg",
      "previewUrl": "https://pbs.twimg.com/media/abc.jpg",
      "width": 1600,
      "height": 900
    }
  ],
  "poll": null,
  "card": null,
  "communityNotes": null,
  "isReply": false,
  "isQuote": false,
  "isRepost": false,
  "inputTweetId": "2066538446781382800",
  "input": "https://x.com/elonmusk/status/2066538446781382800"
}
```

#### Sample reply

```json
{
  "type": "reply",
  "id": "2066540000000000001",
  "url": "https://x.com/analyst42/status/2066540000000000001",
  "text": "Interesting point — here’s the context…",
  "likeCount": 42,
  "replyCount": 3,
  "retweetCount": 5,
  "parentTweetId": "2066538446781382800",
  "depth": 1,
  "author": {
    "id": "99887766",
    "username": "analyst42",
    "name": "Alex Analyst",
    "verified": false
  },
  "inputTweetId": "2066538446781382800"
}
```

#### Sample engagement user

```json
{
  "type": "reposter",
  "tweetId": "2066538446781382800",
  "user": {
    "id": "11223344",
    "username": "techwire",
    "name": "Tech Wire",
    "verified": true,
    "followersCount": 540000
  },
  "inputTweetId": "2066538446781382800"
}
```

#### Sample poll (when present on the tweet)

```json
{
  "poll": {
    "choices": [
      { "label": "Yes", "votes": 12840 },
      { "label": "No", "votes": 3920 }
    ],
    "endDatetime": "2025-06-20T18:00:00.000Z",
    "countsAreFinal": true,
    "totalVotes": 16760
  }
}
```

Export via Apify as **JSON**, **CSV**, **Excel**, and more.

***

### Examples

#### 1) Tweet details only

```json
{
  "tweets": ["https://x.com/openai/status/2066538446781382800"],
  "scrapeTweetDetails": true,
  "scrapeReplies": false,
  "scrapeConversationThread": false
}
```

#### 2) Full conversation thread

```json
{
  "tweets": ["2066538446781382800"],
  "scrapeTweetDetails": true,
  "scrapeReplies": true,
  "scrapeConversationThread": true,
  "expandThread": true,
  "maxReplies": 500
}
```

#### 3) Quotes for narrative analysis

```json
{
  "tweets": ["https://x.com/user/status/2066538446781382800"],
  "scrapeTweetDetails": true,
  "scrapeQuotes": true,
  "maxQuotes": 300,
  "scrapeReplies": false,
  "scrapeConversationThread": false
}
```

#### 4) Amplification map (reposters)

```json
{
  "tweets": ["https://x.com/brand/status/2066538446781382800"],
  "scrapeTweetDetails": true,
  "scrapeReposters": true,
  "maxReposters": 500,
  "scrapeReplies": false,
  "scrapeConversationThread": false
}
```

#### 5) Engagement pack (replies + quotes + reposters)

```json
{
  "tweets": [
    "https://x.com/a/status/111",
    "https://x.com/b/status/222"
  ],
  "scrapeTweetDetails": true,
  "scrapeReplies": true,
  "scrapeQuotes": true,
  "scrapeReposters": true,
  "maxReplies": 200,
  "maxQuotes": 200,
  "maxReposters": 200
}
```

#### 6) Rich entities focus (media / polls / notes)

```json
{
  "tweets": ["https://x.com/user/status/2066538446781382800"],
  "scrapeTweetDetails": true,
  "includeMedia": true,
  "includePolls": true,
  "includeCards": true,
  "includeCommunityNotes": true,
  "scrapeReplies": false,
  "scrapeConversationThread": false
}
```

#### 7) Likers attempt (when X exposes the list)

```json
{
  "tweets": ["https://x.com/user/status/2066538446781382800"],
  "scrapeTweetDetails": true,
  "scrapeLikers": true,
  "maxLikers": 200,
  "scrapeReplies": false,
  "scrapeConversationThread": false
}
```

> **Note:** X frequently restricts public liker lists. A high `likeCount` does not guarantee liker rows. Prefer `scrapeReposters` for reliable amplification graphs.

***

### Use cases

1. **Brand crisis response** — capture replies and quotes within minutes of a spike.
2. **Campaign measurement** — archive announcement tweets and conversation volume.
3. **Influencer amplification** — list who reposted a launch post.
4. **Journalism** — preserve a public thread with nested reply depth.
5. **OSINT / investigations** — snapshot text, media, and Community Notes.
6. **Customer support ops** — collect reply chains under support tweets.
7. **Political / civic research** — study discourse under high-visibility posts.
8. **Academic NLP** — build reply corpora with stable schema fields.
9. **RAG / LLM evaluation** — feed real conversation trees into pipelines.
10. **Competitive intelligence** — monitor competitor announcement threads.
11. **Agency reporting** — export CSV/JSON for client decks.
12. **Trust & safety** — sample engagement graphs around flagged content.
13. **Trend detection** — compare quote velocity across related posts.
14. **Creator analytics** — inspect which replies drive secondary engagement.
15. **Market research** — gather qualitative reactions at scale.
16. **Legal / compliance archives** — store time-stamped public post snapshots.
17. **Product feedback mining** — extract reply themes under product tweets.
18. **PR measurement** — quantify quote sentiment around press posts.
19. **Bot / spam studies** — analyze engagement-user metadata distributions.
20. **Automation** — schedule Apify Tasks to scrape known tweet IDs nightly.

***

### Performance

- **Parallel processing** of multiple tweet inputs (bounded concurrency)
- **Cursor pagination** for replies, quotes, likers, and reposters
- **Empty-page retries** on first-page flakiness
- **Rate limiting** between backend requests
- **Selective execution** — disabled features skip network calls
- **Deduping** of tweet IDs and output rows

Actual speed depends on conversation size, enabled engagement lists, and platform responsiveness. Start with one tweet and moderate limits, then scale.

***

### Best practices

1. **Don’t enable everything by default.** Details + replies covers most monitoring needs.
2. **Use reposters for amplification.** Likers are often empty even when like counts are high.
3. **Cap replies on viral posts.** A mega-thread can be huge — set `maxReplies` intentionally.
4. **Batch tweet URLs** that share a campaign, not unrelated firehoses.
5. **Keep rich-entity toggles on** for details-only runs — they add fields without extra list crawls.
6. **Schedule follow-ups.** Conversations evolve; re-scrape key IDs after 1h / 24h.
7. **Separate datasets downstream.** Store `replies` and `engagement` in different tables for cleaner analytics.
8. **Validate one URL first** before a 500-tweet job.
9. **Prefer status URLs with numeric IDs** for unambiguous targeting.
10. **Respect laws and policies** for scraping and storing personal data in your region.

***

### FAQ

#### Does this require an X login in the input?

No. You provide tweet URLs/IDs; the Actor uses its configured backend. Configure any required environment secrets in Apify Actor settings as documented for your deployment.

#### Can I scrape multiple tweets in one run?

Yes. Pass an array of URLs/IDs in `tweets`. Duplicates are removed automatically.

#### How deep do conversations go?

Replies are paginated up to `maxReplies`. With `expandThread: true`, each reply includes a computed `depth` based on parent relationships observed in the collected set.

#### Can I get quote tweets?

Yes — enable `scrapeQuotes` and set `maxQuotes`.

#### Can I scrape who liked a tweet?

You can enable `scrapeLikers`, but **X often does not expose liker lists** to third-party scrapers even when the tweet shows a large like count. Treat likers as best-effort. Reposters are typically more reliable for amplification analysis.

#### Can I scrape who reposted a tweet?

Yes — enable `scrapeReposters`.

#### Are media, polls, and Community Notes separate API crawls?

No. They are parsed from the tweet detail payload when present. Toggle `includeMedia`, `includePolls`, `includeCards`, and `includeCommunityNotes` to include/exclude those fields on detail rows.

#### Can I export JSON?

Yes. Apify datasets support JSON, CSV, Excel, and API access.

#### Does it work with twitter.com and x.com links?

Yes.

#### What if a tweet is deleted or protected?

Detail fetch fails for that ID; the Actor records an error row and skips dependent scrapes for that tweet.

#### Is this an official Twitter / X API?

No. It is a scraping Actor on Apify and should be treated as a **Twitter API alternative** for public tweet/conversation extraction — not an official X product.

***

### Limitations

- **Public tweets only.** Deleted, withheld, protected, or otherwise non-accessible posts cannot be fully scraped.
- **Liker availability is limited by X.** Empty liker results with a non-zero `likeCount` are common and usually reflect platform visibility rules, not a missed toggle.
- **Quote / engagement completeness** depends on what X returns for that post and how far you paginate.
- **Community Notes, polls, and cards** appear only when present on the tweet payload.
- **Field schemas can evolve** as upstream X response shapes change.
- **Not a firehose.** This Actor targets specific tweet IDs/URLs you provide — it does not stream the global public timeline.
- **You are responsible** for lawful use, retention policies, and compliance with Apify and platform terms.

***

### Why this Actor vs piecing tools together

| Need | Multiple narrow tools | **X Tweet Scraper New** |
|---|---|---|
| Tweet text + author | Tool A | Tweet Details |
| Replies / thread | Tool B | Replies + depth |
| Quotes | Tool C | Quotes toggle |
| Reposters / likers | Tool D | Engagement tab |
| Media / polls / notes | Custom parsing | Parsed on detail rows |
| One Apify Task | Glue scripts | Single configurable run |

Use focused Actors when you always need one slice. Use this Actor when you want **conversation-complete** exports from a marketplace-ready control panel.

***

### SEO keywords (naturally covered)

Tweet Scraper · Twitter Scraper · X Scraper · Twitter conversation scraper · Export X data · Twitter API alternative · Scrape tweet replies · Quote tweet scraper · Twitter engagement scraper

***

### Getting started

1. Open **X Tweet Scraper New** on Apify.
2. Paste a public tweet URL.
3. Keep Details + Replies on (defaults), or enable Quotes / Reposters as needed.
4. Click **Start**.
5. Review **Tweets**, **Replies**, **Quotes**, and **Engagement** tabs — or download the combined dataset.

You’ll get structured conversation data you can analyze, store, or pipe into the rest of your stack.

# Actor input Schema

## `tweets` (type: `array`):

One or more public tweet URLs or numeric tweet IDs.

## `scrapeTweetDetails` (type: `boolean`):

Scrape the root tweet (text, author, engagement counts, and optional rich entities).

## `scrapeReplies` (type: `boolean`):

Scrape replies to each tweet.

## `scrapeConversationThread` (type: `boolean`):

Fetch the conversation timeline (same endpoint as replies). Enable with Replies or alone.

## `expandThread` (type: `boolean`):

Compute reply depth from parent relationships for nested conversation structure.

## `scrapeQuotes` (type: `boolean`):

Scrape quote tweets referencing each root tweet.

## `scrapeLikers` (type: `boolean`):

Scrape users who liked each tweet.

## `scrapeReposters` (type: `boolean`):

Scrape users who reposted each tweet.

## `includeMedia` (type: `boolean`):

Include media objects (photos/videos) on tweet detail rows when present.

## `includePolls` (type: `boolean`):

Include poll choices and vote counts when the tweet has a poll card.

## `includeCards` (type: `boolean`):

Include linked card metadata (title, URL, binding values) when present.

## `includeCommunityNotes` (type: `boolean`):

Include Community Notes / Birdwatch data when available on the tweet.

## `maxReplies` (type: `integer`):

Maximum replies / conversation items per tweet.

## `maxQuotes` (type: `integer`):

Maximum quote tweets per root tweet.

## `maxLikers` (type: `integer`):

Maximum likers per tweet.

## `maxReposters` (type: `integer`):

Maximum reposters per tweet.

## Actor input object example

```json
{
  "tweets": [
    "https://x.com/elonmusk/status/2066538446781382800"
  ],
  "scrapeTweetDetails": true,
  "scrapeReplies": true,
  "scrapeConversationThread": true,
  "expandThread": true,
  "scrapeQuotes": false,
  "scrapeLikers": false,
  "scrapeReposters": false,
  "includeMedia": true,
  "includePolls": true,
  "includeCards": true,
  "includeCommunityNotes": true,
  "maxReplies": 100,
  "maxQuotes": 100,
  "maxLikers": 100,
  "maxReposters": 100
}
```

# Actor output Schema

## `tweets` (type: `string`):

Root tweet detail rows.

## `replies` (type: `string`):

Reply / conversation rows.

## `quotes` (type: `string`):

Quote tweet rows.

## `engagement` (type: `string`):

Likers and reposters.

## `dataset` (type: `string`):

Every scraped row in one dataset.

# 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 = {
    "tweets": [
        "https://x.com/elonmusk/status/2066538446781382800"
    ],
    "scrapeTweetDetails": true,
    "scrapeReplies": true,
    "scrapeConversationThread": true,
    "expandThread": true,
    "scrapeQuotes": false,
    "scrapeLikers": false,
    "scrapeReposters": false,
    "includeMedia": true,
    "includePolls": true,
    "includeCards": true,
    "includeCommunityNotes": true,
    "maxReplies": 100,
    "maxQuotes": 100,
    "maxLikers": 100,
    "maxReposters": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("datadoping/x-twitter-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 = {
    "tweets": ["https://x.com/elonmusk/status/2066538446781382800"],
    "scrapeTweetDetails": True,
    "scrapeReplies": True,
    "scrapeConversationThread": True,
    "expandThread": True,
    "scrapeQuotes": False,
    "scrapeLikers": False,
    "scrapeReposters": False,
    "includeMedia": True,
    "includePolls": True,
    "includeCards": True,
    "includeCommunityNotes": True,
    "maxReplies": 100,
    "maxQuotes": 100,
    "maxLikers": 100,
    "maxReposters": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("datadoping/x-twitter-tweet-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 '{
  "tweets": [
    "https://x.com/elonmusk/status/2066538446781382800"
  ],
  "scrapeTweetDetails": true,
  "scrapeReplies": true,
  "scrapeConversationThread": true,
  "expandThread": true,
  "scrapeQuotes": false,
  "scrapeLikers": false,
  "scrapeReposters": false,
  "includeMedia": true,
  "includePolls": true,
  "includeCards": true,
  "includeCommunityNotes": true,
  "maxReplies": 100,
  "maxQuotes": 100,
  "maxLikers": 100,
  "maxReposters": 100
}' |
apify call datadoping/x-twitter-tweet-scraper --silent --output-dataset

```

## MCP server setup

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