# Twitter (X.com) Users Scraper (`web.harvester/twitter-users-scraper`) Actor

Effortlessly search for users and extract profile information, or scrape data by simply providing a URL or username. Download in multiple formats, including JSON and Excel, ensuring seamless integration with reports, databases, and various applications for enhanced data analysis and management.

- **URL**: https://apify.com/web.harvester/twitter-users-scraper.md
- **Developed by:** [Web Harvester](https://apify.com/web.harvester) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 577 total users, 2 monthly users, 100.0% runs succeeded, 17 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$20.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#rental-actors

## 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 Users Scraper Pro: Search and Extract Complete X (Twitter) User Profiles Data

### 🔍 Comprehensive Twitter User Data Extraction Tool

Effortlessly search for and extract detailed Twitter user data with our advanced Twitter Users Scraper. Simply provide a username, handle, or profile URL to access comprehensive user information. Download your data in multiple formats including JSON, CSV, Excel, XML, and more - perfect for social media analysis, research projects, lead generation, and database integration.

### ✅ Key Features

- **Complete User Profiles**: Extract usernames, full names, bio descriptions, locations, follower counts, following counts, and more
- **Search User Profiles**: Find and extract user profiles based on keywords, hashtags, or specific search criteria
- **Verified Status Detection**: Automatically identifies verified accounts
- **Multiple Input Methods**: Search by username, handle, or direct URL
- **Batch Processing**: Extract data from multiple profiles simultaneously
- **Flexible Export Options**: Download in JSON, CSV, Excel, XML, RSS, or HTML Table formats
- **User-friendly Interface**: Simple setup with no coding required

### 📊 Twitter User Data Output Fields

Our scraper captures all essential profile information, making it perfect for social media analysis and research. The output is stored in your dataset and available for download in multiple formats after completion.

### 🔧 Input Configuration Example

Here's an input example in JSON:

```json
{
    "userQueries": ["elonmusk"],
    "startUrls": ["https://x.com/apify"],
    "handles": ["Apify"]
}
```

You can use any of these input methods:

- `userQueries`: Search for users by keywords
- `startUrls`: Direct Twitter profile URLs
- `handles`: Twitter handles (with or without @ symbol)

### 📋 Output Example

```json
{
    "avatar": "https://pbs.twimg.com/profile_images/1354484488697425920/aQ5dSaTK.jpg",
    "username": "@apify",
    "userId": "3510729917",
    "userFullName": "Apify",
    "description": "Your beloved cloud platform for web scraping and browser automation. Apify turns websites into APIs.",
    "location": "The Interweb",
    "website": "apify.com",
    "joinDate": "2015-09-01T05:38:00.000Z",
    "verified": false,
    "totalLikes": 423,
    "totalTweets": 1132,
    "totalFollowing": 182,
    "totalFollowers": 1756,
    "url": "https://x.com/apify",
    "searchQuery": "Apify"
}
```

### 🚀 Why Choose Our Twitter Users Scraper

- **No API Limitations**: Access Twitter data without API restrictions
- **No Authentication Required**: Use without Twitter credentials
- **Real-time Data**: Always get the most current profile information
- **Cloud-based Solution**: No need to install software locally
- **Regular Updates**: Tool is maintained to adapt to Twitter's changes

### 🔍 Complete Twitter Scraping Toolkit

Enhance your Twitter data collection capabilities with our complete suite of specialized X (Twitter) scrapers:

<table>
    <tr>
        <td>🐦 <a href="https://apify.com/web.harvester/twitter-scraper" title="Scrape tweets and profiles from Twitter">Twitter Tweets and Profiles Scraper</a>
            <p>Extract tweets, threads, and complete profiles from any account. Perfect for content analysis, sentiment analysis, and tracking social media engagement metrics.</p>
        </td>
        <td>🔍 <a href="https://apify.com/web.harvester/easy-twitter-search-scraper" title="Easily scrape search results from Twitter">Twitter Search Results Scraper</a>
            <p>Harvest tweets from Twitter search results with advanced filtering options. Ideal for market research, competitor analysis, and trend monitoring.</p>
        </td>
    </tr>
    <tr>
        <td>👥 <a href="https://apify.com/web.harvester/twitter-users-scraper" title="Scrape user data from Twitter">Twitter Users Scraper</a>
            <p>Extract complete user profiles with detailed metrics and biographical information. Perfect for influencer research, audience analysis, and lead generation.</p>
        </td>
        <td>🆔 <a href="https://apify.com/web.harvester/twitter-users-ids-scraper" title="Scrape user IDs from Twitter">Twitter Users IDs Scraper</a>
            <p>Quickly extract numerical Twitter IDs from any profile. Essential for API integration, user tracking, and database management.</p>
        </td>
    </tr>
</table>

# Actor input Schema

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

No description

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

No description

## `userQueries` (type: `array`):

A list of search queries for Twitter users. The scraper will scrape the tweets of the users returned by the search query.

## `profilesDesired` (type: `integer`):

This value lets you set the maximum number of profiles to retrieve per search query (for "Users search queries")

## `proxyConfig` (type: `object`):

No description

## Actor input object example

```json
{
  "startUrls": [],
  "handles": [
    "elonmusk"
  ],
  "userQueries": [],
  "profilesDesired": 10,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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": [
        "elonmusk"
    ],
    "userQueries": [],
    "profilesDesired": 10,
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("web.harvester/twitter-users-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": ["elonmusk"],
    "userQueries": [],
    "profilesDesired": 10,
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("web.harvester/twitter-users-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": [
    "elonmusk"
  ],
  "userQueries": [],
  "profilesDesired": 10,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call web.harvester/twitter-users-scraper --silent --output-dataset

```

## MCP server setup

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