# X (Twitter) Profile Scraper (`coregent/x-profile-scraper`) Actor

Bulk lookup of public X (Twitter) profiles by handle, URL or numeric ID. Get bio, website, location, followers, following, posts, verification, images and optional recent posts as clean JSON or CSV. No login, no cookies. Pay only for profiles saved.

- **URL**: https://apify.com/coregent/x-profile-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 profile results

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

## X (Twitter) Profile Scraper

![X (Twitter) Profile Scraper](https://raw.githubusercontent.com/coregentdevspace/x-profile-scraper-assets/main/thumbnail-x-profile-scraper.png)

Look up public **X (Twitter) profiles** in bulk by handle, profile URL or numeric user ID. Each account comes back as one clean, flat row: name, bio, website, location, followers, following, post count, verification, join date, profile and banner images, and pinned tweets. You can also add each profile's latest posts. Export to JSON, CSV, Excel or Google Sheets, or call it from the API, Make, Zapier, n8n or an AI agent.

- **No login, no cookies, no X account.** Public data only.
- **Three ways in:** handles (`nasa`, `@nasa`), profile URLs (`x.com/nasa`) and numeric user IDs (`11348282`), in any mix. Duplicates are looked up once.
- **Clean output.** Counts are numbers, dates are ISO (UTC), the website link is expanded and normalised, and the avatar is the full-size image. Values X doesn't provide stay empty; nothing is made up.
- **Optional recent posts.** Turn on **Include recent posts** to add each profile's latest posts with likes, retweets, replies and views.
- **Filters for lead lists:** minimum followers, verified accounts only, profiles with a website.
- **Pay only for profiles saved.** Accounts that aren't found, duplicates, filtered profiles and empty runs are free.

### What can you do with it?

| Use case | What to enter | Typical setup |
|---|---|---|
| **Influencer research** | A list of creator handles | Minimum followers, export the Metrics view |
| **Lead generation** | Handles or profile URLs from a list or a CRM | **Only profiles with a website**, export the Bio & links view |
| **Competitor and brand tracking** | Competitor handles | Weekly schedule, compare follower counts over time |
| **CRM and data enrichment** | Handles or user IDs already in your database | API call from your pipeline; IDs still work after an account renames itself |
| **Account audits** | A list of accounts to check | Find suspended or deleted accounts in `FAILED_TARGETS` |
| **AI agents and research** | One or a few handles | Call through the Apify API or MCP server and read the JSON |

### How to use it

1. Add **X handles**, **profile URLs**, **numeric user IDs**, or a mix.
2. Optionally turn on **Include recent posts**, or set filters.
3. Click **Start**, then download the results from the **Output** tab.

Run it with the defaults and it looks up `NASA`, `apify` and `SpaceX` and returns 3 profiles.

#### Accepted inputs

| You enter | Field | Looked up as |
|---|---|---|
| `NASA` or `@NASA` | X handles | handle `NASA` |
| `https://x.com/nasa`, `twitter.com/nasa/with_replies` | Profile URLs | handle `nasa` |
| `https://x.com/i/user/11348282` | Profile URLs | user ID `11348282` |
| `11348282` | Numeric user IDs | user ID `11348282` |

Tweet links, X pages such as `/explore`, and non-X links aren't profiles. They're skipped and listed in the run's status message.

#### Filters

Filters are checked after each profile is looked up, so they don't make a run faster. Profiles a filter drops are never charged.

| Filter | Keeps |
|---|---|
| Minimum followers | Profiles with at least this many followers |
| Verified accounts only | Accounts with any verification badge (blue, gold business, grey government) |
| Only profiles with a website | Profiles that list a website |

**Skip these profiles** takes handles, URLs or IDs you already have, for example from an earlier run. Handle and ID entries are skipped before any lookup, and skipped profiles are never charged.

### Monitor X profiles on a schedule

Follower counts, bios and websites change. Run the same list every day or week and you get a time series: follower growth for influencers and competitors, rebrands, new links in bio, accounts that went private or were suspended.

1. Enter the accounts you want to track. Numeric user IDs are the safest choice for long-running tracking, because an ID keeps working after the account changes its handle.
2. Optionally turn on **Include recent posts** to see what each account posted since the last check.
3. Click **Save as a new task**, then open the task's **Schedules** and pick daily, weekly or a cron expression.
4. Send the results where your team works: the Actor's **Integrations** tab connects runs to Google Sheets, Slack, email, webhooks, Make, Zapier and n8n. Every row has `collectedAt`, so appending each run to one sheet gives you a history you can chart.

Each run is a fresh snapshot, so each profile is charged once per run. Accounts that disappear (renamed, suspended, deleted) show up in that run's `FAILED_TARGETS` and aren't charged.

Tip: set a maximum cost per run in the run options, so a list that grows over time can't turn into a surprise bill.

### Input examples

**Three profiles** (the default run):

```json
{
    "handles": ["NASA", "apify", "SpaceX"],
    "maxResults": 100
}
```

**Mixed inputs with the 5 latest posts each:**

```json
{
    "handles": ["NASA"],
    "profileUrls": ["https://x.com/apify"],
    "userIds": ["34743251"],
    "includeRecentPosts": true,
    "recentPostsCount": 5
}
```

**Twenty well-known accounts from all three fields, with recent posts** (the input behind the screenshots below; `11348282` is NASA's ID, so it's looked up once and the run saves 19 profiles):

```json
{
    "handles": ["NASA", "SpaceX", "apify", "github", "stripe", "vercel", "OpenAI", "nytimes", "BBCWorld", "NatGeo"],
    "profileUrls": [
        "https://x.com/Google",
        "https://x.com/Microsoft",
        "https://x.com/Spotify",
        "https://x.com/Netflix",
        "https://x.com/NBA",
        "https://x.com/Airbnb"
    ],
    "userIds": ["783214", "6253282", "11348282", "50393960"],
    "maxResults": 25,
    "includeRecentPosts": true,
    "recentPostsCount": 3
}
```

**Weekly competitor tracking** (save as a task and schedule it; IDs keep working after a rename):

```json
{
    "handles": ["stripe", "vercel", "supabase", "linear"],
    "userIds": ["34743251"],
    "includeRecentPosts": true,
    "recentPostsCount": 5
}
```

**A lead list: verified accounts with a website and at least 10,000 followers:**

```json
{
    "handles": ["stripe", "vercel", "supabase", "linear", "notionhq"],
    "minFollowers": 10000,
    "verifiedOnly": true,
    "requireWebsite": true
}
```

### Output

One row per unique account.

| Field | Description |
|---|---|
| `recordType` | Always `profile_result` |
| `id` | Numeric X user ID (as text) |
| `handle`, `name`, `url` | Username, display name and profile link |
| `bio` | Profile bio as written (links in it stay as X's short t.co links) |
| `website`, `websiteDomain` | The profile's website, normalised, and its domain |
| `location` | Location as written on the profile |
| `followersCount`, `followingCount`, `postsCount`, `mediaCount` | Public counts: followers, following, posts and media posts |
| `isBlueVerified`, `verificationType` | Verification: blue check, and the badge type (`Business` or `Government`, empty for none) |
| `isProtected` | Protected (private) account |
| `accountCreatedAt` | When the account was created (ISO, UTC) |
| `profileImageUrl`, `bannerImageUrl` | Full-size avatar and banner image |
| `pinnedTweetIds` | IDs of pinned tweets |
| `accountStatus` | `active` for a found account |
| `recentPosts`, `recentPostsReturned` | Latest posts (`tweetId`, `url`, `text`, `createdAt`, `likeCount`, `retweetCount`, `replyCount`, `viewCount`, `isRetweet`, `isReply`) and how many were added. Empty unless **Include recent posts** is on |
| `dataStatus` | `complete`, or `partial` when recent posts were requested but couldn't be fetched (e.g. a protected account) |
| `sourceInput`, `sourceField`, `provider` | Which entry found the profile, from which input field |
| `collectedAt` | When the row was collected |
| `rawProviderData` | Only with **Include raw provider data** (debugging) |

The **Output** tab has four views: **Overview**, **Metrics**, **Bio & links** and **Recent posts**. They show the same rows with different columns. The screenshots and samples below come from a real run of the 20-account input above.

#### Overview

![Overview view](https://raw.githubusercontent.com/coregentdevspace/x-profile-scraper-assets/main/x-profile-scraper-output-overview-table-view.png)

```json
{
    "profileImageUrl": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
    "handle": "NASA",
    "name": "NASA",
    "url": "https://x.com/NASA",
    "followersCount": 92207025,
    "followingCount": 115,
    "postsCount": 74566,
    "isBlueVerified": true,
    "verificationType": "Government",
    "location": "Pale Blue Dot",
    "website": "http://www.nasa.gov",
    "accountCreatedAt": "2007-12-19T20:20:32.000Z",
    "sourceInput": "NASA"
}
```

#### Metrics

![Metrics view](https://raw.githubusercontent.com/coregentdevspace/x-profile-scraper-assets/main/x-profile-scraper-output-metrics-table-view.png)

```json
{
    "handle": "SpaceX",
    "followersCount": 41953932,
    "followingCount": 128,
    "postsCount": 11997,
    "mediaCount": 4807,
    "isBlueVerified": true,
    "verificationType": "Business",
    "isProtected": false,
    "accountCreatedAt": "2009-04-23T21:53:30.000Z",
    "collectedAt": "2026-11-20T09:32:24.341Z"
}
```

#### Bio & links

![Bio & links view](https://raw.githubusercontent.com/coregentdevspace/x-profile-scraper-assets/main/x-profile-scraper-output-bio-n-links-table-view.png)

```json
{
    "handle": "stripe",
    "name": "Stripe",
    "bio": "Building programmable financial services. \n\nIncorporate: @atlas. \nHelp: @stripesupport. \nRead: @stripepress @WorksInProgMag. \nStatus: @stripestatus.",
    "website": "http://stripe.com",
    "websiteDomain": "stripe.com",
    "location": "San Francisco, US + Dublin, IE",
    "bannerImageUrl": "https://pbs.twimg.com/profile_banners/102812444/1778013071",
    "pinnedTweetIds": ["2123454070203597201"],
    "id": "102812444"
}
```

#### Recent posts

![Recent posts view](https://raw.githubusercontent.com/coregentdevspace/x-profile-scraper-assets/main/x-profile-scraper-output-recent-posts-table-view.png)

One of the three posts shown:

```json
{
    "handle": "apify",
    "followersCount": 23974,
    "recentPostsReturned": 3,
    "recentPosts": [
        {
            "tweetId": "2123435790193524770",
            "url": "https://x.com/apify/status/2123435790193524770",
            "text": "Moon boys vs. bubble callers 🐂🐻\n14,447 posts tracked on the Anthropic IPO. The extreme takes: 1.7 bearish for every bullish one ↓ https://t.co/p0A6hbttVO",
            "createdAt": "2026-11-19T15:18:38.000Z",
            "likeCount": 10,
            "retweetCount": 2,
            "replyCount": 1,
            "viewCount": 704,
            "isRetweet": false,
            "isReply": false
        }
    ],
    "dataStatus": "complete"
}
```

Every row has all the fields in the table above. Values a profile doesn't have stay empty: in this run 2 of 19 accounts list no website, 5 no location, and 9 have no pinned post.

Two key-value store records come with every run:

- `RUN_SUMMARY`: inputs, invalid entries, lookups, profiles saved, duplicates, filtered profiles, failures by reason, recent posts added, events charged and why the run stopped.
- `FAILED_TARGETS`: each entry that couldn't be returned and why (`not_found`, `suspended`, `unavailable`, `not_found_or_unavailable`, `rate_limited`, `provider_unavailable`). Failed lookups never go in the dataset, so it holds only real profiles.

### Pricing

This Actor uses **pay-per-event** pricing:

- `profile-result`: one per unique profile saved to the dataset.
- `recent-posts`: one per saved profile whose recent posts were added. Only when you turn on **Include recent posts**, and only when the posts were actually added.

Nothing else is charged: accounts that aren't found or are suspended, duplicates, profiles dropped by your filters or skip list, the run summary, and runs that save nothing.

The prices are on the Actor's **Pricing** tab in the Apify Console, and they can differ by Apify plan. This README deliberately doesn't quote figures, so it never goes out of date. Set a **maximum cost per run** in the run options and the Actor stops before it would exceed it.

### Limits and good to know

- **Public data only.** Protected accounts return their public profile, but not their posts. DMs, private lists and anything that needs a login aren't available.
- **Counts are a snapshot** taken when the run happened.
- **Up to 1,000 profiles per run.** For larger lists, split them across runs or schedule a task.
- **Timeouts.** If a run gets close to its timeout, it stops by itself, keeps every profile already saved and says so in the status message.
- **Need tweets, not profiles?** For search and full profile timelines, use our [X (Twitter) Tweet Scraper](https://apify.com/coregent/x-tweet-scraper).

### FAQ

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

**Is scraping X legal?** This Actor collects publicly available profile data only. It isn't affiliated with X Corp. You're responsible for how you use the data: follow X's terms and data-protection laws such as GDPR, and don't collect personal data without a lawful reason.

**Why was an account not returned?** It doesn't exist, was renamed or suspended, or was temporarily unavailable. Look it up in `FAILED_TARGETS`. Renamed accounts are still found by their numeric ID.

**Can I track follower growth over time?** Yes. Save your list as a task, schedule it daily or weekly, and send each run to Google Sheets or your database. Each row's `followersCount` and `collectedAt` give you the history. See [Monitor X profiles on a schedule](#monitor-x-profiles-on-a-schedule).

**Can I get followers or following lists?** Not in this Actor. It returns each profile's counts, not the lists.

**Can I use it from code or an AI agent?** Yes. Call it through the Apify API, the Apify client libraries or the Apify MCP server, and read the dataset as JSON.

### Feedback

Found a problem or need a field that's missing? Open an issue on the Actor's **Issues** tab and include the run link.

# Actor input Schema

## `handles` (type: `array`):

X (Twitter) usernames, one per entry, with or without the @ (e.g. <code>NASA</code>, <code>@apify</code>). Each returns one profile row.

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

X or Twitter profile links (e.g. <code>https://x.com/nasa</code>, <code>twitter.com/apify/with_replies</code>, <code>https://x.com/i/user/11348282</code>). Tweet links are not profiles and are skipped.

## `userIds` (type: `array`):

X numeric account IDs (e.g. <code>11348282</code>). An ID still finds the account after it changes its handle.

## `maxResults` (type: `integer`):

Stops the run after this many profiles are saved. Remaining entries aren't looked up.

## `includeRecentPosts` (type: `boolean`):

Adds each profile's latest posts (text, date, likes, retweets, replies, views) to its row. One extra lookup per profile, billed as a separate <code>recent-posts</code> event only when the posts were added.

## `recentPostsCount` (type: `integer`):

How many of the latest posts to add per profile, when Include recent posts is on.

## `minFollowers` (type: `integer`):

Keep only profiles with at least this many followers. 0 = no minimum.

## `verifiedOnly` (type: `boolean`):

Keep only accounts with a verification badge (blue, gold business or grey government).

## `requireWebsite` (type: `boolean`):

Keep only profiles that list a website. Useful for lead lists.

## `skipProfiles` (type: `array`):

Handles, profile URLs or numeric IDs you already have (e.g. from an earlier run). Matching entries are skipped and never charged; handle and ID entries are skipped before any lookup.

## `maxConcurrency` (type: `integer`):

How many profiles are looked up at the same time.

## `includeRawProviderData` (type: `boolean`):

Adds the unprocessed provider response to each row as <code>rawProviderData</code>, for debugging. Makes rows much larger.

## Actor input object example

```json
{
  "handles": [
    "NASA",
    "apify",
    "SpaceX"
  ],
  "maxResults": 100,
  "includeRecentPosts": false,
  "recentPostsCount": 5,
  "minFollowers": 0,
  "verifiedOnly": false,
  "requireWebsite": false,
  "maxConcurrency": 3,
  "includeRawProviderData": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

## `failedTargets` (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 = {
    "handles": [
        "NASA",
        "apify",
        "SpaceX"
    ],
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/x-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 = {
    "handles": [
        "NASA",
        "apify",
        "SpaceX",
    ],
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/x-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 '{
  "handles": [
    "NASA",
    "apify",
    "SpaceX"
  ],
  "maxResults": 100
}' |
apify call coregent/x-profile-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coregent/x-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/JWzu6utHMbh6G2ye6/builds/PFduhuLUg8ECQgFdo/openapi.json
