# Advanced X.com Twitter API (`novi/twitter-x-api`) Actor

Powerful Twitter and X.com scraper API. Easily scrape tweets, replies, user profiles, and media. Supports advanced search operators, date filtering, and granular sorting without requiring official Twitter API access. Export cleanly formatted JSON data at scale.

- **URL**: https://apify.com/novi/twitter-x-api.md
- **Developed by:** [Novi](https://apify.com/novi) (community)
- **Categories:** News, Social media, Lead generation
- **Stats:** 11 total users, 5 monthly users, 93.1% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Twitter Scraper & X.com API

Unlock the full potential of Twitter (formerly X.com) data with our powerful, fast, and efficient **Twitter Scraper**. Whether you are a researcher, data analyst, marketer, or entrepreneur, this **X.com scraping tool** allows you to extract historical tweets, user profiles, hashtags, and more without complex setups. Built for large-scale data extraction, it serves as the perfect alternative to the official Twitter API.

### 🚀 Key Features of the Twitter Scraper

Our **Twitter data extraction** solution provides advanced capabilities for precise scraping:

* **Flexible Input Methods:** Define your exact data target:
    * **Start URLs:** Provide direct links to tweets, user profiles, search results, or curated lists.
    * **Search Terms:** Utilize keywords, hashtags, and advanced search operators (see [Advanced Search Guide](https://github.com/igorbrigadir/twitter-advanced-search)).
    * **Twitter Handles:** Directly scrape tweets from specific users.
* **Granular Filtering & Targeting:** Refine your Twitter scraping to get only the data you need:
    * **Maximum Items:** Control the exact pagination and number of tweets extracted.
    * **Sorting:** Organize scraped results by "Top" or "Latest" tweets.
    * **Language Filtering:** Extract tweets in specific languages using [ISO 639-1 codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
    * **User Verification Status:** Target tweets posted exclusively by verified users or Twitter Blue (X Premium) subscribers.
    * **Media-Specific Scraping:** Extract only tweets that contain images, videos, or quotes.
    * **Date Range:** Programmatically scrape historical Twitter data by setting a `since` and `until` date.
* **Advanced Data Processing:**
    * **Include Search Terms:** Track the origin by appending the matching search term to each scraped tweet.
    * **Custom Map Function:** Clean and shape your JSON output on the fly with custom JavaScript.
    * **Query Wizard**: Build complex queries easily via the Apify platform interface.
* **High-Speed & Cost-Effective:**
    * **Lightning-Fast:** Scrapes between 30-80 tweets per second.
    * **Affordable Pricing:** Only $0.50 per 1,000 tweets extracted.

**Need a step-by-step guide? Check out the tutorial from our development team:**
[Tutorial: Scrape Twitter Data with Apify's Tweet X.com Scraper](https://novidevelop.github.io/twitter/x/scraper/data-extraction/tutorial/2025/03/08/tutorial-scrape-twitter-data-apify-tweet-xcom-scraper.html)

### 🎯 Primary Use Cases for Twitter Data Extraction

Our **X.com bot** acts as a versatile crawler for numerous professional applications:
* **Market Research & Social Listening:** Monitor brand mentions, track real-time trends, and conduct extensive sentiment analysis.
* **Academic & Scientific Research:** Gather robust datasets for political science, sociology, and media studies.
* **Competitive Analysis:** Keep a pulse on competitor strategies, announcements, and audience engagement on Twitter.
* **Data Journalism:** Extract and investigate large datasets to uncover hidden patterns and public narratives.
* **Historical Data Archiving:** Fetch and archive past events, viral moments, or corporate communications.

### ⚡ Quick Start Examples

Below are standard input configurations (schema parameters) to quickly launch your **Twitter Scraper** task.

**1. Fetching Historical Tweets from a Specific Profile (e.g., NASA):**

This JSON configuration extracts English tweets from the @NASA profile across multiple date ranges, sorted by latest engagement.

```json
{
    "includeSearchTerms": false,
    "onlyImage": false,
    "onlyQuote": false,
    "onlyTwitterBlue": false,
    "onlyVerifiedUsers": false,
    "onlyVideo": false,
    "searchTerms": [
        "from:elonmusk AI since:2023-01-01 until:2023-03-01",
        "from:elonmusk AI since:2023-03-01 until:2023-05-01",
        "from:elonmusk AI since:2023-05-01 until:2023-07-01",
        "from:elonmusk AI since:2023-07-01 until:2023-09-01",
        "from:elonmusk AI since:2023-09-01 until:2023-12-01"
    ],
    "sort": "Top",
    "tweetLanguage": "en"
}
````

**2. Extracting Replies to a Specific Tweet with a Hashtag:**

Scrape mentions and replies efficiently. Replace `tweet_id_here` and `hashtag_here` for targeted scraping.

```json
{
    "includeSearchTerms": false,
    "onlyImage": false,
    "onlyQuote": false,
    "onlyTwitterBlue": false,
    "onlyVerifiedUsers": false,
    "onlyVideo": false,
    "searchTerms": [
        "conversation_id:tweet_id_here #hashtag_here"
    ],
    "sort": "Latest",
    "tweetLanguage": "en"
}
```

#### ⚙️ Explanation of Key Input Parameters:

- `searchTerms`: The core engine of your scrape. Utilize queries, user handles, advanced search operators, or a combination of `conversation_id` and keywords.
- `sort`: Determine output sequence—use "Latest" for chronological ingestion or "Top" for high-engagement ranking.
- `tweetLanguage`: Isolate geo-linguistic data using country codes (e.g., "en" for English, "es" for Spanish).
- Boolean Filters (`onlyImage`, `onlyVerifiedUsers`, etc.): Toggle specific content traits to minimize noise in your scraped dataset.
- `includeSearchTerms`: Essential for batch processing tracking; attaches the triggering keyword to the final results.

### ⚠️ Usage Guidelines & Best Practices

To maximize the efficiency and longevity of your scraping tasks:

- **Target Historical Data:** This crawler is optimized for historical extraction rather than real-time polling or dashboard monitoring.
- **Batch Your Queries:** Ensure a minimum yield of 50 tweets per query. Expand date ranges or broader keywords to maintain efficiency.
- **Throttle Concurrency:** Limit simultaneous runs (max 1 concurrent run, up to 5 batched queries) to avoid blocks.
- **Single Tweet Lookups:** Scraping single independent tweets explicitly via URLs is heavily restricted. Space out individual checks with several minutes of interval time.
- **Compliance First:** Always respect X.com / Twitter terms of service. Employ this scraper responsibly.

### 🛡️ Ethical Web Scraping & Data Practices

This actor operates as an unauthenticated **Twitter crawler**. It securely processes and extracts publicly accessible and visible user data without logging into X.com, ensuring that we do not inherently bypass authenticated platform barriers.

We champion privacy by design:

- No private messages, non-public user details, or sensitive personal fields are parsed.
- The infrastructure operates via Apify—an EU-based platform compliant with major data protection frameworks (including GDPR where applicable). For more legal insights, read Apify's [guide on web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

Our technical extraction layers are designed to tread lightly on X.com’s servers, enabling ethical academic, corporate, and public research without degrading platform performance or inciting harm.

### 📄 Output Schema Example

The scraper outputs rich JSON arrays containing complete, structured tweet metadata perfectly formatted for databases and data pipelines:

```json
[
    {
        "id": "1630332507265589248",
        "url": "https://x.com/NASA/status/1630332507265589248",
        "twitterUrl": "https://twitter.com/NASA/status/1630332507265589248",
        "full_text": "@yalhunzai We have internships open to international students from countries with whom we have agreements: https://t.co/Kl2Lz4qjpw",
        "favorite_count": 14,
        "retweet_count": 9,
        "reply_count": 0,
        "quote_count": 0,
        "bookmark_count": 1,
        "author": {
            "id_str": "11348282",
            "screen_name": "NASA",
            "name": "NASA",
            "advertiser_account_service_levels": [
                "dso",
                "media_studio"
            ],
            "advertiser_account_type": "promotable_user",
            "analytics_type": "enabled",
            "can_dm": false,
            "can_media_tag": true,
            "created_at": "Wed Dec 19 20:20:32 +0000 2007",
            "description": "There's space for everybody. ✨\n\nVerification: https://t.co/8nok3NP4PW",
            "entities": {
                "description": {
                    "hashtags": [],
                    "symbols": [],
                    "urls": [
                        {
                            "display_url": "nasa.gov/socialmedia",
                            "expanded_url": "http://nasa.gov/socialmedia",
                            "indices": [
                                46,
                                69
                            ],
                            "url": "https://t.co/8nok3NP4PW"
                        }
                    ],
                    "user_mentions": []
                },
                "url": {
                    "urls": [
                        {
                            "display_url": "nasa.gov",
                            "expanded_url": "http://www.nasa.gov/",
                            "indices": [
                                0,
                                23
                            ],
                            "url": "https://t.co/9NkQJKAnuU"
                        }
                    ]
                }
            },
            "fast_followers_count": 0,
            "favourites_count": 16401,
            "followers_count": 85752559,
            "friends_count": 170,
            "geo_enabled": false,
            "has_custom_timelines": true,
            "has_extended_profile": true,
            "is_translator": false,
            "location": "Pale Blue Dot",
            "media_count": 27374,
            "normal_followers_count": 85752559,
            "pinned_tweet_ids_str": [],
            "profile_background_color": "000000",
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1718393721",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
            "profile_interstitial_type": "",
            "profile_link_color": "205BA7",
            "protected": false,
            "statuses_count": 72761,
            "translator_type_enum": "Regular",
            "url": "https://t.co/9NkQJKAnuU",
            "verified": false,
            "verified_type": "Government",
            "withheld_in_countries": []
        },
        "bookmarked": false,
        "conversation_id_str": "1630332507265589248",
        "created_at": "Tue Feb 28 20:28:53 +0000 2023",
        "display_text_range": [
            11,
            130
        ],
        "entities": {
            "hashtags": [],
            "symbols": [],
            "timestamps": [],
            "urls": [
                {
                    "display_url": "go.nasa.gov/3EKfKkN",
                    "expanded_url": "https://go.nasa.gov/3EKfKkN",
                    "indices": [
                        107,
                        130
                    ],
                    "url": "https://t.co/Kl2Lz4qjpw"
                }
            ],
            "user_mentions": [
                {
                    "id_str": "1583456964453040129",
                    "indices": [
                        0,
                        10
                    ],
                    "name": "Baki bùlen",
                    "screen_name": "yalhunzai"
                }
            ]
        },
        "favorited": false,
        "in_reply_to_screen_name": "yalhunzai",
        "in_reply_to_status_id_str": "1630616311226048513",
        "in_reply_to_user_id_str": "1583456964453040129",
        "is_quote_status": false,
        "lang": "en",
        "possibly_sensitive": false,
        "possibly_sensitive_editable": true,
        "retweeted": false,
        "user_id_str": "11348282"
    }
]
```

### 🛠️ Troubleshooting

Encountering "no results" or low tweet compilation volumes? Review the detailed troubleshooting schema inside the Actor's documentation. Common stumbling blocks involve hyper-restrictive queries or temporarily hitting platform rate thresholds.

### 🚀 Get Started Now

Unlock the most comprehensive and flexible **Twitter API alternative**. Launch your tasks and begin extracting meaningful Twitter data today!

| [🎹️ Fast TikTok API](https://apify.com/novi/fast-tiktok-api)                                | [📹️ TikTok Trend API](https://apify.com/novi/tiktok-trend-api)         | [🔍️ TikTok Search API](https://apify.com/novi/tiktok-search-api)             |
|:---------------------------------------------------------------------------------------------|:------------------------------------------------------------------------|:------------------------------------------------------------------------------|
| [🧛️ TikTok User API](https://apify.com/novi/tiktok-user-api)                                | [🧛️ TikTok User Info API](https://apify.com/novi/tiktok-user-info-api) | [#️ TikTok Hashtag API](https://apify.com/novi/tiktok-hashtag-api)            |
| [🛍️ TikTok Shop API](https://apify.com/novi/tiktok-shop-scraper)                            | [👤️ TikTok Followers API](https://apify.com/novi/tiktok-followers-api) | [⚡️ TikTok Scraper (pay-per-result)](https://apify.com/xtdata/tiktok-scraper) |
| [💬 TikTok Comment API](https://apify.com/novi/tiktok-comment-api)                           | [🎶 TikTok Music API](https://apify.com/novi/tiktok-sound-api)          | [🎶 TikTok Music Trend API](https://apify.com/novi/tiktok-music-trend-api)    |
| [🎶 Tiktok Scraper Ultimate (pay-per-event)](https://apify.com/novi/tiktok-scraper-ultimate) |                                                                         |                                                                               |

# Actor input Schema

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

Twitter (X) URLs. Paste the URLs and get the results immediately. Tweet, Profile, Search or List URLs are supported.

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

Search terms you want to search from Twitter (X). You can refer to https://github.com/igorbrigadir/twitter-advanced-search.

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

Twitter handles (username) that you want to search on Twitter (X)

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

Maximum number of items that you want as output.

## `sort` (type: `string`):

Sorts search results by the given option. If you are getting low results, try Top instead of Latest. Latest + Top runs both simultaneously to maximize results but may return some duplicate tweets.

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

Restricts tweets to the given language, given by an ISO 639-1 code.

## `onlyVerifiedUsers` (type: `boolean`):

If selected, only returns tweets by users who are verified.

## `onlyTwitterBlue` (type: `boolean`):

If selected, only returns tweets by users who are Twitter Blue subscribers.

## `onlyImage` (type: `boolean`):

If selected, only returns tweets that contain images.

## `onlyVideo` (type: `boolean`):

If selected, only returns tweets that contain videos.

## `onlyQuote` (type: `boolean`):

If selected, only returns tweets that are quotes.

## `start` (type: `string`):

Returns tweets sent after the given date. Does not apply to startUrls or twitterHandles. If you want to filter by date, the best way is to use Twitter queries.

## `end` (type: `string`):

Returns tweets sent before the given date. Does not apply to startUrls or twitterHandles. If you want to filter by date, the best way is to use Twitter queries.

## `includeSearchTerms` (type: `boolean`):

If selected, a field will be added to each tweets about the search term that was used to find it.

## `customMapFunction` (type: `string`):

Function that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically.

## Actor input object example

```json
{
  "startUrls": [
    "https://twitter.com/apify",
    "https://twitter.com/search?q=apify%20&src=typed_query"
  ],
  "searchTerms": [
    "web scraping",
    "scraping from:apify"
  ],
  "twitterHandles": [
    "elonmusk",
    "taylorswift13"
  ],
  "maxItems": 50,
  "sort": "Top",
  "tweetLanguage": "en",
  "start": "2021-07-01",
  "end": "2021-07-02",
  "customMapFunction": "(object) => { return {...object} }"
}
```

# Actor output Schema

## `results` (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://twitter.com/apify",
        "https://twitter.com/search?q=apify%20&src=typed_query"
    ],
    "searchTerms": [
        "web scraping",
        "scraping from:apify"
    ],
    "twitterHandles": [
        "elonmusk",
        "taylorswift13"
    ],
    "maxItems": 50,
    "sort": "Top",
    "tweetLanguage": "en",
    "start": "2021-07-01",
    "end": "2021-07-02",
    "customMapFunction": (object) => { return {...object} }
};

// Run the Actor and wait for it to finish
const run = await client.actor("novi/twitter-x-api").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://twitter.com/apify",
        "https://twitter.com/search?q=apify%20&src=typed_query",
    ],
    "searchTerms": [
        "web scraping",
        "scraping from:apify",
    ],
    "twitterHandles": [
        "elonmusk",
        "taylorswift13",
    ],
    "maxItems": 50,
    "sort": "Top",
    "tweetLanguage": "en",
    "start": "2021-07-01",
    "end": "2021-07-02",
    "customMapFunction": "(object) => { return {...object} }",
}

# Run the Actor and wait for it to finish
run = client.actor("novi/twitter-x-api").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://twitter.com/apify",
    "https://twitter.com/search?q=apify%20&src=typed_query"
  ],
  "searchTerms": [
    "web scraping",
    "scraping from:apify"
  ],
  "twitterHandles": [
    "elonmusk",
    "taylorswift13"
  ],
  "maxItems": 50,
  "sort": "Top",
  "tweetLanguage": "en",
  "start": "2021-07-01",
  "end": "2021-07-02",
  "customMapFunction": "(object) => { return {...object} }"
}' |
apify call novi/twitter-x-api --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Advanced X.com Twitter API",
        "description": "Powerful Twitter and X.com scraper API. Easily scrape tweets, replies, user profiles, and media. Supports advanced search operators, date filtering, and granular sorting without requiring official Twitter API access. Export cleanly formatted JSON data at scale.",
        "version": "0.0",
        "x-build-id": "lAwKDsT00FWEb0IVY"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/novi~twitter-x-api/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-novi-twitter-x-api",
                "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/novi~twitter-x-api/runs": {
            "post": {
                "operationId": "runs-sync-novi-twitter-x-api",
                "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/novi~twitter-x-api/run-sync": {
            "post": {
                "operationId": "run-sync-novi-twitter-x-api",
                "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": "Twitter (X) URLs. Paste the URLs and get the results immediately. Tweet, Profile, Search or List URLs are supported.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchTerms": {
                        "title": "Search Terms. Please remove all startUrls 👆 before use it.",
                        "type": "array",
                        "description": "Search terms you want to search from Twitter (X). You can refer to https://github.com/igorbrigadir/twitter-advanced-search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "twitterHandles": {
                        "title": "Twitter handles (username). Please remove all startUrls and searchTerms 👆 before use it.",
                        "type": "array",
                        "description": "Twitter handles (username) that you want to search on Twitter (X)",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum number of items on output",
                        "type": "integer",
                        "description": "Maximum number of items that you want as output."
                    },
                    "sort": {
                        "title": "Sort By",
                        "enum": [
                            "Top",
                            "Latest",
                            "Both"
                        ],
                        "type": "string",
                        "description": "Sorts search results by the given option. If you are getting low results, try Top instead of Latest. Latest + Top runs both simultaneously to maximize results but may return some duplicate tweets."
                    },
                    "tweetLanguage": {
                        "title": "Tweet language",
                        "enum": [
                            "ab",
                            "aa",
                            "af",
                            "ak",
                            "sq",
                            "am",
                            "ar",
                            "an",
                            "hy",
                            "as",
                            "av",
                            "ae",
                            "ay",
                            "az",
                            "bm",
                            "ba",
                            "eu",
                            "be",
                            "bn",
                            "bi",
                            "bs",
                            "br",
                            "bg",
                            "my",
                            "ca",
                            "ch",
                            "ce",
                            "ny",
                            "zh",
                            "cu",
                            "cv",
                            "kw",
                            "co",
                            "cr",
                            "hr",
                            "cs",
                            "da",
                            "dv",
                            "nl",
                            "dz",
                            "en",
                            "eo",
                            "et",
                            "ee",
                            "fo",
                            "fj",
                            "fi",
                            "fr",
                            "fy",
                            "ff",
                            "gd",
                            "gl",
                            "lg",
                            "ka",
                            "de",
                            "el",
                            "kl",
                            "gn",
                            "gu",
                            "ht",
                            "ha",
                            "he",
                            "hz",
                            "hi",
                            "ho",
                            "hu",
                            "is",
                            "io",
                            "ig",
                            "id",
                            "ia",
                            "ie",
                            "iu",
                            "ik",
                            "ga",
                            "it",
                            "ja",
                            "jv",
                            "kn",
                            "kr",
                            "ks",
                            "kk",
                            "km",
                            "ki",
                            "rw",
                            "ky",
                            "kv",
                            "kg",
                            "ko",
                            "kj",
                            "ku",
                            "lo",
                            "la",
                            "lv",
                            "li",
                            "ln",
                            "lt",
                            "lu",
                            "lb",
                            "mk",
                            "mg",
                            "ms",
                            "ml",
                            "mt",
                            "gv",
                            "mi",
                            "mr",
                            "mh",
                            "mn",
                            "na",
                            "nv",
                            "nd",
                            "nr",
                            "ng",
                            "ne",
                            "no",
                            "nb",
                            "nn",
                            "ii",
                            "oc",
                            "oj",
                            "or",
                            "om",
                            "os",
                            "pi",
                            "ps",
                            "fa",
                            "pl",
                            "pt",
                            "pa",
                            "qu",
                            "ro",
                            "rm",
                            "rn",
                            "ru",
                            "se",
                            "sm",
                            "sg",
                            "sa",
                            "sc",
                            "sr",
                            "sn",
                            "sd",
                            "si",
                            "sk",
                            "sl",
                            "so",
                            "st",
                            "es",
                            "su",
                            "sw",
                            "ss",
                            "sv",
                            "tl",
                            "ty",
                            "tg",
                            "ta",
                            "tt",
                            "te",
                            "th",
                            "bo",
                            "ti",
                            "to",
                            "ts",
                            "tn",
                            "tr",
                            "tk",
                            "tw",
                            "ug",
                            "uk",
                            "ur",
                            "uz",
                            "ve",
                            "vi",
                            "vo",
                            "wa",
                            "cy",
                            "wo",
                            "xh",
                            "yi",
                            "yo",
                            "za",
                            "zu"
                        ],
                        "type": "string",
                        "description": "Restricts tweets to the given language, given by an ISO 639-1 code."
                    },
                    "onlyVerifiedUsers": {
                        "title": "Only verified users",
                        "type": "boolean",
                        "description": "If selected, only returns tweets by users who are verified."
                    },
                    "onlyTwitterBlue": {
                        "title": "Only Twitter Blue",
                        "type": "boolean",
                        "description": "If selected, only returns tweets by users who are Twitter Blue subscribers."
                    },
                    "onlyImage": {
                        "title": "Only image",
                        "type": "boolean",
                        "description": "If selected, only returns tweets that contain images."
                    },
                    "onlyVideo": {
                        "title": "Only video",
                        "type": "boolean",
                        "description": "If selected, only returns tweets that contain videos."
                    },
                    "onlyQuote": {
                        "title": "Only quote",
                        "type": "boolean",
                        "description": "If selected, only returns tweets that are quotes."
                    },
                    "start": {
                        "title": "Start date",
                        "type": "string",
                        "description": "Returns tweets sent after the given date. Does not apply to startUrls or twitterHandles. If you want to filter by date, the best way is to use Twitter queries."
                    },
                    "end": {
                        "title": "End date",
                        "type": "string",
                        "description": "Returns tweets sent before the given date. Does not apply to startUrls or twitterHandles. If you want to filter by date, the best way is to use Twitter queries."
                    },
                    "includeSearchTerms": {
                        "title": "Include Search Terms",
                        "type": "boolean",
                        "description": "If selected, a field will be added to each tweets about the search term that was used to find it."
                    },
                    "customMapFunction": {
                        "title": "Custom map function",
                        "type": "string",
                        "description": "Function that takes each of the objects as argument and returns data that will be mapped by the function itself. This function is not intended for filtering, please don't use it for filtering purposes or you will get banned automatically."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
