# Phone Number Validator - Bulk Offline Format & Line Type (`subimpact/phone-number-validator`) Actor

Validate, clean and enrich phone numbers offline: E.164 and national formats, validity, line type, country, region, time zones and original block carrier. No carrier API, no per-number limits. $0.50 per 1,000 numbers, platform usage included.

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

## Pricing

from $0.35 / 1,000 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Offline Format & Line Type

Validate, clean and enrich phone numbers in bulk, fully offline. Every number comes back as one JSON row: is it a valid number for its numbering plan, its E.164 and national formats, line type (mobile, fixed line, toll free, VoIP ...), country and region, time zones, and the carrier the number block was originally allocated to.

No carrier API, no HLR lookup, no proxy and no third-party request at runtime: validation runs against the Google libphonenumber metadata bundled in the actor image, so there is no per-number quota and no per-request latency. A default run validates 10,000 numbers in a couple of seconds.

### What you get

- `isValid` / `isPossible` plus the reason (`TOO_SHORT`, `TOO_LONG`, `INVALID_LENGTH`, `IS_POSSIBLE_LOCAL_ONLY` ...)
- `e164`, `international`, `national` and `rfc3966` formats, ready for a dialler, CRM or e-mail template
- `lineType`: `MOBILE`, `FIXED_LINE`, `FIXED_LINE_OR_MOBILE`, `TOLL_FREE`, `PREMIUM_RATE`, `SHARED_COST`, `VOIP`, `PERSONAL_NUMBER`, `PAGER`, `UAN`, `VOICEMAIL`, `UNKNOWN`
- `countryCode`, `countryName`, `countryCallingCode`, `nationalNumber`, `extension`
- `location` (city, area or country the prefix maps to), `timeZones`, `carrier`
- `status` per row: `valid`, `invalid`, `unparseable` or `error`, so a dirty list is easy to triage

### Input

```json
{
  "phoneNumbers": ["+44 7986 123456", "(213) 373-4253"],
  "defaultCountry": "US"
}
```

Numbers can come from three places, and they can be combined in one run:

1. `phoneNumbers`: one number per entry, international or national format.
2. `rawText`: any text. Every phone number found in it is validated, for example an e-mail signature, a chat log or a spreadsheet paste.
3. `inputFileUrl`: an http(s) URL to a `.txt` or `.csv` file (max 20 MB). The first column of each line is validated; a header row and blank lines are skipped. This is the cheap way to feed 100,000 numbers in one run.

`defaultCountry` (default `US`) is the country used for numbers written without a country code; numbers that start with `+` are unaffected. `outputLanguage` (default `en`) sets the language of `location`, `countryName` and `carrier`. `deduplicate` (default `true`) skips a number seen earlier in the run, comparing the cleaned E.164 value. `includeInvalid` (default `true`) keeps the diagnostic rows for invalid and unparseable entries; turn it off to keep only valid numbers. `maxNumbers` (default 10,000) caps the rows a run delivers.

If you leave `phoneNumbers`, `rawText` and `inputFileUrl` all empty, the run validates the two example numbers from the form instead of failing, so a quick test always returns real rows.

### Output

One row per number. These are real rows from the input above:

```json
{
  "input": "+44 7986 123456",
  "isParsed": true,
  "parseError": null,
  "isPossible": true,
  "possibleReason": "IS_POSSIBLE",
  "isValid": true,
  "isValidForDefaultRegion": false,
  "e164": "+447986123456",
  "international": "+44 7986 123456",
  "national": "07986 123456",
  "rfc3966": "tel:+44-7986-123456",
  "countryCode": "GB",
  "countryCallingCode": 44,
  "nationalNumber": "7986123456",
  "extension": null,
  "lineType": "MOBILE",
  "carrier": "EE",
  "location": "United Kingdom",
  "countryName": "United Kingdom",
  "timeZones": ["Europe/Guernsey", "Europe/Isle_of_Man", "Europe/Jersey", "Europe/London"],
  "isMobileNumberPortableRegion": true,
  "status": "valid",
  "error": null
}
```

```json
{
  "input": "(213) 373-4253",
  "isParsed": true,
  "parseError": null,
  "isPossible": true,
  "possibleReason": "IS_POSSIBLE",
  "isValid": true,
  "isValidForDefaultRegion": true,
  "e164": "+12133734253",
  "international": "+1 213-373-4253",
  "national": "(213) 373-4253",
  "rfc3966": "tel:+1-213-373-4253",
  "countryCode": "US",
  "countryCallingCode": 1,
  "nationalNumber": "2133734253",
  "extension": null,
  "lineType": "FIXED_LINE_OR_MOBILE",
  "carrier": null,
  "location": "Los Angeles, CA",
  "countryName": "United States",
  "timeZones": ["America/Los_Angeles"],
  "isMobileNumberPortableRegion": true,
  "status": "valid",
  "error": null
}
```

A number that parses but fails the numbering plan is still a real verdict, so it is delivered and charged:

```json
{
  "input": "+120012301",
  "isValid": false,
  "isPossible": false,
  "possibleReason": "TOO_SHORT",
  "lineType": "UNKNOWN",
  "timeZones": [],
  "status": "invalid"
}
```

A string that is not a phone number at all is delivered for free so you can find it in your list:

```json
{
  "input": "not a phone number",
  "isParsed": false,
  "parseError": "NOT_A_NUMBER: The string supplied did not seem to be a phone number.",
  "isValid": false,
  "status": "unparseable"
}
```

| Status | Meaning | Charged |
| --- | --- | --- |
| `valid` | Parsed and valid for its numbering plan | yes |
| `invalid` | Parsed but not a valid number for its country or prefix | yes |
| `unparseable` | Not a phone number at all (`parseError` says why) | no |
| `error` | The input itself could not be read (for example `inputFileUrl` failed, or a `phoneNumbers` entry was not a string). `error` says why | no |

Blank entries and duplicates are skipped entirely: no row and no charge.

### Pricing

**$0.50 per 1,000 numbers**, one `number-validated` event per delivered row that carries a verdict (`status` `valid` or `invalid`). Platform usage is included in the price.

- Free plan: $0.0005 per number, $0.50 per 1,000
- Bronze: $0.00045 per number, $0.45 per 1,000
- Silver: $0.0004 per number, $0.40 per 1,000
- Gold and above: $0.00035 per number, $0.35 per 1,000
- Unparseable strings, unreadable inputs, blank lines and duplicates are free
- The example input above costs $0.001

### How this compares

Free-plan list prices from Apify Store listings on 2026-11-23. For competitor platform usage, see each listing.

| Actor | Price per 1,000 numbers | Run start |
| --- | --- | --- |
| `subimpact/phone-number-validator` (this actor) | $0.50 | none |
| `memo23/phone-enrichment` | $1.00 | $0.005 |
| `automation-lab/phone-number-validator` | $1.15 | $0.0115 |
| `zhorex/phone-number-validator` | $2.00 | none |

Live-carrier and TCPA tools such as `checkthatphone/phone-validator` ($10.00 per 1,000) solve a different problem: they query carrier and litigator databases for the United States and Canada, which this offline validator does not do.

### Limits, in plain words

- `isValid` is numbering-plan validity: the number has the right length and prefix for its country. It is not a live reachability check and does not tell you whether the line is still in service.
- `carrier` is the carrier the number block was originally allocated to. Ported numbers keep the carrier of their original block, and mainland US/Canada numbers have no carrier data at all, so the field is `null` there.
- Line type for US/Canada numbers is often `FIXED_LINE_OR_MOBILE`, because those countries share number blocks between fixed and mobile services.
- No HLR, CNAM, owner name, e-mail, TCPA or litigator data. This actor never calls a carrier API.
- `timeZones` has one entry per zone that shares the prefix, up to four for shared calling codes such as +44. An unknown prefix gives an empty list rather than a made-up zone.
- `location` and `countryName` are only as detailed as libphonenumber's geocoding data, which is mostly city or region level. `outputLanguage` supports the languages that ship with libphonenumber; for a code it has no data for, `location`, `countryName` and `carrier` come back `null`.
- Numbering plans change. The actor pins the `phonenumbers` library (currently 9.0.44) and is rebuilt as new metadata is released, so a long-lived integration should re-run rather than cache verdicts forever.
- `inputFileUrl` is capped at 20 MB per run. Use `phoneNumbers` for small lists and the file URL (or several runs) for very large ones.

### Data and privacy

You supply the numbers and decide what they are used for; you are the data controller and this actor only processes the list you give it, inside your own Apify run and dataset. It does not store, enrich with owner data, or share your numbers with anyone. The only network request it can make is the download of your own `inputFileUrl`.

Run monitoring: failure alerts are on (the developer gets only the run ID and status, never your input or results).

Use it for lists you are allowed to process. Validating a number is not consent to call or message it.

# Actor input Schema

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

One number per entry, international ("+44 7986 123456") or national ("(213) 373-4253", needs the default country below). Blank entries are skipped. Numbers can also come from rawText or inputFileUrl; if all three sources are empty the two example numbers above are used so the run still returns rows.

## `rawText` (type: `string`):

Optional. A paragraph, e-mail signature or spreadsheet paste; every phone number found in it is validated. Numbers without a country code are read with the default country.

## `inputFileUrl` (type: `string`):

Optional. An http(s) URL to a .txt or .csv file (max 20 MB). The first column of each line is validated; lines without a digit, such as a header row, are skipped. A failed download returns one uncharged error row and the other inputs still run.

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

ISO 3166-1 alpha-2 code used for numbers written without a country code (default US). Ignored for numbers that already start with +.

## `outputLanguage` (type: `string`):

ISO 639-1 language code for location, countryName and carrier (default en). libphonenumber ships a fixed set of languages; for a code it has no data for, those three fields come back null.

## `deduplicate` (type: `boolean`):

Skip a number that already appeared earlier in the run, comparing the cleaned E.164 value (or the raw string when it cannot be parsed). Duplicates are neither delivered nor charged.

## `includeInvalid` (type: `boolean`):

Deliver a diagnostic row for numbers that fail the numbering plan (status invalid) or cannot be read as a number at all (status unparseable). Turn this off to keep only valid numbers in the dataset. Neither row type is charged.

## `maxNumbers` (type: `integer`):

Hard cap on rows delivered in one run, counting every delivered row. The default of 10,000 costs at most $5.00 in number-validated events; a default run on the example numbers costs $0.001.

## Actor input object example

```json
{
  "phoneNumbers": [
    "+44 7911 123456",
    "+1 213 373 4253"
  ],
  "defaultCountry": "US",
  "outputLanguage": "en",
  "deduplicate": true,
  "includeInvalid": true,
  "maxNumbers": 10000
}
```

# Actor output Schema

## `input` (type: `string`):

The number exactly as it was supplied

## `isParsed` (type: `string`):

True when the string could be read as a phone number

## `parseError` (type: `string`):

Why parsing failed (null when parsed)

## `isPossible` (type: `string`):

True when the number has a length that exists in the numbering plan

## `possibleReason` (type: `string`):

IS_POSSIBLE, TOO_SHORT, TOO_LONG, INVALID_LENGTH ...

## `isValid` (type: `string`):

True when the number matches the numbering plan for its country and prefix

## `isValidForDefaultRegion` (type: `string`):

True when the number is valid for the defaultCountry input

## `e164` (type: `string`):

Cleaned number in E.164 form

## `international` (type: `string`):

Number formatted for international display

## `national` (type: `string`):

Number formatted the way it is dialled inside its own country

## `rfc3966` (type: `string`):

tel: URI form

## `countryCode` (type: `string`):

ISO 3166-1 alpha-2 region of the number block

## `countryCallingCode` (type: `string`):

Country calling code without the plus

## `nationalNumber` (type: `string`):

National significant number

## `extension` (type: `string`):

Extension detected in the input

## `lineType` (type: `string`):

MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, TOLL_FREE ...

## `carrier` (type: `string`):

Carrier the number block was originally allocated to

## `location` (type: `string`):

City/area or country the prefix maps to

## `countryName` (type: `string`):

Country name in the output language

## `timeZones` (type: `string`):

IANA time zones for the number prefix

## `isMobileNumberPortableRegion` (type: `string`):

True when the country supports mobile number portability

## `status` (type: `string`):

valid | invalid | unparseable | error

## `error` (type: `string`):

Why the input could not be processed (error rows only)

# 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": [
        "+44 7911 123456",
        "+1 213 373 4253"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("subimpact/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": [
        "+44 7911 123456",
        "+1 213 373 4253",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("subimpact/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": [
    "+44 7911 123456",
    "+1 213 373 4253"
  ]
}' |
apify call subimpact/phone-number-validator --silent --output-dataset

```

## MCP server setup

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