# Phone Number Validator API: Format, Type & Country (`tudorlane/phone-validate`) Actor

Validate and format phone numbers from any country: E.164, international and national formats, mobile/landline/VoIP type, country, region, original carrier and time zones. Google libphonenumber.

- **URL**: https://apify.com/tudorlane/phone-validate.md
- **Developed by:** [Tudor Lane](https://apify.com/tudorlane) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 phone checks

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 API: Format, Type & Country

### Use when…

- You need to check and format phone numbers (E.164) before saving, texting or calling.
- A CRM, sign-up or data-cleaning agent must tell mobile from landline or VoIP and find the country and time zone.
- You want bulk validation for a tiny per-number price, with no API key.

### Try this input

Copy-paste this JSON as the Actor input (it matches a successful run / the default schema):

```json
{
  "requests": [
    {
      "phone": "+44 20 7946 0958"
    },
    {
      "phone": "(415) 555-2671",
      "country": "US"
    },
    {
      "phone": "07911 123456",
      "country": "GB"
    }
  ]
}
```

### Sample output (real run 2026-10-27)

One dataset item, shortened:

```json
{
  "phone": "+44 20 7946 0958",
  "valid": true,
  "possible": true,
  "country_code": "GB",
  "calling_code": 44,
  "e164": "+442079460958",
  "international": "+44 20 7946 0958",
  "national": "020 7946 0958",
  "rfc3966": "tel:+44-20-7946-0958",
  "line_type": "fixed_line",
  "location": "London",
  "original_carrier": null,
  "…": "+4 more keys"
}
```

Clean up and check phone numbers from any country in bulk.

- Valid / possible for that country's numbering plan
- Formats: **E.164** (+447911123456), international, national, tel: URI
- Line type: mobile, fixed line, VoIP, toll-free, premium...
- Country, region/city (where the number plan shows it), original carrier, time zones
- Pass `country` for local-format numbers (07911 123456 + GB)

### Quick start

Leave the default input (it is prefilled) and click **Start**:

```json
{"requests": [{"phone": "+44 20 7946 0958"}, {"phone": "(415) 555-2671", "country": "US"}, {"phone": "07911 123456", "country": "GB"}]}
```

Send many items in `requests` per run (cheaper and faster than one run each).

### Sample output (real run, 26 Oct 2026, default input)

| phone | valid | country_code | e164 | national | line_type | location | original_carrier |
|---|---|---|---|---|---|---|---|
| +44 20 7946 0958 | true | GB | +442079460958 | 020 7946 0958 | fixed_line | London | |
| (415) 555-2671 | true | US | +14155552671 | (415) 555-2671 | fixed_line_or_mobile | San Francisco, CA | |
| 07911 123456 | true | GG | +447911123456 | 07911 123456 | mobile | Guernsey | JT |

Each row also has `possible`, `calling_code`, `international`, `rfc3966`, `timezones` and a `note`.

### Use cases

- Clean and standardise phone numbers to E.164 before saving them in a CRM.
- Check sign-up or order form numbers are real-looking for that country.
- Split mobiles from landlines before sending SMS.
- Add country and time zone to contact lists so calls happen at sensible hours.

### Pricing

Pay per event: **$0.001 per phone check** (one phone number parsed and validated). Rows with errors are not charged.

### Sources and licences

Google libphonenumber via the `phonenumbers` Python port (Apache 2.0).

### Notes

No live network lookup: carrier is the original range holder and the number may have been ported. Validity means the number fits the plan, not that it is switched on.

### FAQ

**Does it check the phone is switched on?** No. It checks the number fits the country's numbering plan. There is no live network lookup.

**Do I need an API key?** No.

**Local numbers like 07911 123456?** Add `country` (e.g. GB) so it knows which country to read them for.

### Limits & failure modes

- Valid means the number fits the plan, not that it is live or belongs to the person.
- Carrier is the original range holder; the number may have been ported.
- UK mobile ranges shared with the Crown Dependencies can show as Guernsey or Jersey (as in the sample).
- Location is only as precise as the number plan (often just the country for mobiles).

### Use from AI agents (MCP)

Add it to any MCP client via `https://mcp.apify.com?actors=tudorlane/phone-validate`, or call the Apify API / run-sync endpoint.

# Actor input Schema

## `requests` (type: `array`):

Phones as strings (with +country code) or {"phone": "...", "country": "GB"}. Max 5000. Errors are not charged.

## Actor input object example

```json
{
  "requests": [
    {
      "phone": "+44 20 7946 0958"
    },
    {
      "phone": "(415) 555-2671",
      "country": "US"
    },
    {
      "phone": "07911 123456",
      "country": "GB"
    }
  ]
}
```

# Actor output Schema

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

One item per request.

## `dataset` (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 = {
    "requests": [
        {
            "phone": "+44 20 7946 0958"
        },
        {
            "phone": "(415) 555-2671",
            "country": "US"
        },
        {
            "phone": "07911 123456",
            "country": "GB"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tudorlane/phone-validate").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 = { "requests": [
        { "phone": "+44 20 7946 0958" },
        {
            "phone": "(415) 555-2671",
            "country": "US",
        },
        {
            "phone": "07911 123456",
            "country": "GB",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tudorlane/phone-validate").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 '{
  "requests": [
    {
      "phone": "+44 20 7946 0958"
    },
    {
      "phone": "(415) 555-2671",
      "country": "US"
    },
    {
      "phone": "07911 123456",
      "country": "GB"
    }
  ]
}' |
apify call tudorlane/phone-validate --silent --output-dataset

```

## MCP server setup

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

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/10I0NDj08HXQHcE8a/builds/jz8DuB5FfXgoBnvkJ/openapi.json
