# Phone Number Validator — Bulk Validation, Line Type & Carrier (`zhorex/phone-number-validator`) Actor

Bulk phone number validation with Google's libphonenumber: validity, country, timezone, location, line type and E.164/international/national/RFC 3966 formats. Carrier where the numbering plan exposes it — not for US, Canada or Puerto Rico, where mobile vs fixed line can't be told apart either.

- **URL**: https://apify.com/zhorex/phone-number-validator.md
- **Developed by:** [Sami](https://apify.com/zhorex) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 78 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

from $2.00 / 1,000 phone number validateds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Phone Number Validator

Validate phone numbers in bulk using Google's [libphonenumber](https://github.com/google/libphonenumber). No external APIs: $0.002 per number, run locally with Google's libphonenumber.

### How to validate phone numbers in 3 easy steps

1. **Go to the [Phone Number Validator](https://apify.com/zhorex/phone-number-validator) page** on Apify and click **"Try for free"**
2. **Configure your input** — paste phone numbers into the `phoneNumbers` array or provide a `csvUrl` with a column of numbers
3. **Click "Run"**, wait for validation to finish, and **download your results** in JSON, CSV, or Excel

No coding required. Works with Apify's free plan.

### What it does

For each phone number, the Actor returns:

- **Validation** — Whether the number is valid and possible for its region
- **Country** — Country code (US, GB, ES...) and full country name
- **Number type** — Mobile, fixed line, VOIP, toll-free, premium rate, etc.
- **Carrier** — Network operator (Vodafone, Orange, Movistar…) — see [US/CA carrier note](#known-limitation--carrier-lookup-on-us--ca--pr-numbers) below
- **Timezone** — All applicable timezones for the number
- **Location** — Approximate geographic location
- **Formatted output** — E.164, international, national, and RFC3966 formats

### Known limitation — carrier lookup on US / CA / PR numbers

**libphonenumber returns blank carrier for US, Canada, and Puerto Rico numbers.** This is intentional in the underlying library, not a bug in this Actor.

**Why:** since 2003, US/CA/PR implemented Mobile Number Portability (MNP). People can keep their phone number when they switch carriers, which means a number's prefix no longer reliably maps to its current carrier. Google's libphonenumber maintains an offline prefix-to-carrier database (the carrier each number range was originally assigned to) — for these three regions it deliberately returns an empty string rather than report a stale answer.

**What you get instead on US / CA / PR numbers (v1.1+):**

- `carrier`: `null`
- `carrierAvailable`: `false`
- `carrierLookupNote`: an explicit explanation string (so the null is never a silent failure)
- All other fields populated normally: country, line type, timezone, location, formatted outputs

**If you specifically need live US/CA carrier identification**, you need an HLR-lookup service (Twilio Lookup, Telnyx Number Lookup, NumLookupAPI, RealPhoneValidation, etc.). Those services query live carrier databases. This Actor's $0.002/lookup tier is for the validation + country + line type + format layer; carrier on US/CA is a different (live, paid) data source.

**Outside US / CA / PR the `carrier` field is the number range's original carrier; it may differ if the number was ported.** Most countries (the UK and the EU included) also have mobile number portability, so treat `carrier` as a hint, not the current network.

### Input

| Field | Type | Description |
|-------|------|-------------|
| `phoneNumbers` | array | List of phone numbers in any format |
| `csvUrl` | string | URL to a CSV file with phone numbers |
| `csvColumn` | string | Column name in CSV (default: `phone`) |
| `defaultCountryCode` | string | ISO country code for numbers without prefix (default: `US`) |
| `maxConcurrency` | integer | Parallel processing limit (default: `50`) |

#### Example input

```json
{
    "phoneNumbers": [
        "+1 (555) 123-4567",
        "+44 20 7946 0958",
        "+34 612 345 678",
        "invalid-number"
    ],
    "defaultCountryCode": "US"
}
```

### Output

Each validated number produces a result like:

```json
{
    "input": "+44 20 7946 0958",
    "isValid": true,
    "isPossible": true,
    "numberType": "FIXED_LINE",
    "countryCode": "GB",
    "countryName": "United Kingdom",
    "carrier": null,
    "carrierAvailable": false,
    "carrierLookupNote": "Carrier lookup returned blank for this number. libphonenumber's offline carrier database does not cover this prefix; the number is still valid if isValid is true.",
    "timezone": ["Europe/London"],
    "location": "London",
    "formatted": {
        "e164": "+442079460958",
        "international": "+44 20 7946 0958",
        "national": "020 7946 0958",
        "rfc3966": "tel:+44-20-7946-0958"
    },
    "validatedAt": "2026-04-07T12:00:00+00:00"
}
```

**Success case — carrier populated (ES mobile)**:

```json
{
    "input": "+34 612 345 678",
    "isValid": true,
    "isPossible": true,
    "numberType": "MOBILE",
    "countryCode": "ES",
    "countryName": "Spain",
    "carrier": "Syma",
    "carrierAvailable": true,
    "carrierLookupNote": null,
    "timezone": ["Europe/Madrid"],
    "location": "Spain",
    "formatted": {
        "e164": "+34612345678",
        "international": "+34 612 34 56 78",
        "national": "612 34 56 78",
        "rfc3966": "tel:+34-612-34-56-78"
    },
    "validatedAt": "2026-05-22T09:53:13+00:00"
}
```

**MNP case — carrier intentionally null (US mobile)**:

```json
{
    "input": "+1 415 555 1234",
    "isValid": true,
    "isPossible": true,
    "numberType": "FIXED_LINE_OR_MOBILE",
    "countryCode": "US",
    "countryName": "United States",
    "carrier": null,
    "carrierAvailable": false,
    "carrierLookupNote": "Carrier lookup unavailable: this country implemented Mobile Number Portability, so the number's prefix no longer reliably maps to a carrier (numbers move freely between carriers). Google's libphonenumber intentionally returns blank for these regions. For live carrier identification on US / CA / PR numbers you need an HLR-lookup service (Twilio Lookup, Telnyx, NumLookupAPI). All other fields (country, line type, timezone, location, formatted outputs) are accurate for these numbers.",
    "timezone": ["America/Los_Angeles"],
    "location": "California",
    "formatted": {
        "e164": "+14155551234",
        "international": "+1 415-555-1234",
        "national": "(415) 555-1234",
        "rfc3966": "tel:+1-415-555-1234"
    },
    "validatedAt": "2026-05-22T09:53:13+00:00"
}
```

Invalid numbers return `isValid: false` with an `error` field explaining why.

**US / CA / PR numbers** always return `carrier: null` with `carrierAvailable: false` and the explicit MNP `carrierLookupNote` — see the [Known limitation](#known-limitation--carrier-lookup-on-us--ca--pr-numbers) section above.

### Phone validation API alternative

This Actor runs Google's libphonenumber locally with no external API calls and no API key, at $0.002 per number.

### Use cases

- **List hygiene** — Clean and validate phone lists before importing them
- **CRM hygiene** — Remove invalid numbers from your database
- **Data enrichment** — Add country, carrier, and timezone to phone records
- **Format checks** — Verify number formats before SMS sends (a format check is not consent)

### Use with Python, JavaScript, or no code

You can call this validator programmatically using the Apify API client.

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("zhorex/phone-number-validator").call(run_input={
    "phoneNumbers": ["+1 (555) 123-4567", "+44 20 7946 0958", "+34 612 345 678"],
    "defaultCountryCode": "US"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('zhorex/phone-number-validator').call({
    phoneNumbers: ['+1 (555) 123-4567', '+44 20 7946 0958', '+34 612 345 678'],
    defaultCountryCode: 'US',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Or skip coding entirely and use the [web interface](https://apify.com/zhorex/phone-number-validator) with no-code tools like Zapier, Make, or n8n.

### Pricing

Pay per event: **$0.002 per number** validated ($2 per 1,000 numbers).

### Technology

Uses Google's libphonenumber (Python port). No external API calls, so no third-party lookup cost.

### FAQ

**How many phone numbers can I validate at once?**
There is no hard limit. The Actor processes numbers in parallel (default concurrency: 50) and can handle thousands of numbers in a single run. You can also provide a CSV file URL for very large batches.

**Does it work with numbers from any country?**
Yes. It supports all countries and regions covered by Google's libphonenumber library — virtually every country in the world. Set `defaultCountryCode` for numbers that don't include a country prefix.

**How much does it cost to validate phone numbers?**
$0.002 per number ($2 per 1,000 numbers), with no API keys.

**Can I use this phone validator in Python?**
Yes. Install the Apify Python client (`pip install apify-client`) and call the Actor with a few lines of code. See the Python example above.

**Is phone number validation legal?**
Phone number validation using libphonenumber is a standard technical operation that checks format validity and metadata. It does not access private data or perform live carrier lookups. Always comply with applicable data protection regulations (GDPR, CCPA, etc.) when handling personal phone numbers. Before calling or texting any number, you are responsible for having a lawful basis and any consent that telemarketing rules require (for example Spain's LSSI and telecom rules, or the US TCPA); a valid number is not permission to contact it.

**What does this phone number validator do?**
This Actor (`zhorex/phone-number-validator`) validates and formats numbers with Google's libphonenumber library, supports bulk validation via CSV, and costs $0.002 per number.

### Integrations & data export

This Actor integrates with the full Apify ecosystem:

- **Google Sheets** — Automatically push validated phone data to a spreadsheet
- **Zapier / Make / n8n** — Connect validation results to 5,000+ apps with no-code automation
- **REST API** — Start runs, fetch results, and manage datasets programmatically
- **Webhooks** — Get notified when validation finishes and push clean data to your CRM
- **Amazon S3 / Google Cloud Storage** — Export datasets directly to cloud storage
- **Slack / Email** — Receive notifications with validation results after each run

### More Actors by Zhorex

**Social & Entertainment**

- [Telegram Channel Scraper](https://apify.com/zhorex/telegram-channel-scraper) — Scrape messages, media, and metadata from public Telegram channels
- [Letterboxd Scraper](https://apify.com/zhorex/letterboxd-scraper) — Scrape film details, reviews, and profiles from Letterboxd
- [RedNote Xiaohongshu Scraper All-in-One](https://apify.com/zhorex/rednote-xiaohongshu-scraper) — Scrape posts, comments, and profiles from Xiaohongshu

**Finance & Market Data**

- [TradingView Scraper](https://apify.com/zhorex/tradingview-scraper) — Screen 11+ global markets with 40+ technical indicators

**Business & Reviews**

- [G2 Reviews Scraper](https://apify.com/zhorex/g2-reviews-scraper) — Extract software reviews and ratings from G2.com
- [Capterra Reviews Scraper](https://apify.com/zhorex/capterra-reviews-scraper) — Software ratings, pros/cons, reviewer profiles

**B2B data**

- [LinkedIn Company Enrichment](https://apify.com/zhorex/linkedin-company-enrichment) — Company profiles and firmographics (no login)

**SEO & Data Tools**

- [Domain Authority Checker](https://apify.com/zhorex/domain-authority-checker) — Bulk check domain authority for SEO analysis

### Legal

This Actor validates phone numbers using Google's open-source libphonenumber library. It makes no calls to carriers, lookup services or the numbers themselves, and does not access private data; carrier names come from libphonenumber's offline database. The only outside download is the CSV file you give in `csvUrl`, if you use that field. Use responsibly and in compliance with applicable data protection regulations.

***

Reviews, good or bad, help other users decide: [leave a rating](https://apify.com/zhorex/phone-number-validator/reviews).

# Actor input Schema

## `phoneNumbers` (type: `array`):

List of phone numbers to validate. Accepts any format: +1 (555) 123-4567, 0034612345678, +44 20 7946 0958, etc.

## `csvUrl` (type: `string`):

URL to a CSV file containing phone numbers. Use together with 'csvColumn' to specify which column holds the numbers.

## `csvColumn` (type: `string`):

Name of the column in the CSV file that contains phone numbers.

## `defaultCountryCode` (type: `string`):

ISO 3166-1 alpha-2 country code (e.g., US, GB, ES) used when numbers don't include a country prefix. Leave empty if all numbers have international format.

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

Maximum number of phone numbers to process in parallel. Higher = faster but uses more memory.

## Actor input object example

```json
{
  "phoneNumbers": [
    "+1 (555) 123-4567",
    "+44 20 7946 0958",
    "+34 612 345 678"
  ],
  "csvColumn": "phone",
  "defaultCountryCode": "US",
  "maxConcurrency": 50
}
```

# 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 = {
    "phoneNumbers": [
        "+1 (555) 123-4567",
        "+44 20 7946 0958",
        "+34 612 345 678"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhorex/phone-number-validator").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 = { "phoneNumbers": [
        "+1 (555) 123-4567",
        "+44 20 7946 0958",
        "+34 612 345 678",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("zhorex/phone-number-validator").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 '{
  "phoneNumbers": [
    "+1 (555) 123-4567",
    "+44 20 7946 0958",
    "+34 612 345 678"
  ]
}' |
apify call zhorex/phone-number-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhorex/phone-number-validator"
        }
    }
}
```

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/4BeCzxeOpgUqO2BNu/builds/vdhNuCYaz9qgmOdz1/openapi.json
