# Phone Number Validator: Bulk Phone Check, E.164 & Type (`steadyscrape/phone-number-validator`) Actor

Phone number validator for bulk lists and lead datasets, offline with Google's libphonenumber: repairs scraped numbers, valid or invalid and why, E.164 format, number type (mobile, landline, toll-free, VoIP), country, area, time zone and original carrier. Export to JSON, CSV or Excel, or via API.

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

## Pricing

$0.30 / 1,000 phone number checkeds

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 phone number validation, E.164 formatting and number type

**Phone Number Validator** checks phone numbers in bulk, from a typed list or straight from a lead dataset (Google Maps,
website contacts, Yellow Pages, a CRM export), and tells you for every number whether it is **valid or invalid and
why**, writes it in **E.164**, international, national and RFC 3966 (`tel:`) form, and gives its **number type**
(mobile, fixed line, toll-free, premium rate, VoIP, shared cost, UAN…), **country**, calling code, the **area** its
range belongs to, its **time zones** and the **original carrier** of mobile ranges. Scraped junk is repaired first:
`tel:` and `wa.me` links, `Tel.:` / `Phone:` / `Fax:` labels, `+49 (0)30`, extensions, vanity letters
(`1-800-FLOWERS`), spreadsheet numbers (`15125550100.0`) and several numbers in one cell
(`Tel.: +49 30 2270 / Fax: +49 30 2271`, `T +49 30 2270 F +49 30 2271`, `030 2270 • 030 2271`).

It works **offline**, with the number-range data of Google's libphonenumber, the library Android and most phone apps use
to read numbers. No number is called, texted or looked up anywhere, so a check costs a fraction of a live HLR lookup
and nothing can block it. Export the results to JSON, CSV or Excel, or use the phone validator through the API.

### What the phone number validator gives for each number

| verdict | what it means | charged |
|---|---|---|
| `valid` | the number is in a range assigned in its country (libphonenumber says valid), and it does not look made up | yes |
| `suspicious` | valid by its range, but its last 7 digits repeat one digit or run in sequence (`555-5555`, `123-4567`), as made-up numbers do | yes |
| `invalid` | too short, too long, a length no number of that country has, outside every assigned range, a calling code no country has, or in a range reserved for fiction (NANP 555-0100…0199, Ofcom's drama ranges, ACMA's) | yes |
| `unknown` | a national number (`030 2270`) with no country to read it in: set the default country or a country field | free |
| `notAPhoneNumber` | text with no phone number in it (`N/A`, a date, `911`, a spreadsheet number that lost digits) | free |

Every row also says *why* in plain words (`reason`) and as codes (`reasons`). A number given twice (in any format) is
checked once: the repeat is a free row with the same verdict and `duplicate: true`.

### Use cases for phone validation

- **Clean a lead list before a call or SMS campaign**: drop invalid and fictional numbers, keep mobiles for SMS and
  WhatsApp, and dial each lead in its own time zone.
- **Normalise numbers to E.164** for a CRM, a dialer, Twilio or a WhatsApp Business import: one format, country code
  included, extensions kept apart.
- **Enrich scraped leads**: run it on the dataset of a Google Maps, website contact or directory scrape and each row
  keeps its whole lead (name, address, website) next to the number's verdict, type and area.
- **Validate phone numbers in a form or a sign-up export** before they reach your sales team.
- **Split mobile from landline** where the numbering plan tells them apart (most of Europe, Latin America, Asia,
  Australia).

### Input

- **Phone numbers**: one per line, as scraped or typed. A line holding several numbers (`Tel.: +49 30 2270, Fax: 030
  2271`) gives one row each.
- **Default country**: the country a number written without its calling code is read in (`(512) 482-0555` needs
  United States). A number written with `+` or `00` always keeps its own country.
- **Or a dataset**: pick the dataset of another run. Every top-level field named like phone (`phone`,
  `phoneInternational`, `phones`, `phoneDetails`, `mobile`, `telephone`, `whatsapp`…) is read, or the field you name
  as a dotted path (`contact.mobile`, `fax`). Each item's own country (`countryCode`, `country`, or the field you
  name, as a code or an English name) wins over the default country.

```json
{
    "phoneNumbers": ["tel:+1-650-253-0000", "Tel.: +44 (0)20 7219 3000", "1-800-FLOWERS", "(512) 482-0555 x 204"],
    "defaultCountry": "US"
}
```

### Output example

```json
{
    "e164": "+442072193000",
    "input": "Tel.: +44 (0)20 7219 3000",
    "verdict": "valid",
    "reason": "Valid fixed-line number of United Kingdom; the line itself was not checked.",
    "reasons": [],
    "isValid": true,
    "isPossible": true,
    "numberType": "FIXED_LINE",
    "isMobile": false,
    "countryCode": "GB",
    "countryName": "United Kingdom",
    "callingCode": "44",
    "nationalNumber": "2072193000",
    "extension": null,
    "international": "+44 20 7219 3000",
    "national": "020 7219 3000",
    "rfc3966": "tel:+442072193000",
    "location": "London",
    "timeZones": ["Europe/London"],
    "originalCarrier": null,
    "whatsappLink": "https://wa.me/442072193000",
    "label": "phone",
    "countrySource": "number",
    "liveChecked": false,
    "repaired": true,
    "repairs": ["label"],
    "duplicate": false,
    "source": "phoneNumbers",
    "datasetItemIndex": null,
    "item": null,
    "checkedAt": "2026-11-13T08:00:00.000Z"
}
```

### Output fields

| field | what it holds |
|---|---|
| `e164` | the number in E.164 (`+15124820555`), as read; `null` when no number could be read |
| `input` | the text the number was read from, as given (a cell holding several numbers is the `input` of each of its rows) |
| `verdict`, `reason`, `reasons` | the verdict, why in one sentence, and the reason codes (`tooShort`, `tooLong`, `invalidLength`, `notInRange`, `invalidCountryCode`, `fictional`, `repeatedDigits`, `sequentialDigits`, `noCountry`, `noDigits`, `tooFewDigits`, `date`, `digitsLost`, `unreadable`) |
| `isValid`, `isPossible` | libphonenumber's own answers: in an assigned range, and of a possible length |
| `numberType`, `isMobile` | `MOBILE`, `FIXED_LINE`, `FIXED_LINE_OR_MOBILE`, `TOLL_FREE`, `PREMIUM_RATE`, `SHARED_COST`, `VOIP`, `PERSONAL_NUMBER`, `PAGER`, `UAN`, `VOICEMAIL`; `isMobile` is `null` where the ranges do not tell |
| `countryCode`, `countryName`, `callingCode`, `nationalNumber` | ISO 3166 country, its name, the calling code and the national significant number |
| `international`, `national`, `rfc3966`, `extension` | the other formats (valid numbers only); the extension in its own field and in the `tel:` form |
| `location`, `timeZones`, `originalCarrier` | the area of the number's range (`Mountain View, CA`, `Berlin`), its time zones (empty when the range spans more than 4, as toll-free numbers do), and the carrier the mobile range was first assigned to |
| `whatsappLink` | a `wa.me` link for valid personal numbers: **never checked**, it does not say the number has WhatsApp |
| `label` | `phone`, `mobile`, `fax` or `whatsapp`, when a label or link in the text named it |
| `countrySource` | where the country came from: the `number` itself, the dataset `row`, another number of the same `cell`, or the `default` country |
| `liveChecked` | always `false`: no line is called or looked up |
| `repaired`, `repairs` | what was fixed before reading (`telLink`, `whatsappLink`, `label`, `vanityLetters`, `spreadsheetNumber`, `internationalPrefix`, `addedPlus`, `splitFromList`, `invisibleCharacters`, `percentEncoding`) |
| `duplicate`, `source`, `datasetItemIndex`, `item` | a repeat of an earlier number; where the row came from, with the whole dataset item |
| `checkedAt` | when the run read the number (ISO 8601) |

The run's `SUMMARY` record counts the verdicts, repeats and dataset items read.

### What an offline phone number check cannot tell

- **It never makes a live lookup**: no HLR query, no carrier or porting database, no WhatsApp or Telegram check, no
  call or SMS. A `valid` number is in an assigned range; whether a line is connected today, and who holds it, is not
  known.
- **US and Canada numbers read `FIXED_LINE_OR_MOBILE`**: the North American plan gives fixed lines and mobiles the same
  ranges, so offline no tool can tell them apart. The area (`Austin, TX`) and time zone are still given. The same holds
  for Mexico, Chile, Puerto Rico, the Dominican Republic and a few US territories.
- **The carrier is the original one** of the number's range: numbers port between carriers, so it may not be today's.
  US and Canadian ranges have no carrier data (only the Caribbean members of the +1 plan do).
- **Short codes** (911, 112, 116 000) and service numbers are not read as phone numbers.
- The data is Google's libphonenumber metadata (updated every few weeks) and its geocoder, carrier and time-zone
  tables, as published under the Apache License 2.0.

### Pricing

One event, **number**, US$0.0003 per unique number checked to a verdict (valid, suspicious or invalid). Blank lines
are skipped; repeats, text with no phone number and national numbers with no country to read them in are free rows.
There is no start fee. 10,000 numbers cost US$3.

### Is it legal to validate phone numbers?

Reading a number's format and the public range tables of the numbering plans touches no one: nothing is dialled,
texted or looked up, and no personal data is fetched. What you do with the numbers is up to you: calling or texting
people is regulated (TCPA and the Do Not Call registry in the US, GDPR and ePrivacy in Europe), and this Actor does not
check consent or do-not-call lists.

This Actor is not affiliated with, endorsed by or sponsored by Google, the libphonenumber project or any carrier or
numbering-plan administrator (NANPA, Ofcom, ACMA); it uses their openly licensed and published data.

# Actor input Schema

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

One number per line, as scraped or typed: <code>tel:</code> and <code>wa.me</code> links, labels (<code>Tel.:</code>, <code>Phone:</code>, <code>Mobil:</code>, <code>Fax:</code>), <code>+49 (0)30</code>, extensions (<code>ext. 12</code>, <code>x 204</code>), vanity letters (<code>1-800-FLOWERS</code>), spreadsheet numbers (<code>15125550100.0</code>) and invisible characters are repaired first, and a line holding several numbers gives one row each. Each unique number is read offline with Google's libphonenumber data: valid or not and why, E.164 and the other formats, number type, country, area, time zones and original carrier. No line is ever called or looked up. Up to 100,000 rows per run, together with the dataset below.

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

The country a number written without its calling code (<code>(512) 482-0555</code>, <code>030 2270</code>) is read in, when its row names none. A number written with <code>+</code> or <code>00</code> always keeps its own country. Leave empty and such numbers are free <code>unknown</code> rows, unless their dataset row has a country field.

## `datasetId` (type: `string`):

Pick the dataset of another run (a Google Maps scrape, a website contact scrape, a lead list) and every phone number in it is checked. Each row keeps the whole dataset item it came from in <code>item</code>, so a lead keeps its name, address and website. Only the dataset you pick here can be read. Items without a phone number are skipped and counted in the status message.

## `datasetField` (type: `string`):

The field of each dataset item that holds the number (or a list of them), as a dotted path (<code>phone</code>, <code>contact.mobile</code>, <code>fax</code>). Leave empty to read every top-level field named like phone (<code>phone</code>, <code>phoneInternational</code>, <code>phones</code>, <code>phoneDetails</code>, <code>mobile</code>, <code>telephone</code>, <code>whatsapp</code>…) that holds a number; fax fields are read only when named here.

## `countryField` (type: `string`):

The field of each dataset item that names its country, as a two-letter code (<code>US</code>, <code>DE</code>, <code>UK</code>) or an English name (<code>Germany</code>), as a dotted path. It is used for that row's numbers written without <code>+</code> and wins over the default country. Leave empty to use the first top-level field named <code>countryCode</code>, <code>country</code> or similar that names a country.

## Actor input object example

```json
{
  "phoneNumbers": [
    "tel:+1-650-253-0000",
    "Tel.: +44 (0)20 7219 3000",
    "1-800-FLOWERS",
    "+49 30 227-0",
    "+1 (212) 555-0123",
    "+1 512-555-5555",
    "+1 512 555"
  ]
}
```

# Actor output Schema

## `rows` (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": [
        "tel:+1-650-253-0000",
        "Tel.: +44 (0)20 7219 3000",
        "1-800-FLOWERS",
        "+49 30 227-0",
        "+1 (212) 555-0123",
        "+1 512-555-5555",
        "+1 512 555"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadyscrape/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": [
        "tel:+1-650-253-0000",
        "Tel.: +44 (0)20 7219 3000",
        "1-800-FLOWERS",
        "+49 30 227-0",
        "+1 (212) 555-0123",
        "+1 512-555-5555",
        "+1 512 555",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadyscrape/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": [
    "tel:+1-650-253-0000",
    "Tel.: +44 (0)20 7219 3000",
    "1-800-FLOWERS",
    "+49 30 227-0",
    "+1 (212) 555-0123",
    "+1 512-555-5555",
    "+1 512 555"
  ]
}' |
apify call steadyscrape/phone-number-validator --silent --output-dataset

```

## MCP server setup

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