# Twitter Search Scraper (`icoe-man/twitter-search-scraper`) Actor

A twitter search scraper: search X (Twitter) by keyword and collect matching posts with authors, dates, counts and media links. Export JSON, CSV or Excel.

- **URL**: https://apify.com/icoe-man/twitter-search-scraper.md
- **Developed by:** [Icoe Man](https://apify.com/icoe-man) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 search posts

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 Search Scraper

Get a downloadable table of public X (Twitter) posts about the topics you're researching. Add one or more search terms in Keywords, then compare matching posts side by side by author, date, or counts such as likes and replies. You can also take the results into another tool.

### What you get

Enter up to 100 keywords in **Keywords**, and set **Posts from** (optional), **Posts before** (optional), **Language** (optional), **Minimum likes** (optional), **Minimum replies** (optional), **Minimum reposts** (optional), **Replying to** (optional), **Content** (optional), **Replies** (optional), **Verified authors only** (optional). By default, you get up to 100 public posts for each keyword. To change that limit, enter a number no higher than 1000 in **Result limit per keyword**. Each post gets its own row in the results table. Choose **Live** under **Data freshness** to collect fresh data on every run.

### Ways to use the data

- Read what people say about your brand or product in public posts.
- Spot common themes in posts about a topic or event.
- Bring public reactions to a launch or announcement into one table.
- Compare what people say about different brands in your market.
- Find recent posts on a topic to spark your next content idea.

### What to enter

| Field key | Name on the form | What to enter |
| --- | --- | --- |
| `keywords` | Keywords | Enter one or more search terms, such as nasa. |
| `postedAfter` | Posts from | Enter a date in UTC, such as 2026-11-01, to include posts from that day onward. Leave blank for no start date. |
| `postedBefore` | Posts before | Enter a date in UTC, such as 2026-11-15, to include only posts before that day. Leave blank for no end date or if you use Verified authors only. This filter may return fewer results than your limit. |
| `language` | Language | Enter a two-letter language code, such as en for English or es for Spanish. Leave blank to allow any language or if you use Verified authors only. |
| `minLikes` | Minimum likes | Enter how many likes a post needs to qualify, such as 100. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `minReplies` | Minimum replies | Enter how many replies a post needs to qualify. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `minReposts` | Minimum reposts | Enter how many reposts a post needs to qualify. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `replyingTo` | Replying to | Enter a username, such as NASA, to get only replies to that account. Leave blank to allow replies to any account. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `contentType` | Content | By default, any post can match. To narrow the results, choose posts with images, videos, any media, or links. You can't choose videos with Verified authors only. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `replies` | Replies | The search includes replies by default. You can leave them out or get only replies. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `verifiedOnly` | Verified authors only | Turn this on to get posts only from verified accounts. It's off by default. You can't combine it with Posts before, Language, or videos under Content. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match. |
| `maxItems` | Result limit per keyword | Enter the maximum number of results to collect for each keyword. |
| `freshness` | Data freshness | Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run. |

Example input:

```json
{
  "keywords": [
    "nasa"
  ],
  "maxItems": 20,
  "freshness": "standard"
}
```

### Your results

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "twitter",
  "id": "2100000000000000001",
  "url": "https://x.com/NASA/status/2100000000000000001",
  "author": {
    "id": "11348282",
    "username": "NASA",
    "displayName": "NASA",
    "verified": true
  },
  "text": "A short example sentence about a space mission, shown for illustration. #artemis",
  "language": "en",
  "createdAt": "2026-10-27T10:46:34Z",
  "metrics": {
    "likes": 1280,
    "comments": 42,
    "shares": 310,
    "views": 51200,
    "saves": 95
  },
  "hashtags": [
    "artemis"
  ],
  "mentions": [],
  "media": [
    {
      "kind": "image",
      "url": "https://pbs.twimg.com/media/example.jpg",
      "thumbnailUrl": "https://pbs.twimg.com/media/example.jpg",
      "durationSec": null,
      "width": 1200,
      "height": 675
    }
  ],
  "details": {
    "twitter": {
      "postType": "reply",
      "conversationId": "2100000000000000000",
      "inReplyToPostId": "2100000000000000000",
      "quotedPostId": "2100000000000000002",
      "quotes": 12,
      "authorFollowers": 92000000,
      "authorFollowing": 120,
      "authorPosts": 74000,
      "authorBio": "An example account bio, shown for illustration.",
      "authorAvatarUrl": "https://pbs.twimg.com/profile_images/example.jpg",
      "authorBannerUrl": "https://pbs.twimg.com/profile_banners/example.jpg",
      "authorCreatedAt": "2007-12-19T20:20:32Z",
      "authorVerifiedType": "Government",
      "authorProtected": false,
      "authorLocation": "Example City",
      "authorWebsite": "https://www.example.com/",
      "links": [
        "https://www.example.com/article"
      ],
      "source": "Twitter Web App",
      "replyToUsername": "example_user",
      "possiblySensitive": false,
      "paidPromotion": false,
      "aiGenerated": false,
      "altTexts": [
        "An example image description."
      ],
      "quotedPost": {
        "id": "2100000000000000002",
        "url": "https://x.com/example_user/status/2100000000000000002",
        "authorUsername": "example_user"
      }
    }
  },
  "collectedAt": "2026-11-11T12:00:00Z",
  "input": {
    "keyword": "nasa",
    "maxItems": 30
  }
}
```

Every row has a `status` field. For each entry that fails, the Actor returns one row with `status: "error"`. The `error` field has a `code` and a `message`.

### Pricing

You pay per result. Prices for each Apify plan are in USD per 1,000 results.

| What you pay for | Free | Bronze | Silver | Gold | Platinum | Diamond |
| --- | --- | --- | --- | --- | --- | --- |
| Search posts | $0.800 | $0.400 | $0.400 | $0.347 | $0.347 | $0.347 |

You don't pay for errors or empty results. The run stops when it reaches your spending limit.

On the free plan, you can collect up to 100 results per run and make up to 20 runs per day.

### Common questions

#### What details do I get for each post?

Each result can include the post's text, link, author, and date, plus counts for likes, replies, reposts, and views that X (Twitter) shows publicly. You may also get the full web addresses of links in the post and the name of the app used to publish it.

#### Which details might be missing from my results?

Author details can be blank, including the bio, pictures, account creation date, badge type, stated location, website, and counts for followers, accounts followed, and posts. A result may also be missing the posting app, image descriptions, or a link to the quoted post. Labels for sensitive content, paid promotion, and AI-generated media may be blank too. The Actor doesn't currently return the author's message setting, polls, or the text and counts from a quoted post.

#### How can I narrow my search?

Set a date range with Posts from and Posts before. You can also filter by Language or set a threshold with Minimum likes, Minimum replies, or Minimum reposts. Use Content to look for posts with images, videos, any media, or links. Replying to limits the search to replies to one account. Replies lets you include or exclude replies, or collect only replies. Verified authors only can't be combined with Posts before, Language, or videos under Content. When the Actor filters posts after reading them, it may return fewer results than your limit and stop early if too few posts match. Results follow X's top-post ranking, so the newest posts may not come first. You can't filter by author or mention.

#### Do I need an X (Twitter) account to run a search?

No. The Actor collects only public information, so you don't need to sign in to X (Twitter) or share browser cookies.

#### How do I limit my results, and what do I pay for?

Set Result limit per keyword to cap how many results the Actor collects for each keyword. You pay only for results you receive. Errors and empty results don't count, and the run stops when you reach your spending limit.

#### Is this tool affiliated with X (Twitter)?

No. This tool is independent of X (Twitter), which doesn't endorse or sponsor it. The tool collects only public information from the platform.

### Disclaimer

This Actor is not affiliated with, endorsed by, or sponsored by X (Twitter). All trademarks belong to their owners.

# Actor input Schema

## `keywords` (type: `array`):

Enter one or more search terms, such as nasa.

## `postedAfter` (type: `string`):

Enter a date in UTC, such as 2026-11-01, to include posts from that day onward. Leave blank for no start date.

## `postedBefore` (type: `string`):

Enter a date in UTC, such as 2026-11-15, to include only posts before that day. Leave blank for no end date or if you use Verified authors only. This filter may return fewer results than your limit.

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

Enter a two-letter language code, such as en for English or es for Spanish. Leave blank to allow any language or if you use Verified authors only.

## `minLikes` (type: `string`):

Enter how many likes a post needs to qualify, such as 100. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `minReplies` (type: `string`):

Enter how many replies a post needs to qualify. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `minReposts` (type: `string`):

Enter how many reposts a post needs to qualify. Leave blank for no minimum. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `replyingTo` (type: `string`):

Enter a username, such as NASA, to get only replies to that account. Leave blank to allow replies to any account. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `contentType` (type: `string`):

By default, any post can match. To narrow the results, choose posts with images, videos, any media, or links. You can't choose videos with Verified authors only. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `replies` (type: `string`):

The search includes replies by default. You can leave them out or get only replies. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

## `verifiedOnly` (type: `string`):

Turn this on to get posts only from verified accounts. It's off by default. You can't combine it with Posts before, Language, or videos under Content. If the Actor applies this filter after reading posts, you may get fewer results than your limit. The run stops early if three pages in a row have no matches or too few of the posts it reads match.

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

Enter the maximum number of results to collect for each keyword.

## `freshness` (type: `string`):

Standard can return results faster when recently collected data is available. Choose Live to collect fresh data on every run.

## Actor input object example

```json
{
  "keywords": [
    "nasa"
  ],
  "contentType": "any",
  "replies": "include",
  "verifiedOnly": "false",
  "maxItems": 20,
  "freshness": "standard"
}
```

# Actor output Schema

## `results` (type: `string`):

See everything this run collected in one table.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,icoe-man/twitter-search-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/qh6fFnukBRZUt27om/builds/ZDm2tfEdzxPWjF6Fj/openapi.json
