# X.com (Twitter) Tweet Scraper (`lurkapi/x-twitter-tweet-scraper`) Actor

Scrape tweets from X.com by profile handle, tweet URL, search query (advanced operators), or list. Pay per tweet. Optional add-ons: full author enrichment, thread expansion, media URLs, language detection.

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

## Pricing

from $0.40 / 1,000 tweet scrapeds

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.com (Twitter) Tweet Scraper

Scrape tweets from X.com (formerly Twitter) by search query, profile handle, or tweet URL. Get clean, structured data straight to your spreadsheet, CRM, or dashboard. No X account, no login, no coding needed.

### 🐦 What it does

Pick any combination of these inputs and this tool returns every tweet that matches:

- **Search queries**: X's own advanced search, exactly as you would type it. Works with all the usual operators like `from:elonmusk`, `since:2024-01-01`, `min_faves:100`, `lang:en`, `filter:media`, and dozens more. See the [full operator reference](https://github.com/igorbrigadir/twitter-advanced-search).
- **X handles or profile URLs**: paste `elonmusk` or `https://x.com/openai` to pull that account's recent tweets.
- **Tweet URLs or IDs**: paste `https://x.com/user/status/123` or the numeric ID to fetch one specific tweet.

For every tweet you get:

- The full text (no 280-character truncation on long-form notes)
- Author handle, display name, avatar, and verification badges
- Likes, retweets, replies, quotes, bookmarks, view count
- Attached photos and videos (turn on the download add-on to save the files)
- Hashtags, mentions, and expanded URLs
- Nested quoted tweet and retweeted tweet, when present
- Precise creation timestamp in ISO 8601

### 📋 How to use it

#### Step 1: Pick your inputs

Mix and match any of these in one run:

- **Search queries**: one query per line in the Search queries box.
- **Handles**: usernames or profile URLs in the Handles box.
- **Tweet URLs / IDs**: paste tweet links or numeric IDs.

Every input is optional as long as at least one has a value.

#### Step 2: Set the limit and sort

- **Max tweets per run**: hard cap on how many tweets the run returns. Default is 100 to protect against surprise bills. Raise as high as you need.
- **Sort (search queries only)**: pick Latest for chronological, Top for most engaged, or Media for a media-only feed.

#### Step 3: (Optional) Filter your results

- **Date range**: keep only tweets between a From and To date.
- **Language**: dropdown with every supported language plus X's special codes (mentions only, hashtags only, media only).
- **Minimum likes, retweets, replies, or views**: drop tweets below your threshold.
- **Only from verified accounts**: skip non-verified authors.
- **Exclude replies / retweets**: keep timelines clean.
- **Must have media / link**: keep only tweets with an attached photo or video, or an external link.

Filters are free. Tweets that get filtered out are never billed.

#### Step 4: (Optional) Add-ons

Every add-on is off by default. Each one is billed only when it returns a real result. Failed lookups cost nothing.

- **Full author enrichment**: for every unique author in the run, fetch the full profile (followers, bio, location, joined date, website) plus the "About this account" panel data (country the account is based in, device store region, affiliate handle, verified since date). Billed once per unique author.
- **Expand threads**: when a tweet is part of a conversation, pull every reply in the thread. Attached as `threadTweets[]` on the row.
- **Download media files**: save every photo and video into your run's key-value store. You get a signed download link (kvUrl) on each media item. Billed once per tweet that had at least one file downloaded.
- **Language detection**: run a local language detection pass on tweet text. Useful when X did not tag a language itself.

#### Step 5: Run

Click Start. Rows stream into the Output tab as each page finishes, so you do not have to wait for the whole run.

### 📊 What you get

Every row is one tweet. Five tabs group the fields by what you probably care about:

| Tab | What is in it |
|---|---|
| 📋 Overview | Status, tweet ID, URL, handle, text, date, top counts, source input |
| 🐦 Tweets | Full spread: all six engagement counts, type flags, hashtags, mentions, links |
| 📊 Engagement | Only the numeric counts, ready for sorting or charting |
| 👤 Authors | Author profile columns (fully populated when the Author add-on is on) |
| 🖼️ Media | Tweets that have media. Signed download link per file when the download add-on is on |

You can export from the Output tab as JSON, CSV, or Excel.

Every row has a `status` field. `Success` means the row is good. Anything else is a human-readable message explaining what happened (tweet deleted, handle not found, search infrastructure under load). Rows that did not succeed are never billed.

### 💰 Pricing

You only pay for what you get. Every event is billed per result.

| Event | Rate | When it fires |
|---|---|---|
| Actor run start | $0.005 | Once per run |
| Tweet scraped | $0.40 / 1,000 | Once per successful tweet row |
| Author enrichment | $3.00 / 1,000 | Once per unique author successfully resolved |
| Thread expansion | $10.00 / 1,000 | Once per unique thread expanded |
| Media download | $2.00 / 1,000 | Once per tweet with at least one file saved |
| Language detection | $0.50 / 1,000 | Once per tweet where a language was detected |

**Free trial:** Apify free plans get 10 free search queries per calendar month. Paid Apify plans (Bronze, Silver, Gold, Custom) get unlimited search. Handle and tweet-URL inputs never count against this cap on any plan.

### 💡 Good to know

- **Long text is never truncated.** Long-form notes come back in full, unlike some competitors that cut off at 280 characters.
- **View count is populated on retweets and quoted tweets too**, not just originals.
- **URL forms accepted**: `x.com/user/status/123`, `twitter.com/user/status/123`, `mobile.x.com/...`, and `x.com/i/web/status/123` all work.
- **X search operators that need a logged-in user** (`filter:follows`, `filter:social`, `filter:trusted`, `near:me`) will not return what you expect. Every other operator in the [reference](https://github.com/igorbrigadir/twitter-advanced-search) works.
- **Media files are stored in your Apify key-value store.** How long they are kept depends on your Apify plan.
- **Rows appear in real time.** You can open the Output tab while the run is still going and start pulling data.

### For developers

You can call this actor through the Apify API:

```json
{
    "searchQueries": ["openai since:2024-01-01"],
    "handles": ["elonmusk", "sama"],
    "tweetUrls": ["https://x.com/openai/status/1234567890"],
    "maxItems": 500,
    "sortBy": "Latest",
    "minLikes": 100,
    "language": "en",
    "excludeReplies": true,
    "enrichAuthors": true,
    "extractMedia": true
}
````

Every input field is optional. Provide at least one of `searchQueries`, `handles`, or `tweetUrls`.

### ❓ FAQ

**Why is `viewCount` null on some tweets?**
X started exposing view counts publicly in December 2022. Tweets posted before that date do not have a view count on their API record, so the field comes back null. Rarely, protected or very fresh tweets are missing it too.

**Why is `author.location` empty?**
`author.location` is the free-text Location field the user typed into their own profile. Many users leave it blank. The `author.basedIn` field (from the Author enrichment add-on) is more reliable, since it comes from X's own "Account based in" panel.

**Why did my search query return zero rows?**
Some X search operators only work when the request comes from a logged-in account (`filter:follows`, `filter:social`, `filter:trusted`, `near:me`). Everything else in the [operator reference](https://github.com/igorbrigadir/twitter-advanced-search) works.

**Can I use my own X cookies?**
No. This actor does not accept user cookies.

**How long are downloaded media files stored?**
Files land in your Apify key-value store. Retention depends on your Apify plan.

### 🔗 Other tools you might like

- [Meta Ads (Facebook & Instagram) Scraper](https://apify.com/lurkapi/meta-ads-facebook-instagram-scraper): Scrape ads from Meta's public Ad Library with the same pay-per-result model.
- [TikTok Scraper](https://apify.com/lurkapi/tiktok-scraper-all-in-one): Videos, profiles, hashtags, sounds, keyword search, all in one actor.
- [YouTube Scraper by Keyword Search](https://apify.com/lurkapi/youtube-keyword-search-scraper): Search YouTube for any keyword and pull every video or Short that shows up.

### ⚖️ Disclaimer

This tool is intended for personal, research, and educational use. You are responsible for complying with X.com's Terms of Service and applicable laws in your jurisdiction. The developer is not liable for misuse. Data availability depends on X at run time.

**Keywords:** twitter scraper, x.com scraper, tweet scraper, x api alternative, no login twitter scraper, social media data

# Actor input Schema

## `searchQueries` (type: `array`):

X advanced-search queries. Supports the full operator syntax: from:elonmusk, since:2024-01-01, until:2024-12-31, min\_faves:100, min\_retweets:50, min\_replies:10, lang:en, filter:media, filter:images, filter:videos, filter:links, -filter:replies, -filter:nativeretweets, "exact phrase". (Limited to 10 free queries per calendar month for Apify free plans). 📚 [Documentation](https://github.com/igorbrigadir/twitter-advanced-search)

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

Usernames (e.g. elonmusk) or profile URLs (https://x.com/elonmusk). Scrapes the user's recent tweets. No monthly limit on any plan.

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

Specific tweet URLs (https://x.com/user/status/123) or numeric IDs. One tweet per entry. No monthly limit on any plan.

## `maxItems` (type: `integer`):

Hard cap on total tweets returned across all inputs. Default 100.

## `sortBy` (type: `string`):

Result sort for search queries. Top = most-engaged first. Latest = chronological. Media = media-only feed. Ignored for handle/tweet-URL inputs.

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

Earliest tweet date (YYYY-MM-DD).

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

Latest tweet date (YYYY-MM-DD).

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

Keep only tweets in this language. Search queries: injected as `lang:<code>`. Handles/tweet URLs: applied as a post-filter. Includes X's non-language pseudo-codes (mentions-only, hashtags-only, media-only, etc).

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

Drop tweets below this favorite count.

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

Drop tweets below this retweet count.

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

Drop tweets below this reply count.

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

Drop tweets below this view count.

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

Drop tweets from unverified accounts.

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

Drop reply tweets.

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

Drop retweets.

## `mustHaveMedia` (type: `boolean`):

Keep only tweets with attached photo/video.

## `mustHaveLink` (type: `boolean`):

Keep only tweets with at least one external link.

## `enrichAuthors` (type: `boolean`):

For each unique author seen in the run, fetch full profile: followers, following, bio, location, joined date, tweet count, banner, website. Charged per unique author successfully resolved (not per tweet).

## `expandThreads` (type: `boolean`):

When a tweet is part of a conversation, fetch all sibling tweets in the thread. Attached as `threadTweets[]` on the parent row. Charged once per unique thread expanded.

## `extractMedia` (type: `boolean`):

Download every photo and video attached to a tweet into the run's key-value store. Each media\[] item gets kvKey + kvUrl (signed public link) + bytes. Files: jpg/png/webp/gif for photos, mp4 for video/animated\_gif. Charged once per tweet with ≥1 file downloaded.

## `detectLanguage` (type: `boolean`):

Local language detection on tweet text (populates `detectedLanguage`). Useful when X did not return a `lang` code. Charged only when detection returned a result.

## `outputId` (type: `boolean`):

Numeric tweet ID.

## `outputUrl` (type: `boolean`):

Canonical tweet URL.

## `outputFullText` (type: `boolean`):

Full tweet text (long-form notes never 280-char truncated).

## `outputCreatedAt` (type: `boolean`):

ISO-8601 creation timestamp.

## `outputLang` (type: `boolean`):

Source language as returned by X.

## `outputReplyCount` (type: `boolean`):

Reply count.

## `outputRetweetCount` (type: `boolean`):

Retweet count.

## `outputLikeCount` (type: `boolean`):

Favorite/like count.

## `outputQuoteCount` (type: `boolean`):

Quote-tweet count.

## `outputBookmarkCount` (type: `boolean`):

Bookmark count.

## `outputViewCount` (type: `boolean`):

View count (populated for retweets/quoted tweets, unlike some competitors).

## `outputIsReply` (type: `boolean`):

Boolean flag for reply tweets.

## `outputIsRetweet` (type: `boolean`):

Boolean flag for retweets.

## `outputIsQuote` (type: `boolean`):

Boolean flag for quote tweets.

## `outputConversationId` (type: `boolean`):

Conversation root ID (useful for grouping threads).

## `outputInReplyTo` (type: `boolean`):

inReplyToTweetId + inReplyToScreenName when the tweet is a reply.

## `outputMentions` (type: `boolean`):

@-mentions array.

## `outputHashtags` (type: `boolean`):

Hashtags array.

## `outputUrls` (type: `boolean`):

Expanded URLs in tweet.

## `outputMedia` (type: `boolean`):

Media array. Only present when the extractMedia add-on is enabled.

## `outputAuthor` (type: `boolean`):

Author block (id, screenName, name, profileImageUrl, verification flags).

## `outputQuotedTweet` (type: `boolean`):

Nested quoted-tweet object when present.

## `outputRetweetedTweet` (type: `boolean`):

Nested retweeted-tweet object when present.

## `forceFreePlanForTesting` (type: `boolean`):

Internal testing toggle. When true, the free-trial cap activates even if the Apify account is on a paid plan.

## Actor input object example

```json
{
  "searchQueries": [
    "openai since:2024-01-01"
  ],
  "handles": [
    "elonmusk"
  ],
  "tweetUrls": [],
  "maxItems": 20,
  "sortBy": "Latest",
  "language": "",
  "onlyVerified": false,
  "excludeReplies": false,
  "excludeRetweets": false,
  "mustHaveMedia": false,
  "mustHaveLink": false,
  "enrichAuthors": false,
  "expandThreads": false,
  "extractMedia": false,
  "detectLanguage": false,
  "outputId": true,
  "outputUrl": true,
  "outputFullText": true,
  "outputCreatedAt": true,
  "outputLang": true,
  "outputReplyCount": true,
  "outputRetweetCount": true,
  "outputLikeCount": true,
  "outputQuoteCount": true,
  "outputBookmarkCount": true,
  "outputViewCount": true,
  "outputIsReply": true,
  "outputIsRetweet": true,
  "outputIsQuote": true,
  "outputConversationId": true,
  "outputInReplyTo": true,
  "outputMentions": true,
  "outputHashtags": true,
  "outputUrls": true,
  "outputMedia": true,
  "outputAuthor": true,
  "outputQuotedTweet": true,
  "outputRetweetedTweet": true,
  "forceFreePlanForTesting": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Status, ID, URL, handle, text, timestamp, top counts, source.

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

Full per-tweet spread — text, all counts, flags, hashtags, mentions, links.

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

Likes, retweets, replies, quotes, bookmarks, views per tweet.

## `authors` (type: `string`):

Author profile columns (fully populated when enrichAuthors add-on is on).

## `media` (type: `string`):

Tweets with attached media. kvUrl per file populated when extractMedia add-on is on.

# 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 = {
    "searchQueries": [
        "openai since:2024-01-01"
    ],
    "handles": [
        "elonmusk"
    ],
    "tweetUrls": [],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("lurkapi/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 = {
    "searchQueries": ["openai since:2024-01-01"],
    "handles": ["elonmusk"],
    "tweetUrls": [],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("lurkapi/x-twitter-tweet-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 '{
  "searchQueries": [
    "openai since:2024-01-01"
  ],
  "handles": [
    "elonmusk"
  ],
  "tweetUrls": [],
  "maxItems": 20
}' |
apify call lurkapi/x-twitter-tweet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X.com (Twitter) Tweet Scraper",
        "description": "Scrape tweets from X.com by profile handle, tweet URL, search query (advanced operators), or list. Pay per tweet. Optional add-ons: full author enrichment, thread expansion, media URLs, language detection.",
        "version": "0.0",
        "x-build-id": "l6XdwF89dOCmNdCJu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lurkapi~x-twitter-tweet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lurkapi-x-twitter-tweet-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/lurkapi~x-twitter-tweet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lurkapi-x-twitter-tweet-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/lurkapi~x-twitter-tweet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lurkapi-x-twitter-tweet-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",
                "properties": {
                    "searchQueries": {
                        "title": "🔍 Search queries",
                        "type": "array",
                        "description": "X advanced-search queries. Supports the full operator syntax: from:elonmusk, since:2024-01-01, until:2024-12-31, min_faves:100, min_retweets:50, min_replies:10, lang:en, filter:media, filter:images, filter:videos, filter:links, -filter:replies, -filter:nativeretweets, \"exact phrase\". (Limited to 10 free queries per calendar month for Apify free plans). 📚 [Documentation](https://github.com/igorbrigadir/twitter-advanced-search)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "handles": {
                        "title": "👤 X handles / profile URLs",
                        "type": "array",
                        "description": "Usernames (e.g. elonmusk) or profile URLs (https://x.com/elonmusk). Scrapes the user's recent tweets. No monthly limit on any plan.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tweetUrls": {
                        "title": "🔗 Tweet URLs / IDs",
                        "type": "array",
                        "description": "Specific tweet URLs (https://x.com/user/status/123) or numeric IDs. One tweet per entry. No monthly limit on any plan.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max tweets per run",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on total tweets returned across all inputs. Default 100.",
                        "default": 100
                    },
                    "sortBy": {
                        "title": "Sort (search queries only)",
                        "enum": [
                            "Latest",
                            "Top",
                            "Media"
                        ],
                        "type": "string",
                        "description": "Result sort for search queries. Top = most-engaged first. Latest = chronological. Media = media-only feed. Ignored for handle/tweet-URL inputs.",
                        "default": "Latest"
                    },
                    "dateFrom": {
                        "title": "From date",
                        "type": "string",
                        "description": "Earliest tweet date (YYYY-MM-DD)."
                    },
                    "dateTo": {
                        "title": "To date",
                        "type": "string",
                        "description": "Latest tweet date (YYYY-MM-DD)."
                    },
                    "language": {
                        "title": "Language",
                        "enum": [
                            "",
                            "en",
                            "es",
                            "pt",
                            "ja",
                            "ar",
                            "ko",
                            "fr",
                            "de",
                            "id",
                            "tr",
                            "ru",
                            "it",
                            "th",
                            "hi",
                            "nl",
                            "pl",
                            "sv",
                            "zh",
                            "vi",
                            "fa",
                            "ro",
                            "uk",
                            "he",
                            "el",
                            "cs",
                            "hu",
                            "no",
                            "da",
                            "fi",
                            "bg",
                            "sk",
                            "sl",
                            "hr",
                            "sr",
                            "ms",
                            "ca",
                            "tl",
                            "lv",
                            "lt",
                            "et",
                            "und",
                            "qam",
                            "qct",
                            "qht",
                            "qme",
                            "qst",
                            "zxx"
                        ],
                        "type": "string",
                        "description": "Keep only tweets in this language. Search queries: injected as `lang:<code>`. Handles/tweet URLs: applied as a post-filter. Includes X's non-language pseudo-codes (mentions-only, hashtags-only, media-only, etc).",
                        "default": ""
                    },
                    "minLikes": {
                        "title": "Minimum likes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this favorite count."
                    },
                    "minRetweets": {
                        "title": "Minimum retweets",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this retweet count."
                    },
                    "minReplies": {
                        "title": "Minimum replies",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this reply count."
                    },
                    "minViews": {
                        "title": "Minimum views",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this view count."
                    },
                    "onlyVerified": {
                        "title": "Only from verified accounts",
                        "type": "boolean",
                        "description": "Drop tweets from unverified accounts.",
                        "default": false
                    },
                    "excludeReplies": {
                        "title": "Exclude replies",
                        "type": "boolean",
                        "description": "Drop reply tweets.",
                        "default": false
                    },
                    "excludeRetweets": {
                        "title": "Exclude retweets",
                        "type": "boolean",
                        "description": "Drop retweets.",
                        "default": false
                    },
                    "mustHaveMedia": {
                        "title": "Must have media",
                        "type": "boolean",
                        "description": "Keep only tweets with attached photo/video.",
                        "default": false
                    },
                    "mustHaveLink": {
                        "title": "Must have link",
                        "type": "boolean",
                        "description": "Keep only tweets with at least one external link.",
                        "default": false
                    },
                    "enrichAuthors": {
                        "title": "Full author enrichment ($)",
                        "type": "boolean",
                        "description": "For each unique author seen in the run, fetch full profile: followers, following, bio, location, joined date, tweet count, banner, website. Charged per unique author successfully resolved (not per tweet).",
                        "default": false
                    },
                    "expandThreads": {
                        "title": "Expand threads ($)",
                        "type": "boolean",
                        "description": "When a tweet is part of a conversation, fetch all sibling tweets in the thread. Attached as `threadTweets[]` on the parent row. Charged once per unique thread expanded.",
                        "default": false
                    },
                    "extractMedia": {
                        "title": "Download media files ($)",
                        "type": "boolean",
                        "description": "Download every photo and video attached to a tweet into the run's key-value store. Each media[] item gets kvKey + kvUrl (signed public link) + bytes. Files: jpg/png/webp/gif for photos, mp4 for video/animated_gif. Charged once per tweet with ≥1 file downloaded.",
                        "default": false
                    },
                    "detectLanguage": {
                        "title": "Language detection ($)",
                        "type": "boolean",
                        "description": "Local language detection on tweet text (populates `detectedLanguage`). Useful when X did not return a `lang` code. Charged only when detection returned a result.",
                        "default": false
                    },
                    "outputId": {
                        "title": "id",
                        "type": "boolean",
                        "description": "Numeric tweet ID.",
                        "default": true
                    },
                    "outputUrl": {
                        "title": "url",
                        "type": "boolean",
                        "description": "Canonical tweet URL.",
                        "default": true
                    },
                    "outputFullText": {
                        "title": "fullText",
                        "type": "boolean",
                        "description": "Full tweet text (long-form notes never 280-char truncated).",
                        "default": true
                    },
                    "outputCreatedAt": {
                        "title": "createdAt",
                        "type": "boolean",
                        "description": "ISO-8601 creation timestamp.",
                        "default": true
                    },
                    "outputLang": {
                        "title": "lang",
                        "type": "boolean",
                        "description": "Source language as returned by X.",
                        "default": true
                    },
                    "outputReplyCount": {
                        "title": "replyCount",
                        "type": "boolean",
                        "description": "Reply count.",
                        "default": true
                    },
                    "outputRetweetCount": {
                        "title": "retweetCount",
                        "type": "boolean",
                        "description": "Retweet count.",
                        "default": true
                    },
                    "outputLikeCount": {
                        "title": "likeCount",
                        "type": "boolean",
                        "description": "Favorite/like count.",
                        "default": true
                    },
                    "outputQuoteCount": {
                        "title": "quoteCount",
                        "type": "boolean",
                        "description": "Quote-tweet count.",
                        "default": true
                    },
                    "outputBookmarkCount": {
                        "title": "bookmarkCount",
                        "type": "boolean",
                        "description": "Bookmark count.",
                        "default": true
                    },
                    "outputViewCount": {
                        "title": "viewCount",
                        "type": "boolean",
                        "description": "View count (populated for retweets/quoted tweets, unlike some competitors).",
                        "default": true
                    },
                    "outputIsReply": {
                        "title": "isReply",
                        "type": "boolean",
                        "description": "Boolean flag for reply tweets.",
                        "default": true
                    },
                    "outputIsRetweet": {
                        "title": "isRetweet",
                        "type": "boolean",
                        "description": "Boolean flag for retweets.",
                        "default": true
                    },
                    "outputIsQuote": {
                        "title": "isQuote",
                        "type": "boolean",
                        "description": "Boolean flag for quote tweets.",
                        "default": true
                    },
                    "outputConversationId": {
                        "title": "conversationId",
                        "type": "boolean",
                        "description": "Conversation root ID (useful for grouping threads).",
                        "default": true
                    },
                    "outputInReplyTo": {
                        "title": "inReplyTo*",
                        "type": "boolean",
                        "description": "inReplyToTweetId + inReplyToScreenName when the tweet is a reply.",
                        "default": true
                    },
                    "outputMentions": {
                        "title": "mentions",
                        "type": "boolean",
                        "description": "@-mentions array.",
                        "default": true
                    },
                    "outputHashtags": {
                        "title": "hashtags",
                        "type": "boolean",
                        "description": "Hashtags array.",
                        "default": true
                    },
                    "outputUrls": {
                        "title": "urls",
                        "type": "boolean",
                        "description": "Expanded URLs in tweet.",
                        "default": true
                    },
                    "outputMedia": {
                        "title": "media",
                        "type": "boolean",
                        "description": "Media array. Only present when the extractMedia add-on is enabled.",
                        "default": true
                    },
                    "outputAuthor": {
                        "title": "author",
                        "type": "boolean",
                        "description": "Author block (id, screenName, name, profileImageUrl, verification flags).",
                        "default": true
                    },
                    "outputQuotedTweet": {
                        "title": "quotedTweet",
                        "type": "boolean",
                        "description": "Nested quoted-tweet object when present.",
                        "default": true
                    },
                    "outputRetweetedTweet": {
                        "title": "retweetedTweet",
                        "type": "boolean",
                        "description": "Nested retweeted-tweet object when present.",
                        "default": true
                    },
                    "forceFreePlanForTesting": {
                        "title": "Force free-plan code path (testing only)",
                        "type": "boolean",
                        "description": "Internal testing toggle. When true, the free-trial cap activates even if the Apify account is on a paid plan.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
