# Twitter (X) Thread Scraper: Extract Complete Conversations (`fastcrawler/twitter-x-thread-scraper-extract-complete-conversations`) Actor

Extract complete X (Twitter) threads and conversations. Just input a tweet URL to scrape the main post and all connected replies. Export structured data (JSON/CSV) perfect for analytics, AI agents, and custom workflows. Run via API, schedule tasks, and integrate seamlessly.

- **URL**: https://apify.com/fastcrawler/twitter-x-thread-scraper-extract-complete-conversations.md
- **Developed by:** [fastcrawler](https://apify.com/fastcrawler) (community)
- **Categories:** Social media, Agents, MCP servers
- **Stats:** 28 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

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

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

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

# README

## 🧵 Twitter (X) Thread Scraper: Extract Complete Conversations

**Twitter (X) Thread Scraper** is a powerful and reliable Apify actor designed to effortlessly extract full threads and conversations from X (formerly Twitter).

Instead of manually copying tweets or dealing with complex API rate limits, this tool automatically collects the root tweet and all connected replies, delivering clean, structured data ready for your next project.

***

### 🚀 Why use this Scraper? (Top Use Cases)

Adding context to data is crucial. This scraper is built for professionals who need complete conversational data:

- **🤖 AI Agents & LLM Training:** Extract high-quality, contextual dialogue and reasoning data to feed your custom models or AI workflows.
- **📊 Analytics & Market Research:** Analyze audience sentiment, engagement metrics, and discussions around specific topics or brands.
- **🗄️ Content Archiving & Curation:** Backup valuable multi-part tutorials, industry insights, and discussions before they get lost.

***

### ✨ Key Features

- **🎯 Full Thread Extraction:** Input a tweet URL and automatically scrape the main post plus all connected replies from the author.
- **🔄 Flexible Input Options:** Scrape a single tweet URL, a bulk list of URLs, or use targeted keyword searches.
- **📦 Rich Data Points:** Collect comprehensive metadata including tweet text, Tweet IDs, author details (handles, names), precise timestamps, media URLs (images/videos), and full engagement metrics (likes, reposts, quotes).
- **🛠 Developer-Friendly Exports:** Download your scraped datasets in structured formats like **JSON, CSV, XML, or Excel**.
- **⚡️ Scalable & Reliable:** Built with robust error handling to support large-scale scraping runs and seamlessly integrate with Apify API and webhooks.

***

### 🛠 How it Works (Input Configuration)

You can configure the scraper by providing one of the following inputs:

1. **Single Tweet URL** → Scrapes the entire thread originating from that specific tweet.
2. **List of Tweet URLs** → Processes multiple thread URLs in a single run.
3. **Keyword Search** → Finds top tweets matching your keywords and extracts their full threads.

**Example Input (JSON):**

```json
{
  "tweetId": "1966378394427470005"
}

```

***

### 💡 Seamless Integration

Once your run is complete, you can effortlessly connect the extracted data to your favorite tools, databases, or AI platforms using the Apify API, Make, or Zapier.

### 📊 Output Example

The scraper returns clean, structured data designed for easy parsing. Here is a sample output of a scraped thread showing the root tweet and its connected replies:

````json
[
  {
    "tweetId": "1966378394427470005",
    "text": "Just shipped the new Twitter (X) Thread Scraper! 🚀\n\nExtract complete conversations for your AI agents and analytics. Thread below on how to use it 👇",
    "createdAt": "2026-05-19T10:00:00.000Z",
    "author": {
      "userName": "indie_dev_daily",
      "name": "Dev Maker",
      "isVerified": true,
      "followers": 24500
    },
    "media": [],
    "metrics": {
      "likes": 856,
      "reposts": 142,
      "replies": 38,
      "quotes": 12
    },
    "isReply": false,
    "conversationId": "1966378394427470005",
    "url": "[https://x.com/indie_dev_daily/status/1966378394427470005](https://x.com/indie_dev_daily/status/1966378394427470005)"
  },
  {
    "tweetId": "1966378450123450001",
    "text": "1/ Flexible Inputs 🛠️\n\nYou can input a single tweet URL, a bulk list, or use keyword searches. The scraper will traverse the entire thread and fetch all connected replies seamlessly.",
    "createdAt": "2026-05-19T10:02:15.000Z",
    "author": {
      "userName": "indie_dev_daily",
      "name": "Dev Maker",
      "isVerified": true,
      "followers": 24500
    },
    "media": [
      {
        "type": "photo",
        "url": "[https://pbs.twimg.com/media/ExampleScraperConfig.jpg](https://pbs.twimg.com/media/ExampleScraperConfig.jpg)"
      }
    ],
    "metrics": {
      "likes": 210,
      "reposts": 25,
      "replies": 4,
      "quotes": 1
    },
    "isReply": true,
    "inReplyToTweetId": "1966378394427470005",
    "conversationId": "1966378394427470005",
    "url": "[https://x.com/indie_dev_daily/status/1966378450123450001](https://x.com/indie_dev_daily/status/1966378450123450001)"
  }
]

# Actor input Schema

## `tweetId` (type: `string`):

The id of tweet you want to get the data from.

## Actor input object example

```json
{
  "tweetId": "tweet_id"
}
````

# 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 = {
    "tweetId": "tweet_id"
};

// Run the Actor and wait for it to finish
const run = await client.actor("fastcrawler/twitter-x-thread-scraper-extract-complete-conversations").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 = { "tweetId": "tweet_id" }

# Run the Actor and wait for it to finish
run = client.actor("fastcrawler/twitter-x-thread-scraper-extract-complete-conversations").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 '{
  "tweetId": "tweet_id"
}' |
apify call fastcrawler/twitter-x-thread-scraper-extract-complete-conversations --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XvRGtvuCH1X9AynaU/builds/omU003nBWZad0CUwa/openapi.json
