# Twitter Posts Scraper (`icoe-man/twitter-posts-scraper`) Actor

A twitter posts scraper: collect the public posts of any X (Twitter) account with text, dates, counts, links and the author record. Reposts on request. Export JSON, CSV or Excel.

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

## Pricing

from $0.34 / 1,000 profile 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 Posts Scraper

Download public X (Twitter) posts in a table you can review or open in another tool. Enter the account handles to get posts newest first, with text, dates, counts and author details. The table also includes links to the posts, their media and other sites they link to. Filter the newest posts by date or turn on Include reposts to collect those too.

### What you get

Enter up to 100 handles in **Handles**, and set **Posts from** (optional), **Posts before** (optional), **Include reposts** (optional). By default, you get up to 100 public posts for each handle. To change that limit, enter a number no higher than 1000 in **Result limit per handle**. 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

- Content research: Review what a brand posts and see which posts draw the most views, likes or replies.
- Campaign reporting: Pull view, like and reply counts from recent posts for your campaign report.
- Archiving: Keep a copy of recent posts with the dates and links so you can find them again.
- Market research: Compare what several brands talk about on X, how they write and which hashtags they use.

### What to enter

| Field key | Name on the form | What to enter |
| --- | --- | --- |
| `usernames` | Handles | Enter X (Twitter) usernames like NASA or @NASA. Profile links like https://x.com/NASA work too. |
| `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. The Actor checks only the newest posts up to your result limit, so an older range may return fewer posts or none. The run stops after three pages in a row with no matches. |
| `postedBefore` | Posts before | Enter a date in UTC, such as 2026-11-15, to keep only posts from before that day. Leave blank for no end date. The Actor checks only the newest posts up to your result limit, so an older range may return fewer posts or none. The run stops after three pages in a row with no matches. |
| `includeReposts` | Include reposts | Turn this on to collect the account's reposts. Each repost includes the original post and its author. Off by default. |
| `maxItems` | Result limit per handle | Enter the maximum number of results to collect for each handle. |
| `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
{
  "usernames": [
    "NASA"
  ],
  "maxItems": 10,
  "freshness": "standard"
}
```

### Your results

Example result for one post:

```json
{
  "status": "ok",
  "type": "post",
  "platform": "twitter",
  "id": "1234567890123456789",
  "url": "https://x.com/nasa/status/1234567890123456789",
  "author": {
    "id": "11348282",
    "username": "nasa",
    "displayName": "NASA",
    "verified": true
  },
  "text": "A short example sentence about a space mission, shown for illustration.",
  "language": "en",
  "createdAt": "2026-11-13T15:30:00Z",
  "metrics": {
    "likes": 5400,
    "comments": 210,
    "shares": 980,
    "views": 310000,
    "saves": 120
  },
  "hashtags": [],
  "mentions": [],
  "media": [
    {
      "kind": "image",
      "url": "https://pbs.twimg.com/media/example.jpg",
      "thumbnailUrl": null,
      "durationSec": null,
      "width": 1200,
      "height": 675
    }
  ],
  "details": {
    "twitter": {
      "postType": "quote",
      "conversationId": "1234567890123456789",
      "quotedPostId": "1234567890123456700",
      "quotes": 64,
      "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/",
      "authorCanDm": false,
      "links": [
        "https://www.example.com/article"
      ],
      "source": "Twitter Web App",
      "replyToUsername": null,
      "possiblySensitive": false,
      "altTexts": [
        "An example image description."
      ],
      "poll": {
        "choices": [
          {
            "label": "Option one",
            "votes": 395
          },
          {
            "label": "Option two",
            "votes": 379
          }
        ],
        "endsAt": "2026-11-14T20:59:37Z"
      },
      "quotedPost": {
        "id": "1234567890123456700",
        "url": "https://x.com/example_user/status/1234567890123456700",
        "authorUsername": "example_user",
        "text": "An example quoted post, shown for illustration.",
        "createdAt": "2026-11-12T09:00:00Z",
        "likes": 120,
        "comments": 8,
        "shares": 15,
        "views": 9800
      },
      "repostOf": null
    }
  },
  "collectedAt": "2026-11-14T12:00:00Z",
  "input": {
    "username": "NASA",
    "maxItems": 10
  }
}
```

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 |
| --- | --- | --- | --- | --- | --- | --- |
| Profile posts | $0.440 | $0.400 | $0.400 | $0.343 | $0.343 | $0.343 |

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 10 results per run and make up to 20 runs per day.

### Common questions

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

Each row can include the post text, link, date and author, plus counts for likes, replies, reposts, views and quotes. When X shows them publicly, you also get hashtags, mentions, media links and full web addresses for links to other sites. Author details can include the bio, profile and banner images, how many followers and posts the account has, how many accounts it follows, when it joined and whether it's protected. The results also include replies and quote posts the account wrote.

#### Which details can be missing from the results?

Some rows may leave out the author's listed location, badge type, website or whether they accept direct messages. A row may also omit the app used to post, image descriptions, whether the post is marked as sensitive, poll details, who the post replies to, or the text and counts for a quoted or reposted post. The Actor never includes paid-promotion or AI-media labels.

#### Does the Actor collect reposts?

Yes, if you turn on Include reposts. Each repost comes with the original post and its author. The Actor skips reposts by default, so you may get fewer results than your limit.

#### Can I collect posts from a specific date range?

Yes. Enter dates in UTC in Posts from, Posts before or both. Posts from includes the date you enter. Posts before leaves that date out. The Actor only checks the newest posts up to your result limit, so you may get fewer matches than requested. An older date range may return none.

#### How do I choose which accounts to collect posts from?

Enter the accounts in Handles. Use a username with or without the @ sign (NASA or @NASA), or paste a profile link like https://x.com/NASA.

#### Do I need to sign in to X?

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

#### How do I limit results, and what am I charged for?

Set Result limit per handle to cap how many posts you get from each account. You pay only for the posts you receive. Errors and empty results cost nothing. The run stops if it reaches your spending limit.

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

No. This independent tool is not affiliated with, endorsed by or sponsored by X (Twitter). It collects only information X makes public.

### Disclaimer

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

# Actor input Schema

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

Enter X (Twitter) usernames like NASA or @NASA. Profile links like https://x.com/NASA work too.

## `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. The Actor checks only the newest posts up to your result limit, so an older range may return fewer posts or none. The run stops after three pages in a row with no matches.

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

Enter a date in UTC, such as 2026-11-15, to keep only posts from before that day. Leave blank for no end date. The Actor checks only the newest posts up to your result limit, so an older range may return fewer posts or none. The run stops after three pages in a row with no matches.

## `includeReposts` (type: `string`):

Turn this on to collect the account's reposts. Each repost includes the original post and its author. Off by default.

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

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

## `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
{
  "usernames": [
    "NASA"
  ],
  "includeReposts": "false",
  "maxItems": 10,
  "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 = {
    "usernames": [
        "NASA"
    ],
    "maxItems": 10
};

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

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

```

## MCP server setup

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