# X (Twitter) Profile Scraper (`tacps126/twitter-profile-scraper`) Actor

X (Twitter) profiles and their newest posts: followers, bio, verified, post text, likes, reposts, replies, quotes, views, photos and video, by username or post link. No login. Only-new monitoring.

- **URL**: https://apify.com/tacps126/twitter-profile-scraper.md
- **Developed by:** [Tapaswai Choudhary](https://apify.com/tacps126) (community)
- **Categories:** Social media, Marketing, News
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.32 / 1,000 profiles

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/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) Profile Scraper

Get X (Twitter) profiles and their newest posts as clean rows: followers, bio, website, verified badge, post text,
likes, reposts, replies, quotes, bookmarks, views, photos and video, links and mentions. Paste usernames or post links
and press Start. No X account, no login, no cookies, nothing to install.

### What you get

| Row | Fields |
|---|---|
| Profile | username, name, bio, location, website, followers, following, posts, media, likes, verified, protected, profile photo, banner, pinned posts, joined |
| Post | text (long posts in full), author, post time, language, likes, reposts, replies, quotes, bookmarks, views, photos, video (best MP4), links, hashtags, mentions, reposted post, quoted post, reply info, pinned |

Every row has a `type` field (`profile` or `post`).

### How to use

1. Add usernames (`NASA`, `@elonmusk`), profile links (`x.com/NASA`, `twitter.com/NASA`), numeric user ids
   (`id:11348282`, `x.com/i/user/11348282`) or post links (`x.com/jack/status/20`) under **Accounts and post links**.
   Paste a whole list of handles or ids at once, one per line.
2. Choose how many newest posts per account, and whether to include replies to other people.
3. Press **Start**. Download the results as JSON, CSV or Excel, or send them to a webhook or Google Sheets.

#### Example input

```json
{
  "startUrls": ["NASA", "https://x.com/jack/status/20"],
  "postsPerProfile": 50,
  "postsNewerThan": "2026-11-01"
}
```

#### Example post row

```json
{
  "type": "post",
  "url": "https://x.com/paulg/status/2124617209347539084",
  "text": "A couple hours after the new puppy arrived, it was as if they'd known each other for years.",
  "createdAt": "2026-11-22T21:33:10Z",
  "author": { "username": "paulg", "name": "Paul Graham", "followers": 5392963, "isBlueVerified": true },
  "likes": 681,
  "reposts": 7,
  "replies": 51,
  "quotes": 2,
  "bookmarks": 12,
  "views": 42474,
  "media": [{ "type": "photo", "url": "https://pbs.twimg.com/media/HXwoDltW4AAX6Ub.jpg" }],
  "isRepost": false,
  "isQuote": false,
  "isPinned": false
}
```

### Pricing

Pay only for rows you get:

| Event | Price per 1,000 |
|---|---|
| Profile | $0.40 |
| Post | $0.20 |

Plus $0.005 per run. Higher Apify plans get the usual discount.

### Monitoring

Turn on **Only new posts** and schedule the Actor (for example every hour): each run returns only posts that earlier
runs did not deliver, while profiles come back every run so you can track followers over time. Use one task per list
of accounts and give each a **Monitor name**.

### Good to know

- Only public data is read. Protected accounts return their profile row only.
- Posts come newest first. For very active accounts a run returns their most recent text posts and their photo and
  video posts going further back; schedule hourly runs with **Only new posts** to catch every post as it appears.
- Search, followers and replies under other people's posts are not part of this Actor.
- Photo and video links can expire; download the files if you need to keep them.

### FAQ

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

**Can I follow a list of accounts?** Yes: add them all, turn on only-new and schedule the run. Each run bills only
the new posts plus the profiles.

**Can I get one post?** Yes: paste its link. Any public post works, from any account.

# Actor input Schema

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

X (Twitter) usernames (NASA or @NASA), profile links (x.com/NASA or twitter.com/NASA), numeric user ids (id:11348282 or x.com/i/user/11348282) or post links (x.com/NASA/status/...). Accounts return the profile and its newest posts; post links return that post.

## `postsPerProfile` (type: `integer`):

How many of each account's newest posts to return, newest first. 0 returns the profile only. Reposts are included; post text, counts, media and links come with every post.

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

Also return the account's replies to other people. Replies in the account's own threads are always kept.

## `postsNewerThan` (type: `string`):

Only posts from this date on (for example 2026-11-01). Leave empty for no date limit.

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

Most rows per run: profiles and posts together.

## `onlyNew` (type: `boolean`):

Schedule the Actor and each run returns only posts earlier runs did not deliver. Profiles are returned every run, so follower counts can be tracked over time.

## `monitorName` (type: `string`):

Optional name for the "only new" history, so several monitors can run side by side.

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

Apify proxy on by default. Leave it as is unless you want to use your own proxy.

## `tenantId` (type: `string`):

Optional label used to keep separate histories for different clients or teams.

## `debug` (type: `boolean`):

Verbose logs.

## `delivery` (type: `object`):

Webhook: {"webhookUrl": "https://...", "format": "json" | "slack" | "discord", "onlyWhenResults": true, "includeItems": 10}. Google Sheets: {"spreadsheetId": "<id from the sheet URL>", "sheetName": "Sheet1"} plus the service account key below; share the sheet with the service account's e-mail first. Leave empty to only save results in the dataset.

## `googleServiceAccountJson` (type: `string`):

Only for Google Sheets delivery: paste the service account's JSON key. Stored encrypted; the account sees only sheets you share with it.

## Actor input object example

```json
{
  "startUrls": [
    "NASA",
    "elonmusk"
  ],
  "postsPerProfile": 20,
  "includeReplies": false,
  "maxItems": 500,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debug": false
}
```

# Actor output Schema

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

One row per profile or post; the type field says which.

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

Counts, warnings, and whether the run stopped early.

# 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 = {
    "startUrls": [
        "NASA",
        "elonmusk"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tacps126/twitter-profile-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 = {
    "startUrls": [
        "NASA",
        "elonmusk",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("tacps126/twitter-profile-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 '{
  "startUrls": [
    "NASA",
    "elonmusk"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call tacps126/twitter-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tacps126/twitter-profile-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/EYcSvCNY9GPRP1vJN/builds/6ZtowygLFsPO7zlEz/openapi.json
