# Twitter Phone Number Scraper - Multi-Region with Line Types (`code-beat/twitter-phone-number-scraper-advanced`) Actor

📱 Twitter Phone Number Scraper pulls public contact numbers across multiple search engines and regions. ✅ Line-type detection, carrier lookup and validation on every record. 🌍 Built for multi-country outreach & SMS campaigns.

- **URL**: https://apify.com/code-beat/twitter-phone-number-scraper-advanced.md
- **Developed by:** [Code Beat](https://apify.com/code-beat) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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 Phone Number Scraper 🔍

**Twitter Phone Number Scraper** helps marketers, recruiters, sales pros, and researchers find phone numbers from public Twitter profile and tweet data faster than manual checking. It supports Twitter data extraction, Twitter contact scraper workflows, and phone number extraction for Twitter lead generation, turning public profile extraction into a practical social media data extraction process at scale 📞

### 🌟 Key Features of Twitter Phone Number Scraper

| Feature | Benefit |
|---|---|
| ✅ **Targeted Keyword Search** | Uses your search terms to focus on relevant public Twitter contacts and improve lead scraping tools performance. |
| ✅ **Source Type Selection** | Lets you choose whether to target all sources, status content, or profile content. |
| ✅ **Country Selection** | Targets results for a chosen country and dial code so phone data mining stays region-aware. |
| ✅ **Maximum Phone Number Limit** | Stops once your desired number of phone numbers has been found, helping control run size. |
| ✅ **Deduplication** | Prevents duplicate phone numbers from being saved more than once. |
| ✅ **Incremental Saving** | Saves results to the dataset as they are found, reducing the risk of data loss. |
| ✅ **Resume Progress** | Stores progress so runs can continue from where they left off. |
| ✅ **Built-In Proxy Support** | Includes built-in proxy support for more reliable scraping from publicly available data. |

### 📥 Input — Twitter Phone Number Scraper Parameters

```json
{
  "searchTerms": [
    "fitness",
    "gym",
    "workout"
  ],
  "country": "United States (+1)",
  "sourceRegion": "All",
  "maxPhoneNumbers": 20
}
```

| Parameter | Type | Required | Default | Description |
|---|---|---:|---|---|
| `searchTerms` | Array | Yes | — | Keywords used to find relevant Twitter profiles and tweets. This is the main driver for Twitter account lookup and contact information scraping. |
| `country` | String | Yes | `United States (+1)` | Selects the country to target and determines the dial code used for matching. |
| `sourceRegion` | String | Yes | `All` | Chooses what type of public source to target: `All`, `Status`, or `Profile`. |
| `maxPhoneNumbers` | Integer | Yes | `20` | Stops the run after this many phone numbers are found. Minimum is 1 and maximum is 10000. |

### 📤 Output — What Twitter Phone Number Scraper Returns

The actor saves each result as a JSON record in your Apify dataset.

```json
{
  "keyword": "fitness",
  "title": "FitLife Coach | Wellness Tips",
  "description": "Helping busy professionals build healthy habits. Call us at +1 212 555 0198 for coaching inquiries.",
  "phone_number": "+12125550198",
  "country": "United States",
  "dial_code": "+1",
  "url": "https://x.com/fitlifecoach",
  "source_type": "Profile"
}
```

| Field | Label | Format | Description |
|---|---|---|---|
| `keyword` | Keyword | text | The search term that produced the result. |
| `title` | Title | text | The public title or headline associated with the result. |
| `description` | Description | text | The public description or text snippet where the phone number was found. |
| `phone_number` | Phone Number | text | The phone number saved in international format. |
| `country` | Country | text | The selected target country for the run. |
| `dial_code` | Dial Code | text | The country dial code associated with the selected country. |
| `url` | URL | link | A link to the page where the result was found. |
| `source_type` | Source Type | text | The source category used for the result, such as `All`, `Status`, or `Profile`. |

### 💻 How to Use Twitter Phone Number Scraper — Step-by-Step

1. **Open the Actor** — Find Twitter Phone Number Scraper in the Apify Store and open its detail page.
2. **Enter Search Terms** — Add keywords related to your niche, brand, or audience for Twitter lead generation.
3. **Choose a Country** — Select the target country so the scraper can match the right dial code.
4. **Pick a Source Type** — Decide whether to search all sources, status content, or profile content.
5. **Set the Limit** — Define how many phone numbers you want to collect in this run.
6. **Run the Actor** — Start the job and watch the logs as the scraper processes public data.
7. **Export Results** — Download the dataset and use it in spreadsheets, CRM tools, or research workflows.

*No coding required. Results ready in minutes.*

### 💡 Best Use Cases for Twitter Phone Number Scraper

- 🎯 **Twitter Lead Generation** — Build contact lists from public Twitter accounts and tweets.
- 📣 **Contact Information Scraping** — Collect phone numbers for outreach, partnerships, or research.
- 🔬 **Market Research** — Study public profile extraction results across niches, regions, and audiences.
- 📊 **Social Media Data Extraction** — Turn public social media data into structured records for analysis.
- 🧠 **Phone Data Mining** — Gather phone numbers from public sources for lead enrichment and discovery.

### Disclaimer

This actor only accesses publicly available data on Twitter. It does not scrape private profiles, authenticated content, or password-protected pages. Users are solely responsible for ensuring their use complies with Twitter’s Terms of Service, GDPR, CCPA, and applicable anti-spam laws. This tool is intended for legitimate purposes only, including research, analysis, and compliant lead generation. For data-removal requests, contact 📧 <codebeatapi@gmail.com>.

### 🆘 Support & Feedback

Have a question or found an issue with Twitter Phone Number Scraper? We’re here to help.

- 🐞 **Bug Reports:** Share issues and unexpected behavior so they can be reviewed
- ✨ **Feature Requests:** Suggest improvements for Twitter data extraction and lead scraping tools
- 📧 **Email:** <codebeatapi@gmail.com>

Your feedback helps improve the actor for marketers, data analysts, and researchers.

### Country & Time Targeting

**Target Country** did two jobs already: it supplies the dial code the search
looks for, and it is the region numbers are parsed against. It now does a third

- Google is asked to answer as if searching from that country (`gl`). Turn on
  **Strict country filter** to also restrict results to pages Google attributes to
  it (`cr=countryXX`); that is much tighter and returns noticeably fewer results.

**Result Language** restricts results to one language (`hl` + `lr`).

**Time Range** limits results to a publication window - past hour, 24 hours,
week, month, year, or an explicit *Custom range* via **Custom range: from** /
**to** in `YYYY-MM-DD` form. Selecting *Custom range* without either date falls
back to no time filter rather than silently searching all of time.

### Region resolution

| Field | Meaning |
| --- | --- |
| `regionAmbiguous` | `true` when the number was printed without a country code and the same national digits are valid in more than one country |
| `phoneIsMobile` | `true`/`false` where the numbering plan can tell, empty where it genuinely cannot (US, Canada, Mexico) |
| `phoneCallingCode` | The country's international calling code, as a number |
| `phoneCountryName` | Full country name, falling back to the two-letter code rather than guessing |

`regionAmbiguous` is the important one. A number written as `020 7946 0958` is
only a UK number because the run targeted the UK - the country shown is a
reading, not a fact, and this column tells you which rows those are.

# Actor input Schema

## `scrapeMode` (type: `string`):

Find New Numbers (default) searches by keyword. Validate My List skips searching entirely and instead runs the numbers you paste into Phone List (below) through the same deliverability checks.

## `country` (type: `string`):

Select the country to target for Google search results. Only used in Find New Numbers mode.

## `maxPhoneNumbers` (type: `integer`):

Stop scraping after this many phone numbers are found. Only used in Find New Numbers mode.

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

Enter keywords to find Twitter profiles (e.g., 'Fitness Coaches', 'Crypto', 'Real Estate'). Only used in Find New Numbers mode.

## `sourceRegion` (type: `string`):

Select the information type to target. Only used in Find New Numbers mode.

## `phoneList` (type: `array`):

Paste the phone numbers you want checked for deliverability (any format - the selected Country is used as the default region for numbers without a country code). Only used when Scrape Mode is set to "Validate My List".

## `minQualityScore` (type: `number`):

Drop any number whose quality score (0.0-1.0) falls below this. Leave at 0 for no filter.

## `requireStrictValid` (type: `boolean`):

Drop numbers that fail strict validity - mainly relevant in Validate My List mode.

## `excludeTollFree` (type: `boolean`):

Drop numbers identified as toll-free.

## `excludePremiumRate` (type: `boolean`):

Drop numbers identified as premium-rate.

## `requireCountryMatch` (type: `boolean`):

Drop numbers whose own detected region does not match the Country you selected.

## `strictCountry` (type: `boolean`):

Restrict Google to pages it attributes to the country you selected (cr=countryXX), rather than only preferring them. Much tighter targeting, noticeably fewer results.

## `searchLanguage` (type: `string`):

Restrict results to one language. Leave on "Any language" for no filter.

## `timeRange` (type: `string`):

Only return pages Google indexed within this window. A number published last month is far more likely to still be answered than one last seen years ago.

## `customDateFrom` (type: `string`):

Only used when Time Range is "Custom range". Format: YYYY-MM-DD.

## `customDateTo` (type: `string`):

Only used when Time Range is "Custom range". Format: YYYY-MM-DD.

## Actor input object example

```json
{
  "scrapeMode": "Find New Numbers",
  "country": "United States (+1)",
  "maxPhoneNumbers": 20,
  "searchTerms": [
    "fitness",
    "gym",
    "workout"
  ],
  "sourceRegion": "All",
  "phoneList": [],
  "minQualityScore": 0,
  "requireStrictValid": false,
  "excludeTollFree": false,
  "excludePremiumRate": false,
  "requireCountryMatch": false,
  "strictCountry": false,
  "searchLanguage": "",
  "timeRange": "Any time",
  "customDateFrom": "",
  "customDateTo": ""
}
```

# Actor output Schema

## `dataset` (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 = {
    "searchTerms": [
        "fitness",
        "gym",
        "workout"
    ],
    "phoneList": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("code-beat/twitter-phone-number-scraper-advanced").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": [
        "fitness",
        "gym",
        "workout",
    ],
    "phoneList": [],
}

# Run the Actor and wait for it to finish
run = client.actor("code-beat/twitter-phone-number-scraper-advanced").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 '{
  "searchTerms": [
    "fitness",
    "gym",
    "workout"
  ],
  "phoneList": []
}' |
apify call code-beat/twitter-phone-number-scraper-advanced --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,code-beat/twitter-phone-number-scraper-advanced"
        }
    }
}

```

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/JcxoWByJcBXkPZ2kx/builds/VkfwdIf8ppISDfbUa/openapi.json
