# Phone Number Validator - Bulk Format, Type & Country Check (`goldstandardweb/phone-number-validator`) Actor

Validate phone numbers in bulk: valid or not, E.164, national and international format, mobile / landline / VoIP / toll-free type and country for 245 regions. Offline, fast, no API key.

- **URL**: https://apify.com/goldstandardweb/phone-number-validator.md
- **Developed by:** [Josh Zoerner](https://apify.com/goldstandardweb) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 - Bulk Format, Type & Country Check

**Paste a list of phone numbers and get back, for each one: valid or not, the clean E.164 format, national and international formats, the line type (mobile, landline, VoIP, toll-free) and the country. Up to 100,000 numbers per run.**

- **Proof:** the sample table below comes from a real run on 15 Nov 2026. Checking 9 numbers took 2 seconds of run time on Apify; a 100,000-number list took about 2 minutes at the default 256 MB.
- **You pay only for rows you get.** Skipped repeats of a valid number and numbers past your cost limit are never charged. Set a maximum cost per run and the Actor stops cleanly when it is reached.
- **Honest scope:** this is a numbering-plan check, not a live network lookup. "Valid" means the number *can* exist and tells you what kind it is. It does not mean the line is in service, and it does not give the carrier (see [Limitations](#limitations)).
- **Next step:** click **Try for free**. The example input checks 9 numbers from 5 countries.

### Who it's for

- **Sales and marketing teams** cleaning a CRM or lead list before a call or SMS campaign: drop bad numbers, fix formats, split mobile from landline.
- **Developers and no-code builders** who need every number in E.164 (`+14155552671`) before sending it to Twilio, a dialer, WhatsApp or a database.
- **Data and ops teams** merging contact lists from many countries and spotting the same number written in different ways.
- **Apps and agents** that need a fast, cheap yes/no and a clean format for one number or a thousand, in one call.

### What you get

One row per number, in the order you sent them:

| Input | Valid | E.164 | Type | Country |
|---|---|---|---|---|
| (212) 736-3100 | yes | +12127363100 | fixed_line_or_mobile | United States |
| +44 20 7946 0958 | yes | +442079460958 | fixed_line | United Kingdom |
| +61 491 570 156 | yes | +61491570156 | mobile | Australia |
| 1-800-275-2273 | yes | +18002752273 | toll_free | United States |
| +1 415 555 | no (TOO_SHORT) | - | - | - |

The UK and Australian sample numbers are in ranges kept for TV and films. They show as valid because those ranges look like normal numbers in the numbering plan (see [Limitations](#limitations)).

Every row also has the international format (`+44 20 7946 0958`), the national format (`020 7946 0958`), a `tel:` link, the extension if there was one, the two-letter region code, the calling code, whether the number already appeared earlier in your list, and for invalid numbers a reason code plus a plain-English note on what to fix.

Full example item:

```json
{
  "position": 3,
  "input": "+44 20 7946 0958",
  "isValid": true,
  "isPossible": true,
  "numberType": "fixed_line",
  "e164": "+442079460958",
  "internationalFormat": "+44 20 7946 0958",
  "nationalFormat": "020 7946 0958",
  "rfc3966": "tel:+442079460958",
  "nationalNumber": "2079460958",
  "extension": null,
  "regionCode": "GB",
  "countryName": "United Kingdom",
  "callingCode": "+44",
  "isDuplicate": false,
  "reason": null,
  "reasonMessage": null,
  "checkedAt": "2026-11-15T23:02:11.120Z"
}
```

A summary of the whole run (valid / invalid counts, counts by type, country and problem) is saved as the `OUTPUT` record, together with all rows when there are 1,000 or fewer. 1,000 rows are about 450 KB, so an agent that reads the record should send small lists (or read only `summary`).

### How to use it

1. **Paste your numbers**, one per line, in any common format: `+1 415-555-2671`, `(415) 555-2671`, `020 7946 0958`, `+44 20 7946 0958 ext. 12`, `tel:+14155552671`.
2. **Set the default country** (for example `US` or `GB`) for numbers written without the `+` country code. Leave it empty if every number starts with `+`.
3. **Run it** and download the results as Excel, JSON or CSV. Turn on **Skip duplicate numbers** to get each number only once.

**Opening results in Excel?** Download the Excel file, not the CSV. Excel reads `+14155552671` in a CSV as a number and drops the `+`. Any entry a spreadsheet would run as a formula (it starts with `=` or `@`, or with `+` or `-` and contains a function call) comes back in the `input` column with a leading `'`, so it shows as text.

Nothing to sign up for beyond your Apify account: no API key and no phone-network login.

### Pricing

Pay per result: one result per number checked.

- **1,000 numbers = $1.25** ($1.25 per 1,000 results), plus Apify's small standard charge for starting a run.
- Invalid numbers are results too (you get the reason and what to fix). Skipped duplicates and empty lines are free.
- Resurrecting a finished run does not charge again. A run stopped by your cost limit, resurrected with a higher limit, continues where it stopped.
- Set a maximum cost per run in Apify and the Actor stops cleanly when it is reached; it never stores a row it cannot charge for.

### Scheduling & integrations

- **API**: start a run and read results with the Apify API or the JavaScript / Python clients. For small lists, the `run-sync` endpoint returns the `OUTPUT` record (summary plus every row) in a single call.
- **Make, Zapier, n8n**: validate each new lead's number before it reaches your CRM or dialer.
- **Google Sheets**: export each run straight to a sheet.
- **MCP**: any tool that connects to Apify's MCP server can call this Actor with `{"phoneNumbers": ["+1 415 555 2671"]}` and read the answer from one run. The `phoneNumber` text field also takes one number, or several separated by commas, semicolons or new lines.
- **Schedules**: re-check a list weekly if numbering plans in your markets change.

### Tested to the Gold Standard

Gold Standard Web built this Actor and tests it with [Gold Standard QA](https://goldstandardweb.com/qa), our three-layer quality process.

- Every change must pass the full test suite before it is saved.
- We plant bugs in the code on purpose, and the tests must catch at least 90% of them.
- A reviewer who did not write the code tries to break it before each release.

[See every check we run](https://goldstandardweb.com/qa).

### FAQ

**Is this legal to use?**
Here is how it works: The Actor does not scrape any website or contact any phone network. It checks each number against public numbering-plan data (the open-source libphonenumber metadata, which follows each country's official numbering plan). Your list is processed inside your own Apify run and is not sent anywhere else. You remain responsible for how you contact people (for example TCPA, GDPR and do-not-call rules). This is general information, not legal advice; you are responsible for how you use the data.

**What does "valid" mean?**
The number has the right length and starts with a prefix that the country has assigned (for example a real area code). It does **not** mean the number is in service: a valid number can be disconnected, never issued, or fictional (see Limitations). Only a live network lookup can tell that. `isPossible` is looser: the length fits, but the range may not be assigned (reason `NOT_VALID`).

**Why is the type `fixed_line_or_mobile` for US and Canadian numbers?**
In the US and Canada, mobile and landline numbers share the same area codes, so the numbering plan cannot tell them apart. Most other countries use separate prefixes, so you get `mobile` or `fixed_line` there.

**Do you return the carrier?**
No. Carrier data is not available offline in a reliable way: numbers move between carriers (porting), so any offline carrier name is often wrong. If you need the current carrier or whether a line is active, you need a paid live lookup (HLR / LRN), which this Actor does not do.

**How do I check numbers from several countries in one run?**
Write them with the `+` country code (`+44 ...`, `+49 ...`). Numbers without it are read with the default country.

**What happens to duplicates?**
Two entries are duplicates when they are the same valid number after formatting, for example `+1 212 736 3100` and `(212) 736-3100`. The same number with a different extension (`ext. 1`, `ext. 2`) is not a duplicate. Invalid entries are never matched, so each one is returned (and charged). By default every row is returned and repeats are marked `isDuplicate: true`. With **Skip duplicate numbers** on, repeats are left out and not charged.

### Limitations

- **No carrier, no live status, no owner name.** This is not an HLR or reverse lookup.
- **Type comes from the numbering plan.** Where a country does not separate mobile and landline ranges, you get `fixed_line_or_mobile`. Ported numbers keep the type of their original range.
- **Valid is not the same as in use.** Ranges kept for TV and films look like normal numbers and show as valid: for example US 555-0100 to 555-0199, UK 020 7946 0000 to 0999, Australia 0491 570 xxx and (02) 5550 xxxx. Filter these out yourself if they matter to you.
- **Numbering plans change.** The Actor uses the numbering-plan data in its current build (libphonenumber-js 1.13.15, October 2026). A brand-new range may show as `NOT_VALID` until the data is updated.
- **International dialing prefixes** are read the way the default country dials abroad: `0044 20 ...` works with `GB` or `DE`, `011 44 20 ...` works with `US`. Writing `+44` always works.
- **Up to 100,000 numbers per run.** Larger lists: split them over several runs. Entries longer than 250 characters are not checked.
- **Spreadsheet safety:** an `input` value that a spreadsheet would run as a formula gets a leading `'` (see How to use it). Every other column holds only checked phone data.
- One number per entry; text around the number (like "Call me at") is not removed, so clean those cells first.

### Input reference

| Field | Type | Default | Description |
|---|---|---|---|
| `phoneNumbers` | array of strings | - | One phone number per entry, any common format. Up to 100,000. |
| `phoneNumber` | string | - | One number, or several separated by commas, semicolons or new lines (handy for agents and pasted text); added to `phoneNumbers`. Use either field or both (at least one number in total). |
| `defaultCountry` | string | `US` | Two-letter country code used for numbers without `+`. Empty = numbers must start with `+`. |
| `skipDuplicates` | boolean | `false` | Return each valid number only once (repeats are not charged). Invalid entries are always returned. |
| `maxResults` | integer | all | Stop after this many results. |

### Output fields

`position`, `input`, `isValid`, `isPossible`, `numberType` (`mobile`, `fixed_line`, `fixed_line_or_mobile`, `toll_free`, `premium_rate`, `shared_cost`, `voip`, `personal_number`, `pager`, `uan`, `voicemail`), `e164`, `internationalFormat`, `nationalFormat`, `rfc3966`, `nationalNumber`, `extension`, `regionCode`, `countryName`, `callingCode`, `isDuplicate`, `reason` (`EMPTY`, `NOT_TEXT`, `INPUT_TOO_LONG`, `NOT_A_NUMBER`, `INVALID_COUNTRY`, `TOO_SHORT`, `TOO_LONG`, `INVALID_LENGTH`, `NOT_VALID`), `reasonMessage`, `checkedAt`.

Formats and type are filled only for valid numbers.

### Data source

Numbering-plan metadata from [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) (MIT license), a JavaScript port of Google's libphonenumber metadata, covering about 245 countries and regions. Everything runs inside the Actor; no external service is called.

# Actor input Schema

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

One phone number per line, in any common format: +1 415-555-2671, (415) 555-2671, +44 20 7946 0958 ext. 12, tel:+14155552671. Numbers without a + prefix are read with the default country below. Up to 100,000 per run. Empty lines are ignored.

## `phoneNumber` (type: `string`):

One number, or several separated by commas, semicolons or new lines. Handy for quick checks from code or an agent. These are added to the list above; use either field or both.

## `defaultCountry` (type: `string`):

Two-letter country code (ISO 3166, for example US, GB, DE, IN) used for numbers written without the + country code, like (212) 736-3100. Leave empty if every number starts with +.

## `skipDuplicates` (type: `boolean`):

Output each valid number only once, even when it appears several times in different formats (for example +1 212 736 3100 and (212) 736-3100). Skipped duplicates are not charged. The same number with a different extension is kept. Invalid entries are never matched, so each one is returned. When off, every row is returned and repeats are marked isDuplicate = true.

## `maxResults` (type: `integer`):

Stop after this many results. Leave empty to check every number in the list (up to 100,000 per run).

## Actor input object example

```json
{
  "phoneNumbers": [
    "+1 650-253-0000",
    "(212) 736-3100",
    "+44 20 7946 0958",
    "+49 30 901820",
    "+61 491 570 156",
    "+33 6 12 34 56 78",
    "1-800-275-2273",
    "+1 415 555",
    "not a phone"
  ],
  "defaultCountry": "US",
  "skipDuplicates": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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 = {
    "phoneNumbers": [
        "+1 650-253-0000",
        "(212) 736-3100",
        "+44 20 7946 0958",
        "+49 30 901820",
        "+61 491 570 156",
        "+33 6 12 34 56 78",
        "1-800-275-2273",
        "+1 415 555",
        "not a phone"
    ],
    "defaultCountry": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("goldstandardweb/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 650-253-0000",
        "(212) 736-3100",
        "+44 20 7946 0958",
        "+49 30 901820",
        "+61 491 570 156",
        "+33 6 12 34 56 78",
        "1-800-275-2273",
        "+1 415 555",
        "not a phone",
    ],
    "defaultCountry": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("goldstandardweb/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 650-253-0000",
    "(212) 736-3100",
    "+44 20 7946 0958",
    "+49 30 901820",
    "+61 491 570 156",
    "+33 6 12 34 56 78",
    "1-800-275-2273",
    "+1 415 555",
    "not a phone"
  ],
  "defaultCountry": "US"
}' |
apify call goldstandardweb/phone-number-validator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goldstandardweb/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/mymOUvjw8ShvbzKJN/builds/5TncAc5HC6AV6oyrl/openapi.json
