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

Scrape public Twitter / X profile data from profile URLs or usernames. Extracts bio, follower counts, verification, avatar, banner, and related profile fields without requiring a logged-in account.

- **URL**: https://apify.com/scraptivo/twitter-x-profile-scraper.md
- **Developed by:** [Scraptivo](https://apify.com/scraptivo) (community)
- **Categories:** Social media, Integrations, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 tweet scrapeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

**Twitter X Profile Scraper** collects public Twitter / X profile data — bio, follower and following counts, verification badges, avatar and banner images, and recent tweets — from profile URLs or usernames. It requires no login or API key and turns each profile into structured data for influencer tracking, market research, and competitive intelligence, exportable to JSON, CSV, or Excel. Pricing starts at $2 per 1,000 profiles.

### What can you automate with Twitter X Profile Scraper?

- **Build influencer databases** — export follower counts, verification status, and profile details for thousands of accounts at once.
- **Track brand and competitor profiles** — monitor bio changes, follower growth, and recent tweets over time.
- **Enrich CRM and lead lists** — resolve usernames or URLs to structured profile data with website, location, and verification details.
- **Power social analytics** — feed profile and tweet engagement data into dashboards or reporting pipelines.
- **Monitor public figures** — follow government, business, and celebrity account activity programmatically.

### Who is this scraper for?

| Team | Workflow |
|---|---|
| Influencer & sponsorship teams | Screen creators by followers, verification, and recent content. |
| Market researchers | Analyze audience growth and engagement across industries. |
| PR & comms teams | Monitor brand, competitor, and public-figure accounts. |
| Sales & lead-gen teams | Enrich prospect lists with profile, website, and location data. |

### What data can you collect from Twitter / X?

| Data group | Example fields | How it helps |
|---|---|---|
| Identity | `username`, `name`, `id`, `url`, `description` | Identify each account and its bio. |
| Reach & activity | `followersCount`, `followingCount`, `tweetsCount`, `mediaTweetsCount`, `favouritesCount` | Measure audience and output. |
| Verification & status | `isBlueVerified`, `verified`, `verifiedType`, `isIdentityVerified`, `protected`, `possiblySensitive` | Assess account authority and visibility. |
| Profile & location | `location`, `website`, `websiteExpanded`, `profileImageUrl`, `profileBannerUrl`, `createdAt` | Enrich records with contact and origin data. |
| Recent tweets | `tweets[]` with `text`, `createdAt`, `replyCount`, `retweetCount`, `likeCount`, `quoteCount`, `viewCount`, `media[]`, `hashtags[]` | Understand recent activity and engagement. |

### How to use Twitter X Profile Scraper

1. Open the actor in your Apify console.
2. Paste one or more profile URLs or bare usernames.
3. Choose whether to include recent tweets and set the per-profile tweet limit.
4. Run the actor.
5. Export the dataset to JSON, CSV, or Excel, or read it through the API.

```json
{
  "profileUrls": ["https://x.com/NASA", "https://x.com/OpenAI"],
  "usernames": [],
  "includeTweets": true,
  "maxTweets": 20,
  "maxConcurrency": 10,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

### Example workflow

#### Enrich an influencer shortlist weekly

1. Run your list of profile URLs every Monday.
2. Keep accounts matching your minimum follower count and verification status.
3. Attach their recent tweets to gauge content style and engagement.
4. Deduplicate using the stable numeric `id` field.

### Automate and integrate your results

Schedule runs from the Scheduler tab — daily for key competitors and influencers, weekly for larger batches. Attach a webhook to trigger a downstream pipeline on completion, and export to Google Sheets, Make, Zapier, Slack, or a CRM. For recurring pipelines, call the actor through the Apify API:

```shell
curl -X POST "https://api.apify.com/v2/acts/scraptivo/twitter-x-profile-scraper/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profileUrls": ["https://x.com/NASA"], "includeTweets": true}'
```

Within a run the actor deduplicates input seeds; across runs, deduplicate on the `id` field.

### Input reference

| Field | Type | Required | Default | What it controls |
|---|---:|---|---|
| `profileUrls` | array | No | — | Full profile URLs or bare @usernames to scrape. |
| `usernames` | array | No | — | Screen names without a full URL. |
| `includeTweets` | boolean | No | `true` | Also scrape recent tweets from each timeline. |
| `maxTweets` | integer | No | `20` | Recent tweets per profile (0 = none). |
| `maxConcurrency` | integer | No | `10` | Profiles scraped in parallel (1–50). |
| `maxItems` | integer | No | `0` | Maximum profiles to scrape (0 = unlimited). |
| `proxyConfiguration` | object | No | residential | Proxy settings for anti-bot protection. |

#### Should I use `profileUrls` or `usernames`?

Either works. Use `profileUrls` for full URLs and `usernames` for plain handles; the actor accepts both and deduplicates overlapping inputs.

### Output example

```json
{
  "id": "11348282",
  "url": "https://x.com/NASA",
  "username": "NASA",
  "name": "NASA",
  "description": "Making the seemingly impossible, possible.",
  "location": "Pale Blue Dot",
  "websiteExpanded": "http://www.nasa.gov/",
  "followersCount": 92251042,
  "followingCount": 119,
  "tweetsCount": 74301,
  "isBlueVerified": true,
  "verifiedType": "Government",
  "protected": false,
  "createdAt": "Wed Dec 19 20:20:32 +0000 2007"
}
```

### How much does it cost to scrape Twitter / X?

The actor bills per profile: **$2 per 1,000 profiles**, with Apify plan discounts applied automatically — Bronze $1.90, Silver $1.80, and Gold $1.70 per 1,000. Each profile is one billable result, and tweets attached to a profile incur no additional charge. A run of 1,000 profiles costs $2; 10,000 profiles cost $20 before discounts. Use `maxItems` to cap output. Compute and residential proxy usage are billed separately by Apify and offset by your plan's free monthly units.

### Reliability and responsible use

The actor uses anonymous guest access (no login or token) with residential proxies by default, and fails soft — a skipped or erroring profile does not stop the run. It scrapes only publicly visible profiles; protected accounts are skipped. You are responsible for complying with X's terms and applicable laws when storing or using the data.

### Frequently asked questions

#### Can I scrape private or protected accounts?

No. The actor only reads publicly accessible profile data. Protected accounts are skipped without stopping the run.

#### Do I need a Twitter / X account or API key?

No. It uses X's anonymous guest API — no login, token, or developer account required.

#### Are tweets charged separately from profiles?

No. Pricing is per profile; attached tweets are optional enrichment at no extra cost.

#### Why am I getting empty results?

Check that the URLs or usernames are valid, and keep residential proxies enabled — X can block requests from datacenter IPs.

#### How many profiles can I scrape in one run?

There is no built-in limit. Set `maxItems` to cap the count, and split very large batches (10,000+) across runs to avoid rate limiting.

### Related Scraptivo automations

- **[Instagram Post Scraper](https://apify.com/scraptivo/instagram-post-scraper)** — collect Instagram posts and engagement data.
- **[TikTok Creator Analytics](https://apify.com/scraptivo/tiktok-creator-analytics)** — pull TikTok creator stats and content metrics.
- **[Instagram Engagement Tool](https://apify.com/scraptivo/instagram-engagement-tool)** — measure engagement across Instagram accounts.

### Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, a sample profile URL, required fields, and expected volume so we can assess the request.

# Actor input Schema

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

Twitter / X profile URLs to scrape (e.g. https://x.com/elonmusk or https://twitter.com/NASA). Bare @usernames are also accepted.

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

Optional screen names / handles without a full URL (e.g. elonmusk or @NASA).

## `includeTweets` (type: `boolean`):

If true, also scrape recent tweets from each profile timeline (anonymous guest access — no login).

## `maxTweets` (type: `integer`):

Maximum number of recent tweets to attach to each profile (0 = no tweets).

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

How many profiles to scrape in parallel. Higher is faster; keep moderate with residential proxies.

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

Maximum number of profiles to scrape (0 = unlimited)

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

Proxy settings for anti-bot protection. Residential proxies are recommended.

## Actor input object example

```json
{
  "profileUrls": [
    "https://x.com/elonmusk",
    "https://x.com/NASA"
  ],
  "includeTweets": true,
  "maxTweets": 20,
  "maxConcurrency": 10,
  "maxItems": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing scraped profile records

## `runStats` (type: `string`):

Aggregate scrape statistics for this run

# 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": [
        "https://x.com/elonmusk",
        "https://x.com/NASA"
    ],
    "includeTweets": false,
    "maxTweets": 20,
    "maxItems": 1,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraptivo/twitter-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 = {
    "profileUrls": [
        "https://x.com/elonmusk",
        "https://x.com/NASA",
    ],
    "includeTweets": False,
    "maxTweets": 20,
    "maxItems": 1,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scraptivo/twitter-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 '{
  "profileUrls": [
    "https://x.com/elonmusk",
    "https://x.com/NASA"
  ],
  "includeTweets": false,
  "maxTweets": 20,
  "maxItems": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scraptivo/twitter-x-profile-scraper --silent --output-dataset

```

## MCP server setup

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