# X (Twitter) Profile Info Scraper (`datamagnet/x-twitter-profile-info-scraper`) Actor

Get public profile information for one or more X/Twitter usernames in plain language.

- **URL**: https://apify.com/datamagnet/x-twitter-profile-info-scraper.md
- **Developed by:** [Datamagnet](https://apify.com/datamagnet) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Twitter Profile Scraper

Get public X/Twitter profile details for one or more usernames in a clean, ready-to-use format. This actor is built for marketers, recruiters, researchers, and growth teams who need fast X/Twitter profile lookup without manual copying and pasting. Use it to collect public profile data, compare accounts, and batch process multiple usernames in one run. You get the raw profile information exactly as returned, so you can review or reuse it in your own workflows.

### Key Features
- Extract public profile details for any X/Twitter username you provide.
- Collect data for one account or many accounts in a single run.
- Preserve the original profile fields exactly as returned for reliable downstream use.
- Capture important profile signals such as name, bio, follower count, verification status, and account age.
- Export results in a format that is easy to sort, filter, and analyze.
- Support username-based lookups and optional user ID-based lookups when available.
- Save time by replacing manual profile checks with automated collection.

### Use Cases

#### Market Research
Market researchers use this actor to quickly review public profile details for creators, brands, and competitors on X/Twitter. Fields like `name`, `desc`, `sub_count`, `friends`, and `statuses_count` help teams understand audience size, positioning, and posting activity. This makes it easier to compare accounts and identify which profiles are growing, active, or influential.

#### Influencer Discovery
Influencer and partnership teams can use the actor to evaluate potential collaborators before outreach. The returned profile data shows the account’s public identity, verification status, follower count, and profile description, which helps teams decide whether an account fits a campaign. It is especially useful when screening many usernames at once.

#### Lead Qualification
Sales and business development teams often need a quick way to verify whether a public X/Twitter account looks legitimate and relevant. With fields such as `name`, `profile`, `rest_id`, `blue_verified`, `location`, and `desc`, they can confirm identity and gather context before reaching out. This reduces wasted time on low-quality leads and helps prioritize the right contacts.

#### Brand Monitoring
Brand and communications teams can use this actor to keep an eye on public profiles that mention or represent their company. The profile fields help them spot changes in account identity, verification status, bio text, or follower growth over time. That makes it easier to track public-facing accounts and respond faster when something changes.

#### Competitive Analysis
Analysts can compare competitor profiles side by side using the returned public data. Details like `header_image`, `avatar`, `created_at`, `media_count`, and `pinned_tweet_ids_str` help teams understand how competitors present themselves and how active they are. This supports better decisions around positioning, content strategy, and audience targeting.

#### Account Verification Checks
Operations and trust teams can use the actor to review whether a public account appears verified and how it presents itself publicly. The output includes `blue_verified`, `verification_type`, and other visible profile attributes that help teams assess account credibility. This is useful for moderation, partner review, and internal checks.

### Input

| Field | Type | Required | Description | Example |
|---|---|---:|---|---|
| rest_id | string | No | The numeric user ID. If you know it, the actor can use it instead of the username. | 44196397 |
| screenname | string | Yes | Enter one or more X/Twitter usernames to look up. Use the username only, without the @ symbol. | elonmusk |

### Output

| Field | Type | Description |
|---|---|---|
| status | string | Shows the account’s current public status, such as whether it is active. |
| profile | string | The username that was looked up. |
| rest_id | string | The account’s numeric identifier, useful for matching records across systems. |
| blue_verified | boolean | Indicates whether the account shows a verification badge. |
| verification_type | string or null | Shows the type of verification if available, or nothing if not provided. |
| affiliates | object | Extra public label or affiliation details shown on the profile. |
| business_account | array | Public business-related labels or settings associated with the account, if any. |
| avatar | string | The profile picture URL. |
| header_image | string | The banner image URL shown at the top of the profile. |
| desc | string | The public bio or description written on the profile. |
| name | string | The display name shown on the account. |
| protected | boolean | Indicates whether the account is public or protected. |
| location | string | The public location listed on the profile, if any. |
| friends | number | The number of accounts the user follows. |
| sub_count | number | The number of followers the account has. |
| statuses_count | number | The total number of posts the account has made. |
| media_count | number | The number of media posts associated with the account. |
| pinned_tweet_ids_str | array | The IDs of pinned posts shown on the profile. |
| created_at | string | The date and time the account was created. |
| id | string | The internal account identifier returned with the profile data. |

### Sample Output

```json
{
  "status": "active",
  "profile": "elonmusk",
  "rest_id": "44196397",
  "blue_verified": true,
  "verification_type": null,
  "affiliates": {
    "label": {
      "badge": {
        "url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
      },
      "description": "X",
      "url": {
        "url": "https://twitter.com/X",
        "urlType": "DeepLink"
      },
      "userLabelDisplayType": "Badge",
      "userLabelType": "BusinessLabel"
    }
  },
  "business_account": [],
  "avatar": "https://pbs.twimg.com/profile_images/2053244804520427520/m8mdWZCG_normal.jpg",
  "header_image": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
  "desc": "Starmind",
  "name": "Elon Musk",
  "protected": false,
  "location": "",
  "friends": 1366,
  "sub_count": 240728657,
  "statuses_count": 105263,
  "media_count": 4589,
  "pinned_tweet_ids_str": [
    "2073311697474076672"
  ],
  "created_at": "Tue Jun 02 20:12:29 +0000 2009",
  "id": "44196397"
}
````

### How It Works

1. You enter one username or a list of usernames you want to check.
2. The actor looks up each public profile automatically.
3. It gathers the profile details exactly as they are returned.
4. If you provide multiple usernames, it processes them one by one in the same run.
5. Your results are then ready for review, download, or further analysis.

### Getting Started

Getting started is simple and does not require coding knowledge. Click **Try for free**, enter the X/Twitter usernames you want to look up, and click **Run**. The actor will collect the public profile details for each username and return the results in a format that is easy to work with. You can download the output as JSON, CSV, or Excel depending on how you want to review or share the data.

### Frequently Asked Questions

#### Do I need technical skills?

No. This actor is designed for business users who want quick profile lookup without manual work. Just enter the usernames, run the actor, and review the results.

#### How fast does it run?

It usually runs quickly for a small number of usernames, and batch runs are handled one profile at a time. The total time depends on how many usernames you enter and how quickly each profile can be retrieved.

#### What format is the output?

The results are available in formats that are easy to use for reporting and analysis, including JSON, CSV, and Excel. That makes it simple to open the data in spreadsheets or pass it into your own workflows.

#### Is this legal to use?

This actor is intended for public profile information only. You should always use the data in a way that respects applicable laws, platform rules, and your own internal policies.

#### Can I schedule it to run automatically?

Yes, you can set it up to run on a schedule if you want regular profile checks. This is useful for monitoring public accounts over time, tracking follower growth, or keeping an eye on profile changes.

# Actor input Schema

## `screenname` (type: `string`):

The public username to look up. You can enter one username or a list of usernames.

## Actor input object example

```json
{
  "screenname": "elonmusk"
}
```

# 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 = {
    "screenname": "elonmusk"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datamagnet/x-twitter-profile-info-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 = { "screenname": "elonmusk" }

# Run the Actor and wait for it to finish
run = client.actor("datamagnet/x-twitter-profile-info-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 '{
  "screenname": "elonmusk"
}' |
apify call datamagnet/x-twitter-profile-info-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "X (Twitter) Profile Info Scraper",
        "description": "Get public profile information for one or more X/Twitter usernames in plain language.",
        "version": "0.0",
        "x-build-id": "pxbIlLDTzftIaCxMg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datamagnet~x-twitter-profile-info-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datamagnet-x-twitter-profile-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datamagnet~x-twitter-profile-info-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datamagnet-x-twitter-profile-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datamagnet~x-twitter-profile-info-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datamagnet-x-twitter-profile-info-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "screenname"
                ],
                "properties": {
                    "screenname": {
                        "title": "X/Twitter username",
                        "type": "string",
                        "description": "The public username to look up. You can enter one username or a list of usernames."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
