# 🦅 X/Twitter Scraper & Data Extractor (`x402/x-twitter-scraper-data-extractor`) Actor

Extract high-quality data from X (formerly Twitter) with our advanced, auto-routing scraping engine. Pay only for the data you need at an unbeatable price of $0.20 per 1,000 tweets.

- **URL**: https://apify.com/x402/x-twitter-scraper-data-extractor.md
- **Developed by:** [X402 Labs](https://apify.com/x402) (community)
- **Categories:** Social media, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.20 / 1,000 tweets

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/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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 (Twitter) Scraper: The Fastest Auto-Routing Engine

#### ⚡ Blazing Fast • 💰 Cost-Effective Pay-Per-Result • 🎯 Smart Auto-Routing • 🔥 Production Ready

The ultimate enterprise-grade at **$0.10 per 1000 tweets** solution to extract **tweets, users, profiles, lists, and media** from X (Twitter). Designed for scale, speed, and precision, this scraper gives you access to **60+ advanced filters** (including dates, engagement metrics, media types, and location) so you can pinpoint exactly the data you need.

Whether you're building massive datasets for AI training, conducting enterprise market research, tracking brand sentiment, or generating leads, **X Tweet Scraper** is built for heavy-duty, production-ready extraction. It automatically routes your inputs to the most efficient path, meaning you enjoy the highest speeds at the lowest costs—and you only pay for the data you actually extract!

### How much will it cost to scrape X?

We provide the **cheapest rate on the market**. There are **no usage fees, no starting charges, and no hidden costs** of any kind. You pay strictly for results: **only $0.10 per 1,000 tweets**.

Apify gives you $5 free usage credits every month on the [Apify Free plan](https://apify.com/pricing). You can get up to **50,000 tweets** per month from X Tweet Scraper for that, so those 50,000 results will be completely free!

But if you need to get more data regularly from X, you should grab an Apify subscription. We recommend our [$49/month Starter plan](https://apify.com/pricing) - you can get up to **490,000 tweets** every month with the $49 monthly plan!

---

### What does X Tweet Scraper do?

Most Twitter scrapers are slow, expensive, and require you to toggle endless settings just to get started. 

**X Tweet Scraper** changes the game:
* ⚡ **Ultra-Fast Extraction:** Optimized scraping engine with smart automatic routing.
* 💰 **Pay-Per-Result Billing:** We only charge for delivered tweet rows. Free profiles! Free user discovery!
* 🧠 **Smart Auto-Detection:** Paste any link or username—our engine automatically determines if it's a profile, a list, or a search query.
* 📦 **Structured Output:** Clean JSON datasets ready for AI training, social listening, or market research pipelines.
* 🛡️ **Built-in Resilience:** Automated retries, rate-limit protection, and residential proxy integration.

---

### 🧠 Smart Auto-Detection Engine

No need to select "modes" manually. Just provide your input in the **Start URLs** or handle fields, and the scraper decides the best path:

| Input Provided | Automatically Scrapes |
| -------------- | ----------------------|
| `elonmusk` | Scrapes user profile & timeline |
| `https://x.com/i/lists/123` | Scrapes the dedicated X List |
| `OpenAI` (with Search) | Scrapes global search results |

👉 **Zero configuration needed. Just input and run.**

---

### 🚀 Key Features

#### 👤 Profile Scraping
* Extract full profile metadata (bio, followers, location, verified status).
* Scrape complete timelines.
* Support for `/with_replies` and `/media` timelines natively.

#### 🔍 Advanced Search & User Discovery
* **Global Tweet Search:** Find tweets matching any keyword or hashtag.
* **Global User Search:** Find profiles and accounts based on search terms.
* **Profile-based Search:** Search for specific keywords *inside* a provided list of profiles!

#### 🎯 Precision Filtering (Save Money!)
* 📅 **Date Range:** Filter by `Start Date (YYYY-MM-DD)` and `End Date (YYYY-MM-DD)`.
* 📊 **Engagement Minimums:** Only extract tweets with a minimum number of **Likes**, **Replies**, or **Retweets**.
* 🌍 **Location:** Filter searches by location (e.g. `New York, USA`).
* ✔️ **Content Types:** Filter to only keep **Images**, **Videos**, **Quote Tweets**, or Tweets from **Verified Authors**.
* 🗣️ **Language:** Strict language filtering (e.g., `en`, `es`).

---

### Why scrape X (Twitter)?

#### 🤖 AI & Machine Learning Pipelines
* Build massive natural language datasets.
* Feed real-time social sentiment into LLMs and agents.

#### 📊 Social Media Analytics & Social Listening
* Track brand mentions, trending hashtags, and competitor engagement.
* Monitor market reactions and PR crises.

#### 🚀 Lead Generation & Growth
* Discover influencers and industry leaders.
* Extract targeted lists of users based on bios and engagement.

---

### How to scrape X (Twitter)

#### 1️⃣ Scrape Profiles & Timelines
Simply add handles to the **X Handles** field or drop URLs into **Start URLs**:
```json
{
  "twitterHandles": ["elonmusk", "nasa"],
  "maxItems": 100
}
````

#### 2️⃣ Global Tweet Search

Set the **Search Type** to `Global tweet search` and provide your keywords:

```json
{
  "searchTerms": ["#AI", "ChatGPT"],
  "searchType": "tweets",
  "maxItems": 500
}
```

#### 3️⃣ Search Inside Specific Profiles

Want to see what NASA said about Mars? Provide the profile and the keyword:

```json
{
  "twitterHandles": ["nasa"],
  "searchType": "profile_tweets",
  "searchTerms": ["Mars"],
  "maxItems": 50
}
```

#### 4️⃣ Find Users (User Discovery)

Set the **Search Type** to `Global user search`:

```json
{
  "searchTerms": ["data scientist"],
  "searchType": "users",
  "maxItems": 100
}
```

***

### Results

The actor delivers cleanly structured data grouped into specific views in your Apify Dataset:

#### 🧾 Tweet Rows (Charged)

```json
{
  "type": "tweet",
  "tweet_id": "1234567890",
  "text": "AI is the future of automation.",
  "author": {
    "username": "@TechGuru",
    "fullname": "Tech Guru",
    "verified": true
  },
  "stats": {
    "likes": "1200",
    "retweets": "300",
    "replies": "50"
  },
  "date": "Jul 17, 2026 · 9:29 AM UTC"
}
```

#### 👤 Profile Metadata (Free!)

```json
{
  "type": "profile",
  "username": "@apify",
  "fullname": "Apify",
  "bio": "Thousands of Actors to automate your business...",
  "followers": "9,791",
  "location": "The Interwebz",
  "website": "https://apify.com"
}
```

***

### ⚡ Best Practices to Maximize Results

- **Control Your Budget:** Use the **Engagement Filters** (`minLikes`, `minRetweets`) and **Content Filters** (`onlyImages`, `onlyVerified`) to drop useless rows *before* they are pushed to the dataset.
- **Smart Limits:** Use **Max Items Per Target** to control how deep the scraper goes per profile or query. The scraper will automatically run until it hits this limit or exhausts available data.
- **Use Residential Proxies:** While the engine is highly optimized, enabling Apify Residential Proxies ensures the highest success rate and lowest blocking probability on large runs.

***

### ⭐ Leave a Review!

If this scraper helped you extract the data you needed quickly and efficiently, please **[drop us a review](https://console.apify.com/actors/KK3VSbRwhr79b34ZN/reviews)**! Your feedback helps us keep the scraper updated, fast, and feature-rich.

#### 💬 Need Support or Have Feature Requests?

Head over to the **Issues** tab to report any edge cases or request custom features for your workflow.

***

### Is it legal to scrape X (Twitter)?

Note that personal data is protected by GDPR in the European Union and by other regulations around the world.
You should not scrape personal data unless you have a legitimate reason to do so.
If you're unsure whether your reason is legitimate, consult your lawyers.
We also recommend that you read our blog post: [is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

***

*Built with ❤️ by X402 Labs.*

# Actor input Schema

## `startUrls` (type: `array`):

Optional mixed X/Twitter URLs. Supports profile timelines, `/with_replies`, `/media`, list URLs, and search URLs. Tweet URLs are currently skipped with a warning because this build focuses on timeline and search routes.

## `urls` (type: `array`):

Alias for Start URLs. Accepts strings or `{ "url": "..." }` objects.

## `profileUrls` (type: `array`):

Optional profile URL alias for timeline, `/with_replies`, and `/media` targets.

## `twitterHandles` (type: `array`):

Usernames to scrape. Accepts handles with or without the `@` prefix. These route through the fast profile timeline path unless you enable replies or media mode.

## `usernames` (type: `array`):

Alias for X Handles.

## `listUrls` (type: `array`):

X list URLs to scrape through the dedicated list timeline route.

## `listIds` (type: `array`):

Numeric X list IDs. Each ID is converted to `https://x.com/i/lists/<id>` and routed through the dedicated list scraper.

## `searchTerms` (type: `array`):

Run multiple searches in one Actor run. If `searchType` is `profile_tweets` and you provide profile targets, each term is searched inside each profile. Otherwise the terms route to global tweet or user search.

## `searchQuery` (type: `string`):

Single-query alias for Search Terms. Useful for API users who want one search string.

## `query` (type: `string`):

Alias for Search Query.

## `searchType` (type: `string`):

Choose how `searchTerms`, `searchQuery`, and `query` should route when they are not encoded in start URLs.

## `contentFilters` (type: `object`):

Optional content-level filters that are compiled into a fallback search query only when no explicit search term is provided.

## `userFilters` (type: `object`):

Optional user filters such as `fromUser`, `toUser`, `mentionUser`, and `listId`. These also help build a fallback query when no direct search term is provided.

## `timeFilters` (type: `object`):

Optional structured time filters. `sinceDate` and `untilDate` are used as aliases for Start Date and End Date.

## `geoFilters` (type: `object`):

Optional structured location filters. `nearPlace` is used as an alias for Location.

## `engagementFilters` (type: `object`):

Optional structured engagement thresholds used as aliases for the top-level minimum metrics.

## `mediaFilters` (type: `object`):

Optional structured media filters used as aliases for image, video, and link filtering when present.

## `tweetTypeFilters` (type: `object`):

Optional structured tweet-type filters used as aliases for quote-only, verified-only, and safe-search controls.

## `fromUser` (type: `string`):

Fallback search builder input. When no explicit search term is provided, this compiles into a `from:<username>` query fragment.

## `toUser` (type: `string`):

Fallback search builder input. When no explicit search term is provided, this compiles into a `to:<username>` query fragment.

## `mentionedUser` (type: `string`):

Fallback search builder input. When no explicit search term is provided, this compiles into an `@username` query fragment.

## `mentionUser` (type: `string`):

Alias for Mentioned User.

## `listIdFilter` (type: `string`):

Fallback search builder input. When no explicit search term is provided, this compiles into a `list:<id>` query fragment.

## `includeReplies` (type: `boolean`):

Route manual profile targets through the profile-with-replies tab.

## `mediaOnly` (type: `boolean`):

Route manual profile targets through the profile media tab.

## `scrapeProfileInfo` (type: `boolean`):

Push a free profile row alongside tweet results when profile metadata is available.

## `respectProfileSubpages` (type: `boolean`):

When enabled, `.../with_replies` and `.../media` URLs keep their explicit route instead of inheriting the global profile mode.

## `includeRetweets` (type: `boolean`):

Return retweets in profile-based results when available.

## `includeNativeRetweets` (type: `boolean`):

Include native retweets in search-based tweet results.

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

Maximum number of rows to attempt per target or search term. Set `0` for no cap.

## `startDate` (type: `string`):

Optional inclusive start date in `YYYY-MM-DD` format.

## `sinceDate` (type: `string`):

Alias for Start Date.

## `endDate` (type: `string`):

Optional inclusive end date in `YYYY-MM-DD` format.

## `untilDate` (type: `string`):

Alias for End Date.

## `latestTweets` (type: `boolean`):

Shortcut for setting the search start date to the last 7 days when `startDate` is empty.

## `location` (type: `string`):

Optional location filter for supported search routes.

## `nearPlace` (type: `string`):

Alias for Location.

## `onlyImages` (type: `boolean`):

Keep only rows that contain image media.

## `onlyVideos` (type: `boolean`):

Keep only rows that contain video media.

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

Keep only rows from verified authors.

## `onlyQuotes` (type: `boolean`):

Keep only quote tweets.

## `includeLinks` (type: `boolean`):

Keep only rows that contain external URLs.

## `safeSearch` (type: `boolean`):

Enable the source's safe-search flag when available.

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

Drop tweets below this like threshold.

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

Drop tweets below this reply threshold.

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

Drop tweets below this retweet threshold.

## `tweetLanguage` (type: `string`):

Best-effort language filter using the source language code when the HTML exposes it.

## `useResidentialProxy` (type: `boolean`):

Enable Apify residential proxy for better reliability.

## `proxyConfiguration` (type: `object`):

Optional Apify proxy configuration override.

## `proxyCountryCode` (type: `string`):

Optional 2-letter country code to pin the proxy country.

## `maxRetries` (type: `integer`):

Bounded retry count for network requests.

## Actor input object example

```json
{
  "startUrls": [
    "https://x.com/apify"
  ],
  "twitterHandles": [
    "elonmusk",
    "@nasa"
  ],
  "listUrls": [
    "https://x.com/i/lists/1748648376080666720"
  ],
  "searchType": "tweets",
  "includeReplies": false,
  "mediaOnly": false,
  "scrapeProfileInfo": true,
  "respectProfileSubpages": true,
  "includeRetweets": true,
  "includeNativeRetweets": true,
  "maxItems": 100,
  "startDate": "2024-01-01",
  "sinceDate": "2024-01-01",
  "endDate": "2024-12-31",
  "untilDate": "2024-12-31",
  "latestTweets": false,
  "location": "New York, USA",
  "nearPlace": "London, UK",
  "onlyImages": false,
  "onlyVideos": false,
  "onlyVerified": false,
  "onlyQuotes": false,
  "includeLinks": false,
  "safeSearch": false,
  "minLikes": 0,
  "minReplies": 0,
  "minRetweets": 0,
  "tweetLanguage": "",
  "useResidentialProxy": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "proxyCountryCode": "",
  "maxRetries": 3
}
```

# Actor output Schema

## `Results` (type: `string`):

No description

## `tweetRows` (type: `string`):

No description

## `profiles` (type: `string`):

No description

## `users` (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 = {
    "startUrls": [
        "https://x.com/apify"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("x402/x-twitter-scraper-data-extractor").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 = { "startUrls": ["https://x.com/apify"] }

# Run the Actor and wait for it to finish
run = client.actor("x402/x-twitter-scraper-data-extractor").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 '{
  "startUrls": [
    "https://x.com/apify"
  ]
}' |
apify call x402/x-twitter-scraper-data-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🦅 X/Twitter Scraper & Data Extractor",
        "description": "Extract high-quality data from X (formerly Twitter) with our advanced, auto-routing scraping engine. Pay only for the data you need at an unbeatable price of $0.20 per 1,000 tweets.",
        "version": "0.0",
        "x-build-id": "yZx8ixRCwVFzdicXj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/x402~x-twitter-scraper-data-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-x402-x-twitter-scraper-data-extractor",
                "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/x402~x-twitter-scraper-data-extractor/runs": {
            "post": {
                "operationId": "runs-sync-x402-x-twitter-scraper-data-extractor",
                "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/x402~x-twitter-scraper-data-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-x402-x-twitter-scraper-data-extractor",
                "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": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Optional mixed X/Twitter URLs. Supports profile timelines, `/with_replies`, `/media`, list URLs, and search URLs. Tweet URLs are currently skipped with a warning because this build focuses on timeline and search routes."
                    },
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Alias for Start URLs. Accepts strings or `{ \"url\": \"...\" }` objects."
                    },
                    "profileUrls": {
                        "title": "Profile URLs",
                        "type": "array",
                        "description": "Optional profile URL alias for timeline, `/with_replies`, and `/media` targets."
                    },
                    "twitterHandles": {
                        "title": "X Handles",
                        "type": "array",
                        "description": "Usernames to scrape. Accepts handles with or without the `@` prefix. These route through the fast profile timeline path unless you enable replies or media mode.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "usernames": {
                        "title": "Usernames",
                        "type": "array",
                        "description": "Alias for X Handles.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "listUrls": {
                        "title": "List URLs",
                        "type": "array",
                        "description": "X list URLs to scrape through the dedicated list timeline route.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "listIds": {
                        "title": "List IDs",
                        "type": "array",
                        "description": "Numeric X list IDs. Each ID is converted to `https://x.com/i/lists/<id>` and routed through the dedicated list scraper.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerms": {
                        "title": "Search Terms",
                        "type": "array",
                        "description": "Run multiple searches in one Actor run. If `searchType` is `profile_tweets` and you provide profile targets, each term is searched inside each profile. Otherwise the terms route to global tweet or user search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Single-query alias for Search Terms. Useful for API users who want one search string."
                    },
                    "query": {
                        "title": "Query",
                        "type": "string",
                        "description": "Alias for Search Query."
                    },
                    "searchType": {
                        "title": "Search Type",
                        "enum": [
                            "tweets",
                            "users",
                            "profile_tweets"
                        ],
                        "type": "string",
                        "description": "Choose how `searchTerms`, `searchQuery`, and `query` should route when they are not encoded in start URLs.",
                        "default": "tweets"
                    },
                    "contentFilters": {
                        "title": "Structured Content Filters",
                        "type": "object",
                        "description": "Optional content-level filters that are compiled into a fallback search query only when no explicit search term is provided."
                    },
                    "userFilters": {
                        "title": "Structured User Filters",
                        "type": "object",
                        "description": "Optional user filters such as `fromUser`, `toUser`, `mentionUser`, and `listId`. These also help build a fallback query when no direct search term is provided."
                    },
                    "timeFilters": {
                        "title": "Structured Time Filters",
                        "type": "object",
                        "description": "Optional structured time filters. `sinceDate` and `untilDate` are used as aliases for Start Date and End Date."
                    },
                    "geoFilters": {
                        "title": "Structured Geo Filters",
                        "type": "object",
                        "description": "Optional structured location filters. `nearPlace` is used as an alias for Location."
                    },
                    "engagementFilters": {
                        "title": "Structured Engagement Filters",
                        "type": "object",
                        "description": "Optional structured engagement thresholds used as aliases for the top-level minimum metrics."
                    },
                    "mediaFilters": {
                        "title": "Structured Media Filters",
                        "type": "object",
                        "description": "Optional structured media filters used as aliases for image, video, and link filtering when present."
                    },
                    "tweetTypeFilters": {
                        "title": "Structured Tweet Type Filters",
                        "type": "object",
                        "description": "Optional structured tweet-type filters used as aliases for quote-only, verified-only, and safe-search controls."
                    },
                    "fromUser": {
                        "title": "From User",
                        "type": "string",
                        "description": "Fallback search builder input. When no explicit search term is provided, this compiles into a `from:<username>` query fragment."
                    },
                    "toUser": {
                        "title": "To User",
                        "type": "string",
                        "description": "Fallback search builder input. When no explicit search term is provided, this compiles into a `to:<username>` query fragment."
                    },
                    "mentionedUser": {
                        "title": "Mentioned User",
                        "type": "string",
                        "description": "Fallback search builder input. When no explicit search term is provided, this compiles into an `@username` query fragment."
                    },
                    "mentionUser": {
                        "title": "Mention User Alias",
                        "type": "string",
                        "description": "Alias for Mentioned User."
                    },
                    "listIdFilter": {
                        "title": "List ID Filter",
                        "type": "string",
                        "description": "Fallback search builder input. When no explicit search term is provided, this compiles into a `list:<id>` query fragment."
                    },
                    "includeReplies": {
                        "title": "Include Replies",
                        "type": "boolean",
                        "description": "Route manual profile targets through the profile-with-replies tab.",
                        "default": false
                    },
                    "mediaOnly": {
                        "title": "Media Only",
                        "type": "boolean",
                        "description": "Route manual profile targets through the profile media tab.",
                        "default": false
                    },
                    "scrapeProfileInfo": {
                        "title": "Scrape Profile Info",
                        "type": "boolean",
                        "description": "Push a free profile row alongside tweet results when profile metadata is available.",
                        "default": true
                    },
                    "respectProfileSubpages": {
                        "title": "Respect Profile Subpages",
                        "type": "boolean",
                        "description": "When enabled, `.../with_replies` and `.../media` URLs keep their explicit route instead of inheriting the global profile mode.",
                        "default": true
                    },
                    "includeRetweets": {
                        "title": "Include Retweets",
                        "type": "boolean",
                        "description": "Return retweets in profile-based results when available.",
                        "default": true
                    },
                    "includeNativeRetweets": {
                        "title": "Include Native Retweets In Search",
                        "type": "boolean",
                        "description": "Include native retweets in search-based tweet results.",
                        "default": true
                    },
                    "maxItems": {
                        "title": "Max Items Per Target",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of rows to attempt per target or search term. Set `0` for no cap.",
                        "default": 100
                    },
                    "startDate": {
                        "title": "Start Date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Optional inclusive start date in `YYYY-MM-DD` format."
                    },
                    "sinceDate": {
                        "title": "Since Date Alias (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Alias for Start Date."
                    },
                    "endDate": {
                        "title": "End Date (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Optional inclusive end date in `YYYY-MM-DD` format."
                    },
                    "untilDate": {
                        "title": "Until Date Alias (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Alias for End Date."
                    },
                    "latestTweets": {
                        "title": "Latest Tweets Only",
                        "type": "boolean",
                        "description": "Shortcut for setting the search start date to the last 7 days when `startDate` is empty.",
                        "default": false
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Optional location filter for supported search routes."
                    },
                    "nearPlace": {
                        "title": "Near Place Alias",
                        "type": "string",
                        "description": "Alias for Location."
                    },
                    "onlyImages": {
                        "title": "Only Images",
                        "type": "boolean",
                        "description": "Keep only rows that contain image media.",
                        "default": false
                    },
                    "onlyVideos": {
                        "title": "Only Videos",
                        "type": "boolean",
                        "description": "Keep only rows that contain video media.",
                        "default": false
                    },
                    "onlyVerified": {
                        "title": "Only Verified Authors",
                        "type": "boolean",
                        "description": "Keep only rows from verified authors.",
                        "default": false
                    },
                    "onlyQuotes": {
                        "title": "Only Quote Tweets",
                        "type": "boolean",
                        "description": "Keep only quote tweets.",
                        "default": false
                    },
                    "includeLinks": {
                        "title": "Only Tweets With Links",
                        "type": "boolean",
                        "description": "Keep only rows that contain external URLs.",
                        "default": false
                    },
                    "safeSearch": {
                        "title": "Safe Search",
                        "type": "boolean",
                        "description": "Enable the source's safe-search flag when available.",
                        "default": false
                    },
                    "minLikes": {
                        "title": "Minimum Likes",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this like threshold.",
                        "default": 0
                    },
                    "minReplies": {
                        "title": "Minimum Replies",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this reply threshold.",
                        "default": 0
                    },
                    "minRetweets": {
                        "title": "Minimum Retweets",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Drop tweets below this retweet threshold.",
                        "default": 0
                    },
                    "tweetLanguage": {
                        "title": "Tweet Language",
                        "enum": [
                            "",
                            "en",
                            "es",
                            "fr",
                            "de",
                            "it",
                            "pt",
                            "ja",
                            "ko",
                            "zh-cn",
                            "ar",
                            "hi",
                            "tr"
                        ],
                        "type": "string",
                        "description": "Best-effort language filter using the source language code when the HTML exposes it.",
                        "default": ""
                    },
                    "useResidentialProxy": {
                        "title": "Use Residential Proxy",
                        "type": "boolean",
                        "description": "Enable Apify residential proxy for better reliability.",
                        "default": true
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optional Apify proxy configuration override.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    },
                    "proxyCountryCode": {
                        "title": "Proxy Country Code",
                        "type": "string",
                        "description": "Optional 2-letter country code to pin the proxy country.",
                        "default": ""
                    },
                    "maxRetries": {
                        "title": "Max Retries Per Request",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Bounded retry count for network requests.",
                        "default": 3
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
