# X(Twitter) Post Quotes Scraper (`powerai/twitter-post-quotes-scraper`) Actor

Collect quote posts that reference a given X post—full tweet payloads with authors, text, and nested quoted context.

- **URL**: https://apify.com/powerai/twitter-post-quotes-scraper.md
- **Developed by:** [PowerAI](https://apify.com/powerai) (community)
- **Categories:** Social media, Videos, Integrations
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 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.

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

## X Post Quotes Scraper

Gather **quote posts** that reference a specific **original X post**—the same kind of items people see when they open the “Quotes” view for a post. Each dataset row is one **quote tweet** (the new post that embeds the original), including text, author, engagement, optional location, and—when present—a large nested **`quoted_status_result`** subtree for the embedded original post.

### Who it’s for

- **Social & comms teams** tracking commentary on a flagship post.  
- **Researchers & analysts** who need structured exports instead of scrolling the quote list.  
- **Data workflows** that join quote posts with your own content or campaign ids.

### What you can do with it

- **Target one original post** by its numeric id (from the post URL).  
- **Collect many quote posts** in one run until you reach the limit you set or the list ends.  
- **Match every row** to that original post via **`requestedSourcePostId`**, plus **`scrapedAt`** on each row.

### How it works (in plain terms)

You enter the **original post’s numeric id** (not the `@handle`). The tool loads quote posts in successive batches until your **maximum** is reached or there are no more to load—you do not need to manage paging yourself.

### Input

| Field | Required | What it means |
|-------|----------|----------------|
| **Original post ID** (`tweetId`) | Yes | Which post’s quote posts you want to export. |
| **Maximum results** (`maxResults`) | No | Upper limit on how many quote-post rows to collect (default **50**). |

### Output

- **One row per quote post** (until your cap). Rows are often **very large** because the embedded original post is included in full.  
- **Post identity & stats**: **`__typename`** (`Tweet`), **`rest_id`**, posting **`source`**, **`views`** (**`count`** and **`state`** when shown), **`edit_control`**, **`grok_analysis_button`**, **`is_translatable`**, **`unmention_data`**.  
- **Author**: **`core.user_results.result`** is a **`User`** with **`avatar`**, **`core`** (name/handle), **`legacy`** profile fields, optional **`professional`** (creator categories), **`dm_permissions`**, **`media_permissions`**, **`relationship_perspectives`**, **`verification`**, **`tipjar_settings`**, etc.  
- **Quote post body**: **`legacy`** includes **`full_text`**, **`created_at`**, **`conversation_id_str`**, **`display_text_range`**, **`entities`**, **`bookmark_count`**, engagement counters, **`lang`**, **`is_quote_status`**, **`quoted_status_id_str`**, **`quoted_status_permalink`**, **`user_id_str`**, and optionally **`place`** (geo polygon, name, country) when the quote post is geotagged.  
- **Embedded original**: **`quoted_status_result.result`** is typically another full **`Tweet`** (same general shape—**`core`**, **`legacy`**, media in **`extended_entities`**, **`views`**, etc.). This block alone can be hundreds of lines.  
- **Export metadata**: **`requestedSourcePostId`** repeats the original post id you asked for; **`scrapedAt`** is when that row was saved.

Optional fields vary by post. Details may change as X updates its product.

#### Sample output (one dataset row, heavily trimmed)

The JSON below keeps real ids and text from a typical row but omits most of **`quoted_status_result`** (the embedded original) and shortens **`core.user_results`**.

```json
{
  "__typename": "Tweet",
  "core": {
    "user_results": {
      "result": {
        "__typename": "User",
        "rest_id": "285493427",
        "core": {
          "name": "Makhareezy",
          "screen_name": "Makharanga"
        },
        "legacy": {
          "description": "Success is power through God••…"
        },
        "professional": {
          "professional_type": "Creator",
          "category": [{ "name": "Podcast", "id": 979 }]
        }
      }
    }
  },
  "edit_control": {
    "edit_tweet_ids": ["1623502970271801350"],
    "is_edit_eligible": true,
    "edits_remaining": "5"
  },
  "legacy": {
    "full_text": "History made ... What's crazy is about 10% of the world does watch his videos",
    "created_at": "Thu Feb 09 02:04:05 +0000 2023",
    "conversation_id_str": "1623502970271801350",
    "is_quote_status": true,
    "quoted_status_id_str": "1552735248026411010",
    "quoted_status_permalink": {
      "display": "x.com/MrBeast/status…",
      "expanded": "https://twitter.com/MrBeast/status/1552735248026411010",
      "url": "https://t.co/PkizCMdfCk"
    },
    "favorite_count": 0,
    "retweet_count": 0,
    "reply_count": 0,
    "quote_count": 0
  },
  "quoted_status_result": {
    "result": {
      "__typename": "Tweet",
      "rest_id": "1552735248026411010",
      "legacy": {
        "full_text": "Over a million people celebrated 100,000,000 subscribers with me 🥹…"
      }
    }
  },
  "rest_id": "1623502970271801350",
  "source": "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>",
  "views": {
    "count": "36",
    "state": "EnabledWithCount"
  },
  "requestedSourcePostId": "1552735248026411010",
  "scrapedAt": "2026-03-26T02:23:32.336Z"
}
````

### Good to know

- **Private, deleted, or limited posts** may return few or no quote rows.
- Respect X’s rules and applicable laws when using exported data.

# Actor input Schema

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

The numeric id of the post you want quote posts for (the post that others are quoting in the quote-post view).

## `maxResults` (type: `integer`):

How many quote-post rows to save in total.

## Actor input object example

```json
{
  "tweetId": "1552735248026411010",
  "maxResults": 10
}
```

# 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": "1552735248026411010",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerai/twitter-post-quotes-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 = {
    "tweetId": "1552735248026411010",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("powerai/twitter-post-quotes-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 '{
  "tweetId": "1552735248026411010",
  "maxResults": 10
}' |
apify call powerai/twitter-post-quotes-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X(Twitter) Post Quotes Scraper",
        "description": "Collect quote posts that reference a given X post—full tweet payloads with authors, text, and nested quoted context.",
        "version": "0.0",
        "x-build-id": "f6GMXcLNv4GZESexf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/powerai~twitter-post-quotes-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-powerai-twitter-post-quotes-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/powerai~twitter-post-quotes-scraper/runs": {
            "post": {
                "operationId": "runs-sync-powerai-twitter-post-quotes-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/powerai~twitter-post-quotes-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-powerai-twitter-post-quotes-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",
                "required": [
                    "tweetId"
                ],
                "properties": {
                    "tweetId": {
                        "title": "Original post ID",
                        "type": "string",
                        "description": "The numeric id of the post you want quote posts for (the post that others are quoting in the quote-post view).",
                        "default": "1552735248026411010"
                    },
                    "maxResults": {
                        "title": "Maximum results",
                        "minimum": 20,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "How many quote-post rows to save in total.",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
