# Phone Number Validator — Bulk Check, Carrier & Line Type (`istmobot/phone-validator`) Actor

Validate and format phone number lists for 240+ countries. Input: phone numbers and an optional default country. Output: one row per number with validity, E.164 and national formats, country, line type (mobile, landline, VoIP, toll-free), original carrier, region and time zones.

- **URL**: https://apify.com/istmobot/phone-validator.md
- **Developed by:** [Istmobot](https://apify.com/istmobot) (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

from $0.40 / 1,000 phone numbers

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 Validation, Carrier & Line Type

Validate and clean a phone number list in seconds. Paste numbers in any format and get one row per number: **valid or not**, the **E.164 format** ready for your CRM or SMS tool, the **country**, the **line type** (mobile, landline, VoIP, toll-free), the **original carrier**, the **region** and the **time zones**. No API key, no monthly plan, no call or SMS is ever made.

### What is Phone Number Validator?

It checks each number against the official numbering plan of its country (240+ countries and territories):

1. **Parsing**: reads `+1 415 555 2671`, `0044 7911 123456`, `(415) 555-2671` or `tel:` links, with or without an extension.
2. **Validity**: is the length right, and does a real number range in that country match?
3. **Line type**: mobile, landline, VoIP, toll-free, premium rate and more.
4. **Carrier and region**: the operator the number range was assigned to, and the city or region for geographic numbers.
5. **Formats**: E.164, international, national and a `tel:` link.

Use it to:

- **Clean CRM and lead lists**: one standard format, no duplicates caused by spacing or prefixes.
- **Cut SMS costs**: send only to numbers that are valid and mobile.
- **Route calls by time zone**: call each lead during their working hours.
- **Catch bad sign-up data**: fake, too-short and mistyped numbers are flagged with the reason.
- **Screen for risk**: spot VoIP and premium-rate numbers.

### What data can I get?

| Field | Meaning |
|---|---|
| `input` | The number as you sent it |
| `valid` | `true` when the number matches a real range of its country |
| `possible` | `true` when only the length is right |
| `reason` | Why the number is not valid, in plain language |
| `e164` | Standard format, e.g. `+14155552671` |
| `international`, `national` | Display formats, e.g. `+1 415 555 2671` and `(415) 555-2671` |
| `uri` | Click-to-call link, e.g. `tel:+14155552671` |
| `countryCode`, `country` | `US`, `United States` |
| `callingCode`, `nationalNumber` | `+1` and `4155552671` |
| `extension` | Extension, when the input had one |
| `lineType` | `mobile`, `landline`, `landline_or_mobile`, `voip`, `toll_free`, `premium_rate`, `shared_cost`, `personal`, `pager`, `company`, `voicemail` |
| `isMobile` | `true`, `false`, or `null` when the country does not separate mobile and landline ranges |
| `carrier` | Operator the number range was assigned to |
| `location` | City or region of a geographic number |
| `timezones` | Time zones of the number, e.g. `["America/Los_Angeles"]` |

### How much does it cost?

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| `phone-validated` | $0.0005 per number, or **$0.50 per 1,000** |

Example: a list of 10,000 numbers costs about **$5**. Duplicates are validated and charged once. You can set a **maximum cost per run**; the Actor stops cleanly when it is reached.

### How to use Phone Number Validator

1. Click **Try for free**.
2. Paste your numbers (use **Bulk edit** for a list).
3. If some numbers have no country code, set the **default country**.
4. Click **Start**, then download the dataset as CSV, Excel or JSON.

### ⬇️ Input

```json
{
    "phoneNumbers": ["+1 415 555 2671", "0044 7911 123456", "6123-4567"],
    "defaultCountry": "PA"
}
```

| Field | Default | Description |
|---|---|---|
| `phoneNumbers` | required | Numbers in any common format. Commas, semicolons and new lines separate numbers |
| `defaultCountry` | none | 2-letter country code for numbers written without a country code, e.g. `US`, `GB`, `MX` |

### ⬆️ Output

```json
{
    "input": "+507 6123-4567",
    "valid": true,
    "possible": true,
    "reason": null,
    "e164": "+50761234567",
    "international": "+507 6123 4567",
    "national": "6123-4567",
    "uri": "tel:+50761234567",
    "countryCode": "PA",
    "country": "Panama",
    "callingCode": "+507",
    "nationalNumber": "61234567",
    "extension": null,
    "lineType": "mobile",
    "isMobile": true,
    "carrier": "Digicel",
    "location": null,
    "timezones": ["America/Panama"]
}
```

An invalid number still gets a row, with the reason:

```json
{
    "input": "+1 415 555",
    "valid": false,
    "possible": false,
    "reason": "Too short or too long for this country.",
    "e164": "+1415555",
    "countryCode": null,
    "lineType": null,
    "carrier": null
}
```

### Integrations & API

```bash
curl -X POST "https://api.apify.com/v2/acts/istmobot~phone-validator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phoneNumbers":["+1 415 555 2671","+44 7911 123456"]}'
```

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("istmobot/phone-validator").call(run_input={"phoneNumbers": ["+1 415 555 2671"]})
mobiles = [r["e164"] for r in client.dataset(run["defaultDatasetId"]).iterate_items() if r["valid"] and r["isMobile"]]
```

Connect it to Make, Zapier or n8n to validate new leads or sign-ups as they arrive.

### 🤖 Use with AI agents (MCP)

`https://mcp.apify.com?tools=istmobot/phone-validator`. Example prompt: "Validate these 300 phone numbers and give me the valid mobile ones in E.164 format."

### ❓ FAQ

**Does it call or text the number?** No. Validation uses each country's numbering plan. Nobody is contacted.

**Does `valid` mean the number is in service?** No. It means the number belongs to a real range of its country. Whether a subscriber has it today is only known to the operator.

**Is `carrier` the current operator?** It is the operator the range was assigned to. A number moved to another operator (number portability) still shows the original one.

**Why is `isMobile` empty for US and Canadian numbers?** Those countries use the same ranges for mobile and landline, so the type is `landline_or_mobile`.

**Why is `carrier` or `location` empty?** Carrier data covers mobile ranges in most countries; region data covers geographic (landline) numbers. Each is empty where it does not apply.

**My numbers have no country code.** Set `defaultCountry`. Numbers that start with `+` or `00` keep their own country.

**How many numbers per run?** Hundreds of thousands. Validation needs no network request, so a run takes seconds.

### Your feedback

Wrong result for a number? Open an issue on the **Issues** tab with the number and the result you expected.

# Actor input Schema

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

Numbers to validate, one per line, in any common format, e.g. "+1 415 555 2671", "0044 7911 123456" or "(415) 555-2671". Use Bulk edit to paste a list. Numbers without a country code need the default country below.

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

2-letter country code used for numbers written without a country code, e.g. US, GB, MX, DE. Leave empty when every number starts with "+" or "00".

## Actor input object example

```json
{
  "phoneNumbers": [
    "+1 415 555 2671",
    "+44 7911 123456",
    "+507 6123-4567",
    "+34 612 345 678",
    "+1 415 555"
  ]
}
```

# Actor output Schema

## `results` (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 415 555 2671",
        "+44 7911 123456",
        "+507 6123-4567",
        "+34 612 345 678",
        "+1 415 555"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("istmobot/phone-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 415 555 2671",
        "+44 7911 123456",
        "+507 6123-4567",
        "+34 612 345 678",
        "+1 415 555",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("istmobot/phone-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 415 555 2671",
    "+44 7911 123456",
    "+507 6123-4567",
    "+34 612 345 678",
    "+1 415 555"
  ]
}' |
apify call istmobot/phone-validator --silent --output-dataset

```

## MCP server setup

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