# X (Twitter) Search Scraper: Tweets & Replies (`feeddlabs/x-twitter-search`) Actor

Search X posts and replies by keyword, account, date, and engagement. Free demo: fixed sample only; paid Apify plan required for custom data. API platform usage is billed separately by Apify.

- **URL**: https://apify.com/feeddlabs/x-twitter-search.md
- **Developed by:** [Feedd Labs](https://apify.com/feeddlabs) (community)
- **Categories:** Social media, News
- **Stats:** 1 total users, 1 monthly users, 91.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.15 / 1,000 tweets

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

![X (Twitter) Search Scraper by Feedd Labs](https://api.apify.com/v2/key-value-stores/Sw4BBkYoScT1IcdEY/records/banner-search.png)

## X (Twitter) Search Scraper: Tweets & Replies

**Free demo:** runs and API requests return a fixed sample of real rows.
Your accounts, queries, dates, and filters are not applied. Repeating a run
returns the same sample; a smaller row limit returns its prefix. Upgrade
your Apify plan to request your own data. Demo rows have no result charge;
the listed Actor start charge still applies.

Search X posts and replies by keyword, account, and date, with text, author,
engagement, and media. No X API key or X developer account is required.
Results depend on what X makes available through search.

**$0.20 per 1,000 tweets.** No minimum result count per search. Try the fixed Free demo.

### Why use it

- **Pay per tweet.** The price per tweet is the same however many you get.
- **Filters instead of search syntax.** Tick filters for likes, dates,
  language, media, and blue checks (full list below), or type X's own
  operators.
- **Full posts.** The whole text (long posts included), the best-quality
  video, and the post it quotes, one row per tweet.
- **Replies.** Collect the replies under any post.

### Quick start

```json
{ "queries": ["bitcoin", "#AI"], "sort": "Latest", "maxItems": 500 }
```

Narrow it down with filters:

```json
{ "queries": ["$SOL"], "minLikes": 100, "blueOnly": true, "since": "2026-10-01" }
```

| Filters | |
| --- | --- |
| Who | **From accounts**, **Mentioning**, **Blue check only** |
| When | **From date**, **Before date** |
| Popular | **Minimum likes**, **Minimum reposts**, **Minimum replies** |
| Content | **Only images**, **Only videos**, **Only quotes**, **Only with links**, **Language** |
| Leave out | **Exclude replies**, **Exclude reposts** |

Replies under a post (optional **From date** and **Before date** also apply):

```json
{ "mode": "replies", "tweets": ["https://x.com/NASA/status/2108662426606395572"] }
```

### What you get

One row per tweet: `url`, `text`, `created_at`, `lang`, `type` (tweet, reply,
quote, or repost), `author`, `likes`, `reposts`, `replies`, `quotes`, `views`,
`media`, and `quoted`, plus the `query` that found it.

### Use it as an API

Call it like a REST API, with no runs to manage: `/search` and `/replies`
answer in JSON with the same rows and prices as a run. Try them in the
**Endpoints** tab, or copy the Actor's URL from there:

```bash
curl -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  "https://ACTOR_URL/search?query=bitcoin&minLikes=100"
```

### Pricing

Prices below are result fees. The **Pricing** tab also lists an Actor start
charge, including for empty runs, demo runs, and problem reports. Demo rows have
no result charge. Custom data requires a paid Apify plan. Its subscription
includes usage credit; it is not a separate Feedd subscription. API calls
require an Apify token.

$0.20 per 1,000 tweets, only for rows you get: 10,000 tweets cost $2. On
Apify's Business plan, $0.15 per 1,000.

Apify Free plan: fixed sample data only. Runs and API calls return the same
sample. Upgrade for custom data at the result rates above.

### FAQ

**Do filters apply to replies?** Date bounds and the row limit apply. Other
search filters require search mode and are rejected in replies mode.

**Do I need an X account or API key?** No.

**Is the row limit per query?** No. **Maximum rows** is the total across all
queries or reply targets in the run. A capped result is not a complete archive.

**How many tweets can I get?** Up to 10,000 per run. Run it again with a later
date range for more.

**Latest or Top?** Latest returns available matches, newest first. Top
returns matches ranked by X. Neither mode guarantees every matching post.

**Can AI agents use it?** Yes. Add
`https://mcp.apify.com?tools=feeddlabs/x-twitter-search` to Claude,
ChatGPT, or Cursor and ask, for example, "Find the 50 most-liked posts about
$SOL this week."

**Something not right?** Write it in **Report a problem** and run the Actor.
The run only submits your report, with no result charge. The listed Actor
start charge still applies. AI agents can report problems too.

### More from Feedd Labs

| Actor | What it does |
| --- | --- |
| [X (Twitter) Real-Time Monitor](https://apify.com/feeddlabs/x-twitter-user-tracker) | Posts and account changes delivered by WebSocket or webhook |
| [X (Twitter) Search Scraper](https://apify.com/feeddlabs/x-twitter-search) | Tweets and replies by keyword, account and date |
| [X (Twitter) Followers Scraper](https://apify.com/feeddlabs/x-twitter-followers-scraper) | Followers, following and profiles of public accounts |
| [X (Twitter) Account Watch](https://apify.com/feeddlabs/x-account-changes) | Who an account follows or unfollows, and its profile changes |
| [X (Twitter) Ads Library](https://apify.com/feeddlabs/x-ads-library) | Collected promoted ads and brand creative |
| [Mainstream News Live & Archive](https://apify.com/feeddlabs/mainstream-news-archive) | Collected news articles from major outlets |
| [US Stock Market Data](https://apify.com/feeddlabs/us-stock-market-data) | 1-minute stock history since 2016, futures and financial statements |
| [Crypto Derivatives Data](https://apify.com/feeddlabs/crypto-derivatives-data) | Open interest, funding and liquidations on 4 exchanges |
| [Crypto OHLCV & Trades](https://apify.com/feeddlabs/crypto-ohlcv-trades-data) | Candles from 1 second to 1 day and individual trades |
| [Polymarket Data](https://apify.com/feeddlabs/polymarket-odds-history) | Available odds history, volume and open interest by event |

# Actor input Schema

## `mode` (type: `string`):

Search tweets, or collect the replies under tweets. For followers and following, use our X (Twitter) Followers Scraper.

## `queries` (type: `array`):

Keywords, hashtags, $cashtags, or full X advanced-search queries, e.g. "bitcoin min_faves:100 -filter:replies". Up to 20. Used in search mode.

## `fromUsers` (type: `array`):

Only posts by these accounts (handles, with or without @). Combine with search terms, or use alone for their latest posts.

## `mentioning` (type: `array`):

Posts that mention any of these accounts, up to 10.

## `tweets` (type: `array`):

Tweet URLs or IDs whose replies to collect, up to 20. Used in replies mode.

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

Latest posts first, X's Top ranking, or only posts with media. Default: Latest.

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

Stop after this many tweets in total. You pay per tweet. Total across the whole run, not per query or account. On Free, this can only shorten the fixed sample.

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

Two- or three-letter language code, e.g. en, es, ja.

## `since` (type: `string`):

Posts from this day (UTC).

## `until` (type: `string`):

Posts before this day (UTC).

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

Only posts with at least this many likes.

## `minReposts` (type: `integer`):

Only posts with at least this many reposts.

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

Only posts with at least this many replies.

## `onlyMedia` (type: `boolean`):

Only posts with images or videos.

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

Only posts with images.

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

Only posts with videos.

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

Only quote posts.

## `onlyLinks` (type: `boolean`):

Only posts that link to a website.

## `blueOnly` (type: `boolean`):

Only posts from accounts with a blue check.

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

Skip replies.

## `excludeReposts` (type: `boolean`):

Skip reposts.

## `reportProblem` (type: `string`):

Something wrong or missing? Write it here and run: we get your message, the run does nothing else, and it's free. AI agents can use this too.

## Actor input object example

```json
{
  "mode": "search",
  "queries": [
    "bitcoin"
  ],
  "sort": "Latest",
  "maxItems": 20,
  "onlyMedia": false,
  "onlyImages": false,
  "onlyVideos": false,
  "onlyQuotes": false,
  "onlyLinks": false,
  "blueOnly": false,
  "excludeReplies": false,
  "excludeReposts": false
}
```

# Actor output Schema

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

Dataset rows: tweets with full text, author, engagement, and media.

## `summary` (type: `string`):

The OUTPUT record: tweets per query, or an error code.

# 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 = {
    "queries": [
        "bitcoin"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("feeddlabs/x-twitter-search").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 = {
    "queries": ["bitcoin"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("feeddlabs/x-twitter-search").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 '{
  "queries": [
    "bitcoin"
  ],
  "maxItems": 20
}' |
apify call feeddlabs/x-twitter-search --silent --output-dataset

```

## MCP server setup

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

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/dG3fcupWKRQACpWPI/builds/5iSg2fvsqU28KUsQ5/openapi.json
