# X Profile Tweets Scraper (`fetch_cat/x-profile-tweets-scraper`) Actor

Scrape public tweets from X profiles and status URLs for social listening and content monitoring.

- **URL**: https://apify.com/fetch\_cat/x-profile-tweets-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (community)
- **Categories:** Social media, Marketing, Automation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 1,000 result extracteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## X Profile Tweets Scraper

Scrape visible public tweets from X profile pages and status URLs, including text, author, tweet URL, engagement counts when available, media URLs, reply flags, and scrape timestamps.

Use it for social listening, competitor monitoring, creator research, lightweight public-post exports, content tracking, and agent-ready X/Twitter datasets.

### At a glance

- **Public profile tweets**: Add one or more X/Twitter profile URLs and save visible public tweets.
- **Specific status URLs**: Add individual public tweet URLs when you need exact posts.
- **Engagement fields**: Export reply, repost, like, and view counts when they are visible in the public page HTML.
- **Reply control**: Include or skip tweets detected as replies.
- **API-ready output**: Download CSV/JSON/Excel exports or send tweet rows to dashboards, social listening workflows, agents, and warehouses.

### Ready-to-run examples

Use these saved Store examples as starting points:

- **[Create an X social listening profile report](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-social-listening-profile-report)**: Track recent visible posts from a public profile for brand or product monitoring.
- **[Archive a specific X status URL](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-status-url-tweet-archive)**: Extract one or more exact public tweet URLs when the post ID matters.
- **[Export an X profile timeline without replies](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-profile-timeline-without-replies)**: Save top-level visible tweets from a profile and skip detected replies.
- **[Build a developer tools X tweet dataset](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-developer-tools-tweet-dataset)**: Collect public posts from developer-tool accounts for research or dataset exports.
- **[Monitor competitor X profile updates](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-competitor-profile-monitoring)**: Compare recent visible posts from competitor or market accounts.
- **[Export tweets from a company X profile](https://apify.com/fetch_cat/x-profile-tweets-scraper/examples/x-company-profile-tweets-export)**: Start with a small company-profile export before scaling up.

### What can it do?

X Profile Tweets Scraper fetches public X pages, parses visible tweet blocks, removes duplicate tweet IDs within a run, and saves one dataset row per extracted public tweet.

- **Extract profile timelines**: Save visible tweets from each supplied public profile URL.
- **Extract status pages**: Save specific public tweets from `statusUrls`.
- **Capture author context**: Save username, display name, profile URL, tweet ID, and tweet URL.
- **Capture content and metrics**: Save tweet text, visible counts, media URLs, reply flag, and timestamp fields.
- **Control result volume**: Use `maxTweetsPerProfile` to cap saved tweets per profile.

### Common workflows

- **Social listening**: Track public posts from brands, products, founders, creators, or competitors.
- **Content research**: Export tweet text and URLs for topic analysis, newsletters, trend reports, or editorial planning.
- **Competitor monitoring**: Schedule small runs for public competitor profiles and compare post cadence or engagement.
- **Creator research**: Collect recent visible posts and media URLs from public accounts.
- **Agent workflows**: Feed public tweet rows into MCP-compatible tools or downstream summarization pipelines.

### Output fields

The actor returns one dataset row per saved public tweet.

| Field | Description |
| --- | --- |
| `profileUrl` | Source profile URL when the tweet came from a profile page |
| `username` | X username |
| `displayName` | Display name when visible |
| `tweetId` | Tweet/status ID |
| `tweetUrl` | Public tweet URL |
| `text` | Tweet text extracted from the public page |
| `createdAt` | Visible date or time label from the page |
| `replyCount` | Reply count when visible |
| `repostCount` | Repost count when visible |
| `likeCount` | Like count when visible |
| `viewCount` | View count when visible |
| `mediaUrls` | Public media image URLs found in the tweet block |
| `isReply` | Whether the tweet appears to be a reply |
| `scrapedAt` | ISO timestamp for extraction |

### Pricing

The actor uses pay-per-event pricing, so cost is tied to the run and saved tweet rows.

| Event | Price | Charged when |
| --- | --- | --- |
| `start` | `$0.005` per run | Once when the actor starts. |
| `result` | BRONZE `$0.0000347` per saved tweet row | Each public tweet row saved to the dataset. This is about `$0.03` per 1,000 saved tweets on BRONZE, with lower per-result prices on higher Apify plans. |

Use a low `maxTweetsPerProfile` value for your first run, review the rows, and then scale up carefully. Exact live pricing is shown on the Apify actor page before you start a run.

### Input configuration

| Setting | JSON key | Use it for | Example |
| --- | --- | --- | --- |
| Profile URLs | `profileUrls` | Public X/Twitter profiles to scan. | `[{"url":"https://x.com/Apify"}]` |
| Status URLs | `statusUrls` | Optional individual public tweet/status URLs to extract. | `[{"url":"https://x.com/Apify/status/1234567890"}]` |
| Maximum tweets per profile | `maxTweetsPerProfile` | Cap visible tweets saved from each profile URL. | `10` |
| Include replies | `includeReplies` | Keep or skip tweets detected as replies. | `true` |
| Maximum run time | `maxRuntimeSeconds` | Optional 45–270 second work budget; unfinished URLs are checkpointed. | `45` |
| Resume pending work | `resumeState` | Optional `PENDING_WORK` checkpoint from an interrupted run. | `{"pendingUrls":["https://x.com/Apify"]}` |
| Proxy configuration | `proxyConfiguration` | Optional Apify Proxy settings for public page requests. | `{"useApifyProxy":true}` |

### Example input

```json
{
  "profileUrls": [
    { "url": "https://x.com/Apify" }
  ],
  "statusUrls": [],
  "maxTweetsPerProfile": 10,
  "includeReplies": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

### Example output

```json
{
  "profileUrl": "https://x.com/Apify",
  "username": "Apify",
  "displayName": "Apify",
  "tweetId": "1234567890123456789",
  "tweetUrl": "https://x.com/Apify/status/1234567890123456789",
  "text": "Build web scrapers, automations, and data extraction workflows with Apify.",
  "createdAt": "Jul 3",
  "replyCount": 2,
  "repostCount": 6,
  "likeCount": 42,
  "viewCount": 1200,
  "mediaUrls": [],
  "isReply": false,
  "scrapedAt": "2026-07-03T10:00:00.000Z"
}
```

### Tips for better results

- **Start with one profile**: Test a public profile URL and a small `maxTweetsPerProfile` value.
- **Use status URLs for exact posts**: Add `statusUrls` when you need specific tweet IDs instead of recent visible profile posts.
- **Expect visible-page limits**: The actor extracts what is visible in public page HTML, not an authenticated full archive.
- **Filter replies intentionally**: Set `includeReplies` to `false` for brand-feed monitoring when replies are less useful.
- **Review null metrics**: Engagement counts can be null when X does not render them in the public page response.
- **Resume an interrupted batch**: Copy the `PENDING_WORK` record into `resumeState` to retry only unfinished public URLs.
- **Bound a batch deliberately**: Set `maxRuntimeSeconds` to 45–270 when you want a short, checkpointed run instead of using the full platform timeout.

### Limits and practical notes

- The actor extracts public X/Twitter pages only.
- It does not log in, access private profiles, scrape protected tweets, or bypass account restrictions.
- X page markup, visibility, rate limits, and anti-bot behavior can change.
- Very old posts or infinite-scroll content may not be visible from the first public page response.
- Counts and date labels are public-page values and can differ from logged-in or localized views.

### API usage

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~x-profile-tweets-scraper/runs?token=YOUR_APIFY_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"profileUrls":[{"url":"https://x.com/Apify"}],"maxTweetsPerProfile":10,"includeReplies":true}'
```

#### Node.js

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('fetch_cat/x-profile-tweets-scraper').call({
  profileUrls: [{ url: 'https://x.com/Apify' }],
  maxTweetsPerProfile: 10,
  includeReplies: true
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
import os

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("fetch_cat/x-profile-tweets-scraper").call(run_input={
    "profileUrls": [{"url": "https://x.com/Apify"}],
    "maxTweetsPerProfile": 10,
    "includeReplies": True,
})
items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

### MCP and AI agents

Use this actor from MCP-compatible tools through Apify MCP Server.

MCP URL:

```text
https://mcp.apify.com?tools=fetch_cat/x-profile-tweets-scraper
```

Example prompts:

- "Scrape visible public tweets from this profile and summarize recent product mentions."
- "Extract these public status URLs and return tweet text plus engagement counts."
- "Monitor these public X profiles weekly and flag posts with media URLs."

### Legality and responsible use

This actor extracts publicly visible X/Twitter page data.

Use the data responsibly, follow X's terms, Apify's terms, and applicable privacy, platform, copyright, and anti-spam laws.

Do not use exported data for harassment, spam, credential collection, or attempts to access private content.

### Related actors

Explore related actors from the same Apify account:

- [TikTok Profile Scraper](https://apify.com/fetch_cat/tiktok-profile-scraper)

- [Reddit Scraper](https://apify.com/fetch_cat/reddit-scraper)

- [Telegram Channel Posts Scraper](https://apify.com/fetch_cat/telegram-channel-posts-scraper)

- [Bluesky Profile Feed Scraper](https://apify.com/fetch_cat/bluesky-profile-feed-scraper)

- [YouTube Comments Scraper](https://apify.com/fetch_cat/youtube-comments-scraper)

- `0.1` - Initial version for public X profile and status URL tweet extraction.

### Support

If a run fails, returns no tweets for a public profile, or a field looks wrong, open an issue from the Actor page.

Please include the Apify run ID, input JSON, one example public profile or status URL, what you expected, and what the dataset returned. Small reproducible inputs make X layout or parsing issues much faster to fix.

# Actor input Schema

## `profileUrls` (type: `array`):

Public X/Twitter profile URLs to scan, such as https://x.com/Apify. The actor returns visible tweets from each public profile page.

## `statusUrls` (type: `array`):

Optional individual public X/Twitter status URLs to extract. Use this when you need specific posts in addition to profile timelines.

## `maxTweetsPerProfile` (type: `integer`):

Maximum number of visible tweets to save from each profile URL. Keep this low for quick tests.

## `includeReplies` (type: `boolean`):

When disabled, tweets detected as replies are skipped.

## `maxRuntimeSeconds` (type: `integer`):

Optional total time budget for fetching public sources. The actor checkpoints unfinished URLs before this limit so they can be resumed. Leave empty to use the platform run timeout.

## `resumeState` (type: `object`):

Optional checkpoint object from the PENDING\_WORK record of a previous interrupted run. Existing profile and status URL inputs continue to work unchanged.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings. Datacenter proxy is usually enough for small public-page runs; use residential only if needed.

## Actor input object example

```json
{
  "profileUrls": [
    {
      "url": "https://x.com/Apify"
    }
  ],
  "statusUrls": [],
  "maxTweetsPerProfile": 10,
  "includeReplies": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "SHADER"
    ]
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "profileUrls": [
        {
            "url": "https://x.com/Apify"
        }
    ],
    "statusUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/x-profile-tweets-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 = {
    "profileUrls": [{ "url": "https://x.com/Apify" }],
    "statusUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/x-profile-tweets-scraper").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 '{
  "profileUrls": [
    {
      "url": "https://x.com/Apify"
    }
  ],
  "statusUrls": []
}' |
apify call fetch_cat/x-profile-tweets-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/ZoFPruLOZR2fBr66Q/builds/ohc8ubhztzsJBXXyS/openapi.json
