# Twitter/X Leads Scraper - Profile Email Finder (`oriented_wallpaper/twitter-leads-scraper`) Actor

Turn X/Twitter searches, hashtags, or handles into contactable author leads — collapse tweets to unique profiles, extract emails from bios + linked sites, follower/verified filters, 0-100 lead score, dedupe, and AI cold openers. Export CSV/JSON.

- **URL**: https://apify.com/oriented\_wallpaper/twitter-leads-scraper.md
- **Developed by:** [Flash Scrape](https://apify.com/oriented_wallpaper) (community)
- **Categories:** Lead generation, Social media, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 leads

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

## Twitter/X Leads Scraper - Profile Email Finder

**Turn X/Twitter into a contactable lead list.** Give it search terms, hashtags, or
@handles and get back **unique author profiles** — each with their **email** (from the bio
*and* the linked website), follower count, verified status, a 0–100 lead score, and an
optional AI cold-email opener. Export to CSV, JSON, or Excel.

Built for **B2B cold email, creator/founder outreach, agencies, and recruiting** — clean,
scored, contactable data, not just a raw tweet dump.

---

### Why this scraper

- 🧵 **Tweets → unique authors** — searches return tweets, but you want *people*. This
  actor collapses every matching tweet to **one row per author handle** (a two-pass
  roll-up), so you get profiles, not a noisy timeline.
- 📧 **Two-source email finding** — scans each author's **bio** for inline emails *and*
  visits their **bio-link website** (home / contact / about) to pull the real email + other
  socials.
- 🎯 **Quality filters** — min/max followers (target nano → macro tiers), verified-only,
  has-website, has-email. You only pay for leads you keep.
- 🧮 **0–100 lead score** — ranks by email + website + followers fit + verified +
  engagement (when available); best leads first.
- 🧹 **Auto-dedupe** — same handle / website / email collapses to one row.
- ✍️ **AI cold-opener (optional)** — a personalized one-line icebreaker per lead, written
  with **your own** OpenAI/Anthropic key.

---

### Use cases

- Build an outreach list of **founders / creators tweeting about your niche** (search a
  topic, get their emails).
- Turn a **hashtag** (e.g. `#buildinpublic`) into a list of contactable builders.
- Pull a competitor's or community's **handles** into emails + CSV for your CRM.

---

### Input

Provide at least one of `searchTerms`, `hashtags`, or `handles`.

```json
{
  "searchTerms": ["ai founder", "shopify agency"],
  "hashtags": ["buildinpublic"],
  "handles": ["naval"],
  "maxItems": 200,
  "minFollowers": 1000,
  "onlyWithEmail": true,
  "enrichEmails": true,
  "writeOpeners": false
}
````

| Field | What it does |
|---|---|
| **searchTerms** | Keywords / phrases to search X/Twitter for. |
| **hashtags** | Hashtags (with or without `#`); treated as extra search terms. |
| **handles** | Specific @handles or profile URLs to pull tweets from. |
| **maxItems** | How many tweets to scan before rolling up to unique authors. |
| **minFollowers / maxFollowers** | Target a follower band (0 = off). |
| **onlyVerified** | Keep only verified accounts. |
| **onlyWithWebsite / onlyWithEmail** | Keep only authors with a website / an email. |
| **enrichEmails** | Visit the bio-link site to find emails + socials (default on). |
| **writeOpeners** | Add an AI cold-opener per lead — needs your OpenAI/Anthropic key. |

***

### Output (one row per unique author, best leads first)

```json
{
  "lead_score": 90,
  "handle": "somefounder",
  "name": "Some Founder",
  "bio": "Building an AI tool for agencies. Ex-Google. hello@somestartup.com",
  "followers": 24800,
  "email": "hello@somestartup.com",
  "email_status": "found",
  "website": "https://somestartup.com",
  "verified": true,
  "icebreaker": "Your take on AI tooling for agencies really resonated…",
  "profile_url": "https://x.com/somefounder"
}
```

Results render as a **clean sortable table** on the Output tab, and export to CSV / JSON / Excel.

***

### How it works

1. Searches X/Twitter via [`apidojo/tweet-scraper`](https://apify.com/apidojo/tweet-scraper)
   for your terms / hashtags / handles.
2. **Collapses the returned tweets to unique author profiles** (dedupe by handle),
   averaging engagement across each author's tweets when that data is present.
3. Reads each bio for inline emails and visits the bio-link website for more.
4. Dedupes, applies your filters, and scores every lead 0–100.
5. *(Optional)* Writes a personalized cold-email opener per lead with your AI key.
6. Pushes a clean dataset → export CSV / JSON / Excel.

***

### FAQ

**Why authors instead of tweets?** Search results are tweets, but for outreach you want the
*person*. This actor rolls every matching tweet up to its author so you get a deduped list
of contactable profiles.

**Will every author have an email?** No. X exposes a public email for very few profiles;
the rest depend on what's in the bio or on the linked site. Use `onlyWithEmail` to keep
just the contactable ones.

**Do I need an API key?** Only for AI openers, and it's your key (used once per run, never stored).

**Is this legal?** It scrapes **public** profile data. Use it for legitimate outreach and
follow X's terms and anti-spam laws (CAN-SPAM / GDPR) in your messaging.

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords / phrases to search X/Twitter for. Tweets matching these are collapsed to their unique author profiles. e.g. 'ai founder', 'shopify agency'.

## `hashtags` (type: `array`):

Hashtags to search (with or without the #). Treated as additional search terms. e.g. 'buildinpublic', 'saas'.

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

Specific @handles / profile URLs to pull tweets from (one per line). e.g. 'naval' or 'https://x.com/naval'.

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

How many tweets to fetch before rolling them up to unique authors. More tweets = more unique authors discovered.

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

Keep only authors with at least this many followers (0 = no filter).

## `maxFollowers` (type: `integer`):

Keep only authors with at most this many followers (0 = no cap). Use with min to target nano/micro/macro tiers.

## `onlyVerified` (type: `boolean`):

Keep only verified profiles.

## `onlyWithWebsite` (type: `boolean`):

Drop authors with no bio link (you can't enrich an email without one).

## `onlyWithEmail` (type: `boolean`):

Drop authors where no email could be found. Best for cold-email campaigns.

## `enrichEmails` (type: `boolean`):

Visit each author's bio-link website (home + /contact + /about) to extract emails and social links. Higher email fill-rate. No key needed.

## `writeOpeners` (type: `boolean`):

Generate a personalized one-sentence outreach opener for each lead. Requires your OpenAI/Anthropic key below.

## `llmProvider` (type: `string`):

Which model writes the openers.

## `llmApiKey` (type: `string`):

Your own OpenAI or Anthropic API key. Used only to write the openers; never stored.

## `llmModel` (type: `string`):

Override the default model (gpt-4o-mini for OpenAI, claude-haiku-4-5-20251001 for Anthropic).

## Actor input object example

```json
{
  "searchTerms": [
    "growth marketer"
  ],
  "hashtags": [
    "saas"
  ],
  "handles": [
    "naval"
  ],
  "maxItems": 200,
  "minFollowers": 0,
  "maxFollowers": 0,
  "onlyVerified": false,
  "onlyWithWebsite": false,
  "onlyWithEmail": false,
  "enrichEmails": true,
  "writeOpeners": false,
  "llmProvider": "openai"
}
```

# 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 = {
    "searchTerms": [
        "ai founder",
        "saas indie hacker"
    ],
    "hashtags": [
        "buildinpublic"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("oriented_wallpaper/twitter-leads-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 = {
    "searchTerms": [
        "ai founder",
        "saas indie hacker",
    ],
    "hashtags": ["buildinpublic"],
}

# Run the Actor and wait for it to finish
run = client.actor("oriented_wallpaper/twitter-leads-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 '{
  "searchTerms": [
    "ai founder",
    "saas indie hacker"
  ],
  "hashtags": [
    "buildinpublic"
  ]
}' |
apify call oriented_wallpaper/twitter-leads-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Twitter/X Leads Scraper - Profile Email Finder",
        "description": "Turn X/Twitter searches, hashtags, or handles into contactable author leads — collapse tweets to unique profiles, extract emails from bios + linked sites, follower/verified filters, 0-100 lead score, dedupe, and AI cold openers. Export CSV/JSON.",
        "version": "0.1",
        "x-build-id": "jRlZpWe08GUiteOOr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/oriented_wallpaper~twitter-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-oriented_wallpaper-twitter-leads-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/oriented_wallpaper~twitter-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-oriented_wallpaper-twitter-leads-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/oriented_wallpaper~twitter-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-oriented_wallpaper-twitter-leads-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",
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "Keywords / phrases to search X/Twitter for. Tweets matching these are collapsed to their unique author profiles. e.g. 'ai founder', 'shopify agency'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "hashtags": {
                        "title": "Hashtags",
                        "type": "array",
                        "description": "Hashtags to search (with or without the #). Treated as additional search terms. e.g. 'buildinpublic', 'saas'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "handles": {
                        "title": "Handles",
                        "type": "array",
                        "description": "Specific @handles / profile URLs to pull tweets from (one per line). e.g. 'naval' or 'https://x.com/naval'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max tweets to scan",
                        "minimum": 1,
                        "type": "integer",
                        "description": "How many tweets to fetch before rolling them up to unique authors. More tweets = more unique authors discovered.",
                        "default": 200
                    },
                    "minFollowers": {
                        "title": "Minimum followers",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only authors with at least this many followers (0 = no filter).",
                        "default": 0
                    },
                    "maxFollowers": {
                        "title": "Maximum followers",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Keep only authors with at most this many followers (0 = no cap). Use with min to target nano/micro/macro tiers.",
                        "default": 0
                    },
                    "onlyVerified": {
                        "title": "Only verified accounts",
                        "type": "boolean",
                        "description": "Keep only verified profiles.",
                        "default": false
                    },
                    "onlyWithWebsite": {
                        "title": "Only authors with a website in bio",
                        "type": "boolean",
                        "description": "Drop authors with no bio link (you can't enrich an email without one).",
                        "default": false
                    },
                    "onlyWithEmail": {
                        "title": "Only authors with an email",
                        "type": "boolean",
                        "description": "Drop authors where no email could be found. Best for cold-email campaigns.",
                        "default": false
                    },
                    "enrichEmails": {
                        "title": "Find emails on the linked website",
                        "type": "boolean",
                        "description": "Visit each author's bio-link website (home + /contact + /about) to extract emails and social links. Higher email fill-rate. No key needed.",
                        "default": true
                    },
                    "writeOpeners": {
                        "title": "Write an AI cold-opener per lead",
                        "type": "boolean",
                        "description": "Generate a personalized one-sentence outreach opener for each lead. Requires your OpenAI/Anthropic key below.",
                        "default": false
                    },
                    "llmProvider": {
                        "title": "AI provider (for openers)",
                        "enum": [
                            "openai",
                            "anthropic"
                        ],
                        "type": "string",
                        "description": "Which model writes the openers.",
                        "default": "openai"
                    },
                    "llmApiKey": {
                        "title": "AI API key (for openers)",
                        "type": "string",
                        "description": "Your own OpenAI or Anthropic API key. Used only to write the openers; never stored."
                    },
                    "llmModel": {
                        "title": "AI model (optional)",
                        "type": "string",
                        "description": "Override the default model (gpt-4o-mini for OpenAI, claude-haiku-4-5-20251001 for Anthropic)."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
