# Twitter Scraper (`jistudio/twitter-scraper`) Actor

⚡ From $0.10/1K — No-Login Twitter (X.com) Scraper & Crypto X-Intel API (11-in-1): Tweets, Timelines, Threads, Replies, Profiles, HD Videos & Solana/Pump.fun Sentiment. MCP-ready for AI Agents & n8n. Zero cookies required.

- **URL**: https://apify.com/jistudio/twitter-scraper.md
- **Developed by:** [Ji Studio](https://apify.com/jistudio) (community)
- **Categories:** Social media, AI, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 standard dataset results

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## ⚡ Twitter (X) Tweet Scraper, HD Video Downloader & Crypto X-Intel (No Minimums • Unlimited)

The fastest **all-in-one Twitter (X.com) Tweet Scraper, HD MP4 Video Downloader, KOL Timeline Monitor, Thread Unroller, and Solana / Base / DexScreener Crypto Token X-Intel Scraper** on Apify.

Unlike legacy Twitter scrapers that block single-tweet lookups, enforce a 50-tweet minimum per query, or disable API access for free users, this Actor works **instantly for 1 single tweet, 25 batch tweets, full self-reply threads, multi-KOL timelines, and real-time Crypto Contract Address (CA) → X intelligence** with **zero X API keys, zero cookies, and zero residential proxies required**.

### 🏆 Why Developers Switch From Legacy Tweet Scrapers to This Actor

| Feature | ⚡ **Our Twitter (X) & Crypto X-Intel v2.0** | Legacy Tweet Scraper V2 | Basic X Scrapers |
| :--- | :-: | :-: | :-: |
| **Single Tweet & Direct HD MP4 Video Download** | ✅ **Included (`1` to `50` items)** | ❌ Blocked (*forces separate actor*) | ⚠️ Unreliable |
| **Minimum Tweets Charged per Query** | ✅ **None (`1 tweet = 1 item`)** | ❌ **50 tweets minimum** | ⚠️ 20–50 minimum |
| **Thread Unroller (Self-Reply Chain Reconstruction)** | ✅ **Built-in (`thread_unroll`)** | ❌ Blocked | ❌ Missing |
| **Real-Time KOL Monitoring (Repeated Short-Interval Runs)** | ✅ **Allowed 24/7** | ❌ Prohibited in TOS | ❌ Rate-limited |
| **API Access for Apify Free Plan Users** | ✅ **100% Unlocked** | ❌ Blocked in Demo Mode | ❌ Restricted |
| **Multi-URL Auto-Router (`startUrls`: Tweets + Profiles + Token CAs)** | ✅ **Built-in (`auto_start_urls`)** | ⚠️ Tweets/Profiles only | ❌ Single input |
| **Solana / Base / ETH Contract Address (CA) → Official X Intel** | ✅ **Built-in (`token_x_intel`)** | ❌ None | ❌ None |
| **Live DexScreener Boosts & Meme Token X Radar** | ✅ **Built-in (`meme_radar`, `dex_boosts_live`)** | ❌ None | ❌ None |

***

### 🔥 11 Extraction Modes (`action`)

1. **`auto_start_urls` (⚡ Smart Multi-URL & Multi-KOL Auto-Router — Default)**:
   Paste any combination of **X Tweet URLs** (`https://x.com/elonmusk/status/1812258574049157405`), **X Profile URLs** (`https://x.com/solana`), **X Handles** (`twitterHandles: ["solana", "VitalikButerin"]`), or **Solana/Base Contract Addresses** (`DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263`). The Actor automatically detects every input and extracts them in one unified dataset!
2. **`timeline` (KOL / User Latest Timeline Tweets)**:
   Scrape the latest posts from one or multiple public X handles (`@elonmusk`, `@solana`, `@VitalikButerin`, `@cz_binance`) with full text, engagement metrics (`likes`, `retweets`, `views`, `replies`), media attachments, and built-in filters (`onlyVideo`, `onlyImage`, `minimumLikes`, `minimumRetweets`).
3. **`tweet` (Single Tweet Detail & HD MP4 Video Downloader)**:
   Extract complete metadata for any single Tweet ID or URL, including the highest-bitrate direct `.mp4` video stream URL, photos, quote tweets, polls, and exact timestamps.
4. **`batch_tweets` (Concurrent Multi-Tweet Lookup)**:
   Fetch up to 25 numeric Tweet IDs or URLs in parallel in a single request.
5. **`thread_unroll` (Chronological Thread Unroller)**:
   Automatically walks up and down an author's self-reply chain to reconstruct the full thread in reading order.
6. **`user` (X User Profile & Follower Analytics)**:
   Extract bio, verification badge status, follower/following counts, total tweet count, avatar, banner, and creation date.
7. **`token_x_intel` (Crypto Contract Address → Official X Handle & Latest Tweets)**:
   Pass any Solana, Base, Ethereum, or BSC token Contract Address (CA). Automatically queries DexScreener for the token's verified official X/Twitter link, live USD price, 24h volume, liquidity, FDV/Market Cap, and fetches the project's latest X posts.
8. **`meme_radar` (Live Meme Token Radar + Official X Verification)**:
   Real-time feed of trending & boosted meme tokens on Solana, Base, and Ethereum cross-referenced with their official X social accounts.
9. **`search_x_tokens` (Search Crypto Tokens by Ticker / Keyword + X Intel)**:
   Search any token ticker (`BONK`, `PEPE`, `SOL`, `AI16Z`) to retrieve top liquidity pairs alongside verified X handles and social telemetry.
10. **`dex_boosts_live` (Live DexScreener Paid Boosts + X Socials)**:
    Track tokens actively spending on DexScreener boosts right now with their verified X profiles.
11. **`new_token_profiles` (Freshly Claimed Token Profiles + X Links)**:
    Catch newly registered token profiles on DexScreener the moment they attach an X/Twitter account.

***

### 📋 Quick-Start Input Examples

#### 1. Paste Mixed Tweet URLs, Profile URLs & KOL Handles (`auto_start_urls`)

```json
{
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/elonmusk/status/1812258574049157405",
    "https://x.com/solana"
  ],
  "twitterHandles": ["VitalikButerin"],
  "maxItems": 10
}
```

#### 2. Monitor Multiple KOL Timelines with Engagement & Video Filters (`timeline`)

```json
{
  "action": "timeline",
  "twitterHandles": ["elonmusk", "solana", "cz_binance"],
  "maxItems": 15,
  "onlyVideo": false,
  "minimumLikes": 100
}
```

#### 3. Single Tweet + Direct HD MP4 Video Download (`tweet`)

```json
{
  "action": "tweet",
  "tweetIdOrUrl": "https://x.com/elonmusk/status/1812258574049157405"
}
```

#### 4. Solana Token Contract Address (CA) → Official X Handle, Market Cap & Latest Tweets (`token_x_intel`)

```json
{
  "action": "token_x_intel",
  "contractAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
}
```

***

### 📦 Sample Output Dataset Items

#### 1. Tweet Item (`action: "tweet"` or `"timeline"`)

```json
{
  "type": "tweet",
  "id": "2125078025377378634",
  "username": "solana",
  "author_name": "Solana",
  "text": "Mitsui & Co. operates in 62 countries. Here's why they chose Solana.\n\n\"Better issuance controls, automatic settlement, global onchain distribution. Solana brings us to the new stage, we believe.\"",
  "likes": 236,
  "retweets": 28,
  "replies": 39,
  "views": 18420,
  "video_url": "https://video.twimg.com/amplify_video/2125077961145782272/vid/avc1/1280x720/...",
  "has_video": true,
  "has_image": true,
  "created_at": "Tue Nov 24 04:15:10 +0000 2026",
  "url": "https://x.com/solana/status/2125078025377378634"
}
```

#### 2. User Profile Item (`action: "user"`)

```json
{
  "type": "user_profile",
  "id": "951329744804392960",
  "username": "solana",
  "author_name": "Solana",
  "text": "The high performance network powering internet capital markets, payments, AI agents, stocks, memes, and crypto applications.",
  "followers_count": 4215369,
  "following_count": 3748,
  "tweets_count": 31289,
  "likes_count": 30087,
  "media_count": 4368,
  "author_avatar": "https://pbs.twimg.com/profile_images/...",
  "banner_url": "https://pbs.twimg.com/profile_banners/...",
  "created_at": "Thu Jan 11 05:36:14 +0000 2018",
  "url": "https://x.com/solana"
}
```

### Use Cases

- **Build large prospect databases** from Twitter/X creator profiles, followers, and bio metadata without cookies.
- **Track online conversations, brand mentions, and real-time crypto / Pump.fun token signals** for AI agents and trading bots.
- **Get deal, launch, and restock alerts** on breaking KOL announcements and trending hashtags.

***

### AI Agents, MCP Server & Automation Integrations

- **Native MCP Server Ready**: Connect directly as a remote tool in **Claude Desktop**, **Cursor IDE**, **ChatGPT**, **LangChain**, and **CrewAI** via Apify MCP (`https://mcp.apify.com`) — **No Login & No Cookies required**.
- **No-Code Workflows**: Plug straight into **n8n**, **Make (Integromat)**, **Zapier**, and webhooks for automated 24/7 price monitoring, deal & restock alerts, and competitor intelligence.

***

### How to Scrape Twitter / X & Crypto X-Intel

#### Step-by-Step in Apify Console

1. Open **twitter-scraper** in Apify Console and select your desired mode (`mode` or `action`).
2. Enter your search keywords, product URLs, or target IDs (or use the prefilled example input to test immediately).
3. Click **Start** — runs typically complete in **5 to 25 seconds** at just **256 MB** memory.
4. Preview structured records in the **Output** tab and export to **JSON, CSV, Excel, or XML**.

#### Programmatic API & SDK Integration

##### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run_input = {
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/elonmusk/status/1812258574049157405",
    "https://x.com/solana"
  ],
  "maxItems": 20
}

run = client.actor("jistudio/twitter-scraper").call(run_input=run_input)
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(f"Extracted {len(items)} items")
```

##### JavaScript / Node.js (`apify-client`)

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });

const run = await client.actor('jistudio/twitter-scraper').call({
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/elonmusk/status/1812258574049157405",
    "https://x.com/solana"
  ],
  "maxItems": 20
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Extracted ${items.length} items`);
```

### Input Parameters Reference

All inputs below match the Actor's live schema (`input_schema.json`) and require **zero login cookies**:

| Parameter | Type | Default | Description |
| :--- | :---: | :---: | :--- |
| `action` | `string` | `"auto_start_urls"` | Select the extraction mode, or choose 'auto_start_urls' to paste a mixed list of Tweet URLs, Profile URLs, and Token ... |
| `startUrls` | `array` | `["https://x.com/solana/status/21...` | Paste any mix of X/Twitter Tweet URLs (https://x.com/user/status/123), Profile URLs (https://x.com/solana), or Solana... |
| `twitterHandles` | `array` | `["solana"]` | List of X handles (without @) to fetch their latest timeline tweets and profile stats (e.g., \['solana', 'elonmusk', '... |
| `tweetIdOrUrl` | `string` | `"2124953580662886416"` | Numeric Tweet ID or full https://x.com/user/status/1234567890 URL. |
| `username` | `string` | `"solana"` | Twitter/X username without @ (e.g. 'elonmusk', 'solana', 'VitalikButerin'). |
| `batchTweetIds` | `string` | `"2125078025377378634,18122585740...` | Up to 25 comma-separated numeric Tweet IDs or URLs. |
| `contractAddress` | `string` | `"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xj...` | Solana, Base, Ethereum, or BSC token contract address (e.g. 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263'). |
| `searchQuery` | `string` | `"BONK"` | Search token ticker or keyword on DexScreener + X (e.g. 'BONK', 'PEPE', 'SOL'). |
| `chain` | `string` | `"solana"` | Filter tokens by blockchain network. |
| `maxItems` | `integer` | `10` | Maximum number of tweets or tokens to return per handle or query (1 - 5,000). No 50-tweet minimum! |
| `onlyVideo` | `boolean` | `false` | If enabled, only returns tweets that contain a downloadable video. |
| `onlyImage` | `boolean` | `false` | If enabled, only returns tweets that contain images or media. |
| `minimumLikes` | `integer` | `0` | Only return tweets with at least this many likes (0 = no filter). |
| `minimumRetweets` | `integer` | `0` | Only return tweets with at least this many retweets (0 = no filter). |

#### Quick-Start JSON Input

```json
{
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/elonmusk/status/1812258574049157405",
    "https://x.com/solana"
  ],
  "maxItems": 20
}
```

### Output Fields Reference

Every run writes clean, normalized records to your default Apify Dataset (`overview` view):

| Field | Label | Format |
| :--- | :--- | :---: |
| `type` | Type | `text` |
| `id` | Tweet ID / User ID / Token CA | `text` |
| `username` | X Handle | `text` |
| `text` | Tweet Text / Bio / Token Name | `text` |
| `likes` | Tweet Likes | `number` |
| `retweets` | Tweet Retweets | `number` |
| `views` | Tweet Views | `number` |
| `followers_count` | Profile Followers | `number` |
| `following_count` | Profile Following | `number` |
| `tweets_count` | Profile Total Tweets | `number` |
| `video_url` | HD Video MP4 URL | `link` |
| `image_url` | Image / Banner URL | `link` |
| `symbol` | Symbol | `text` |
| `chain` | Chain | `text` |
| `price_usd` | Price (USD) | `text` |
| `market_cap` | Market Cap / FDV | `number` |
| `created_at` | Created At | `text` |
| `url` | Source URL | `link` |

#### Verified Sample Dataset Record

```json
{
  "type": "tweet",
  "id": "1812258574049157405",
  "username": "elonmusk",
  "author_name": "Elon Musk",
  "text": "Sample tweet body text",
  "likes": 3141799,
  "retweets": 366900,
  "views": 182400000,
  "has_video": false,
  "has_image": true,
  "url": "https://x.com/elonmusk/status/1812258574049157405"
}
```

### How Much Does It Cost to Scrape Twitter / X & Crypto X-Intel?

This Actor uses transparent **Pay-Per-Event (PPE)** pricing with **no hidden proxy surcharges** and a minimal **256 MB** default memory footprint:

| Event | Price | Example Cost (1,000 Items) |
| :--- | :---: | :---: |
| **Actor Start** (`apify-actor-start`) | `$0.02` / run | `$0.02` |
| **Standard Dataset Result** (`apify-default-dataset-item`) | `$0.0001` (`$0.10 / 1K`) | `$0.10` |
| **Total for 1,000 Standard Results** | — | **`$0.12` total** |

#### Subscription Tier Discounts

Paid Apify plans (**Bronze, Silver, Gold, Platinum, Diamond**) automatically receive volume discounts on enriched add-on events (deep SKU detail, verified reviews, affiliate intelligence). With Apify's **$5.00/month Free plan credit**, you can extract **40,000+ standard records per month** for free.

### Performance & Architecture

- **Zero Headless Browser Overhead**: Direct protocol calls eliminate Chromium boot time, reducing memory usage to **256 MB** and run duration to **5–25 seconds**.
- **Limited Permissions Security**: Runs strictly under Apify's **Limited Permissions** model — accessing only its own run storages.
- **Automated Quality & Fail-Safe**: Built-in error handling ensures clean status reporting if an upstream target temporarily rate-limits or returns empty results.

### FAQ

#### Is there a minimum tweet count charged per run?

No. Unlike scrapers that enforce a 50-tweet minimum, you can scrape a single tweet URL and pay only for the exact item returned.

#### Do I need an X Developer API key or logged-in cookies?

No. All 11 modes run with zero X API keys, zero cookies, and zero headless browsers.

#### Can I extract direct HD MP4 video download links from tweets?

Yes. Video tweets automatically populate `video_url` and `video_urls` with direct MP4 streams alongside engagement counts.

#### How does Solana / Base token X intelligence work?

Use `action: token_x_intel` with any contract address (`contractAddress`) or `action: meme_radar` to map live DexScreener tokens directly to their official X accounts.

#### Can I run short-interval schedules to monitor KOL timelines?

Yes. Lightweight 256 MB runs typically complete in 5–12 seconds, making hourly or real-time monitoring fast and inexpensive.

### More Scrapers by JiStudio

Explore our full suite of direct-protocol, zero-browser data extraction Actors on Apify Store:

| Actor | Target Platform | Best For |
| :--- | :--- | :--- |
| [Shopee Scraper](https://apify.com/jistudio/shopee-scraper) | Shopee (8 Countries) | Exact unrounded sold counts, prices, vouchers, Shopee Live bags |
| [TikTok Shop Scraper](https://apify.com/jistudio/tiktok-shop-scraper) | TikTok & TikTok Shop (22+ Regions) | Trending feeds, HD no-watermark MP4, SKUs, KOL affiliates |
| [TikTok Transcript Scraper](https://apify.com/jistudio/tiktok-transcript-scraper) | TikTok Audio / Captions | Verbatim speech transcripts & WebVTT subtitles for LLM RAG |
| [Lazada Scraper](https://apify.com/jistudio/lazada-scraper) | Lazada (6 SEA Countries) | Search listings, LazMall bestsellers, verified buyer reviews |
| [Goofish Xianyu Scraper](https://apify.com/jistudio/goofish-xianyu-scraper) | Goofish / Xianyu (闲鱼) | China C2C resale arbitrage, seller credit & price comps |
| [AliExpress Scraper](https://apify.com/jistudio/aliexpress-scraper) | AliExpress Global | Dropshipping SKUs, localized shipping, verified buyer reviews |
| [1688 Wholesale Scraper](https://apify.com/jistudio/1688-wholesale-scraper) | 1688.com Factories | Direct Chinese factory pricing, MOQ tiers & SKU matrices |
| [Twitter Scraper](https://apify.com/jistudio/twitter-scraper) | X (Twitter) & Crypto | Single tweets, threads, HD videos & Solana/Base token X-intel |

### Support & Legal Compliance

#### Support & Feature Requests

Need help with a specific URL, custom field mapping, or edge case? Open a ticket on the **Issues** tab of this Actor on Apify Console — we actively monitor and ship patches rapidly.

#### Legal & Ethical Scraping Notice

This Actor accesses **only publicly available data** visible to unauthenticated visitors and does not bypass login screens or extract private personal data (PII). You are responsible for ensuring your data collection and usage comply with applicable laws (including GDPR/CCPA) and target website terms.

# Actor input Schema

## `action` (type: `string`):

Select the extraction mode, or choose 'auto_start_urls' to paste a mixed list of Tweet URLs, Profile URLs, and Token CAs into Start URLs below.

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

Paste any mix of X/Twitter Tweet URLs (https://x.com/user/status/123), Profile URLs (https://x.com/solana), or Solana/Base Contract Addresses. The scraper automatically detects each item type!

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

List of X handles (without @) to fetch their latest timeline tweets and profile stats (e.g., \['solana', 'elonmusk', 'VitalikButerin']).

## `tweetIdOrUrl` (type: `string`):

Numeric Tweet ID or full https://x.com/user/status/1234567890 URL.

## `username` (type: `string`):

Twitter/X username without @ (e.g. 'elonmusk', 'solana', 'VitalikButerin').

## `batchTweetIds` (type: `string`):

Up to 25 comma-separated numeric Tweet IDs or URLs.

## `contractAddress` (type: `string`):

Solana, Base, Ethereum, or BSC token contract address (e.g. 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263').

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

Search token ticker or keyword on DexScreener + X (e.g. 'BONK', 'PEPE', 'SOL').

## `chain` (type: `string`):

Filter tokens by blockchain network.

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

Maximum number of tweets or tokens to return per handle or query (1 - 5,000). No 50-tweet minimum!

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

If enabled, only returns tweets that contain a downloadable video.

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

If enabled, only returns tweets that contain images or media.

## `minimumLikes` (type: `integer`):

Only return tweets with at least this many likes (0 = no filter).

## `minimumRetweets` (type: `integer`):

Only return tweets with at least this many retweets (0 = no filter).

## Actor input object example

```json
{
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/solana/status/2125078025377378634",
    "https://x.com/solana"
  ],
  "twitterHandles": [
    "solana"
  ],
  "tweetIdOrUrl": "2124953580662886416",
  "username": "solana",
  "batchTweetIds": "2125078025377378634,1812258574049157405,20",
  "contractAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "searchQuery": "BONK",
  "chain": "solana",
  "maxItems": 10,
  "onlyVideo": false,
  "onlyImage": false,
  "minimumLikes": 0,
  "minimumRetweets": 0
}
```

# Actor output Schema

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

No description

## `rawOutput` (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 = {
    "action": "auto_start_urls",
    "startUrls": [
        "https://x.com/solana/status/2125078025377378634",
        "https://x.com/solana"
    ],
    "twitterHandles": [
        "solana"
    ],
    "tweetIdOrUrl": "2124953580662886416",
    "username": "solana",
    "batchTweetIds": "2125078025377378634,1812258574049157405,20",
    "contractAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
    "searchQuery": "BONK",
    "chain": "solana"
};

// Run the Actor and wait for it to finish
const run = await client.actor("jistudio/twitter-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "action": "auto_start_urls",
    "startUrls": [
        "https://x.com/solana/status/2125078025377378634",
        "https://x.com/solana",
    ],
    "twitterHandles": ["solana"],
    "tweetIdOrUrl": "2124953580662886416",
    "username": "solana",
    "batchTweetIds": "2125078025377378634,1812258574049157405,20",
    "contractAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
    "searchQuery": "BONK",
    "chain": "solana",
}

# Run the Actor and wait for it to finish
run = client.actor("jistudio/twitter-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "action": "auto_start_urls",
  "startUrls": [
    "https://x.com/solana/status/2125078025377378634",
    "https://x.com/solana"
  ],
  "twitterHandles": [
    "solana"
  ],
  "tweetIdOrUrl": "2124953580662886416",
  "username": "solana",
  "batchTweetIds": "2125078025377378634,1812258574049157405,20",
  "contractAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "searchQuery": "BONK",
  "chain": "solana"
}' |
apify call jistudio/twitter-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jistudio/twitter-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eHaBKIWQVqVUv8QtL/builds/74BNwiqMAzJe6eoJw/openapi.json
