# X (Twitter) Quote Tweets Scraper (`khadinakbar/x-twitter-quote-tweets-scraper`) Actor

Scrape the public quote tweets that cited any X/Twitter post URL or numeric ID. Each row includes the quote tweet's full text, author profile, engagement, media, and the original quoted post as context. No user cookies or X login required.

- **URL**: https://apify.com/khadinakbar/x-twitter-quote-tweets-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Automation, MCP servers
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 quote tweet scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 (Twitter) Quote Tweets Scraper

Extract the public quote tweets (retweets with a comment) that are citing any X/Twitter post. Give the actor a post URL or its numeric tweet ID and it returns one normalized record per public quote tweet, including the quoting account's commentary, author profile, engagement, media, and a nested context object for the original post being quoted.

Use it for social listening on a post, identifying top amplifiers, tracking who is responding to an announcement, and monitoring brand or creator mentions. Do not use it for timeline crawls, keyword search over all of X, replies without a quote, or private/deleted content.

### What it returns

Every dataset row is one public quote tweet. Key fields include:

| Field | Description |
| --- | --- |
| `tweetUrl`, `text`, `createdAt` | The public quote post and its creation time |
| `authorUsername`, `authorName`, `authorFollowersCount` | Public identity and profile context of the quoting account |
| `likeCount`, `replyCount`, `repostCount`, `viewCount` | Engagement values when X returns them |
| `hashtags`, `mentionedUsernames`, `outboundUrls`, `mediaUrls` | Content context of the quote |
| `quotedTweet` | Nested context of the original post being quoted (its text, author, and engagement) |
| `provider`, `position`, `scrapedAt` | Source, ordering, and freshness |

### When to use it

- See who publicly quoted a specific post and what they said.
- Rank the top amplifiers of a post by author follower count.
- Build a small, structured snapshot of public reactions for sentiment or engagement analysis.

### When not to use it

- For full profile timelines, keyword search, followers, or reply-only threads.
- For private, login-only, deleted, or historical content outside the source's current public snapshot.
- When you need more than the most recent quote tweets of a post (output is capped by `maxQuotesPerTweet`).

### Input

```json
{
  "tweetUrls": ["https://x.com/OpenAI/status/2065225362544726371"],
  "maxQuotesPerTweet": 100,
  "maxPagesPerTweet": 3,
  "deduplicateQuotes": true
}
```

`tweetUrls` accepts canonical `x.com`, `twitter.com`, or `mobile.twitter.com` post URLs, or a bare numeric tweet ID. The actor supports up to 5 posts per run, up to 500 quote tweets per post, and up to 10 pagination pages per post. It uses SociaVault and requires no X cookie or user login.

### Output

```json
{
  "recordType": "quote",
  "targetTweetId": "2065225362544726371",
  "quoteTweetId": "2065250261493600416",
  "tweetUrl": "https://x.com/theo/status/2065250261493600416",
  "text": "This might actually be a bit too generous.",
  "authorUsername": "theo",
  "authorFollowersCount": 1200,
  "likeCount": 8500,
  "viewCount": 409113,
  "quotedOriginalTweetId": "2065225362544726371",
  "quotedOriginalUsername": "OpenAI",
  "quotedTweet": {
    "tweetId": "2065225362544726371",
    "text": "We heard you wanted to use Codex rate limit resets on your own schedule.",
    "authorUsername": "OpenAI",
    "authorFollowers": 8800000
  },
  "provider": "sociavault",
  "scrapedAt": "2026-08-17T12:35:00.000Z"
}
```

The actor writes a compact `OUTPUT` record and a diagnostic `RUN_SUMMARY` record on every terminal path. Valid posts with no quote tweets finish successfully with `VALID_EMPTY`; provider outages with no useful records end honestly as `UPSTREAM_FAILED`; owner-secret problems end as `CONFIG_ERROR`.

### Pricing

This actor uses Pay per event + platform usage:

| Event | Price |
| --- | ---: |
| Actor start | $0.00005 |
| Validated quote tweet saved | $0.005 |

For example, 100 quote tweets cost $0.50 in quote events plus the $0.00005 start event. Apify platform compute and usage are charged separately under the Pay per event + usage setting. The actor displays the maximum possible quote-event charge before it starts saving data.

# Actor input Schema

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

Use this when you need the quote tweets that cited specific X/Twitter posts. Accepts a post URL such as https://x.com/OpenAI/status/2065225362544726371 or its numeric ID. Provide from 1 to 5 posts; the actor reads quote tweets for each. This is not a profile URL, handle, hashtag, keyword, or replies/retweets field.

## `maxQuotesPerTweet` (type: `integer`):

Use this to cap the number of quote-tweet rows kept for each supplied post, for example 50. The accepted range is 1 to 500 and the default is 100. This is a hard cap and the primary cost control; the actor never persists or charges beyond it. It does not guarantee every post has this many public quotes.

## `maxPagesPerTweet` (type: `integer`):

Use this to control how many cursor-linked result pages the actor walks for each post, for example 5. Each page returns up to about 20 public quote tweets, so pages multiplied by 20 approximates the raw fetch depth before the hard result cap applies. The accepted range is 1 to 10 and the default is 3. This is not a per-page charge and does not exceed maxQuotesPerTweet.

## `deduplicateQuotes` (type: `boolean`):

Use this to avoid persisting the same quote-tweet ID twice when pagination returns a repeated entry. Defaults to true and compares the stable X tweet ID across the current run. Set it to false only when you intentionally want every source occurrence. This does not deduplicate similar text with different tweet IDs.

## Actor input object example

```json
{
  "tweetUrls": [
    "https://x.com/OpenAI/status/2065225362544726371"
  ],
  "maxQuotesPerTweet": 100,
  "maxPagesPerTweet": 3,
  "deduplicateQuotes": true
}
```

# Actor output Schema

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

No description

## `output` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tweetUrls": [
        "https://x.com/OpenAI/status/2065225362544726371"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/x-twitter-quote-tweets-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 = { "tweetUrls": ["https://x.com/OpenAI/status/2065225362544726371"] }

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/x-twitter-quote-tweets-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 '{
  "tweetUrls": [
    "https://x.com/OpenAI/status/2065225362544726371"
  ]
}' |
apify call khadinakbar/x-twitter-quote-tweets-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/x-twitter-quote-tweets-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/YBIfuzgS2gxtgJHgM/builds/lBcvkz6kKQOo1bRrZ/openapi.json
