# Phone Number Validator - Bulk Format & Line Type (`darikami/phone-number-checker`) Actor

Validate phone numbers in bulk before you import or text them. Each number gets a verdict, its country, its line type by number range and 3 formats: E.164, international and national. Offline with Google's libphonenumber metadata: no call, no carrier lookup. USD 1 per 1,000 numbers.

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

## Pricing

$1.00 / 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 Format & Line Type

**Check a column of phone numbers before you import it or send a message.** Each number gets a verdict, its country, its line type and 3 formats, from Google's libphonenumber metadata.
The main fields are `valid`, `possible`, `country`, `type` (mobile, fixed line and others), `e164`, `international` and `national`. It runs offline: it checks the number's pattern. It does not call the number and does not look up a carrier.
**USD 0.001 per number (USD 1 per 1,000).** Every input is a charged row, also an invalid number, text that is no number, and a number that needs `defaultCountry`. The note that maxResults stopped a run is free.
Input: a list of numbers and a country for numbers without `+`, for example `{"phoneNumbers": ["+41 44 668 18 00", "079 123 45 67"], "defaultCountry": "CH"}`.

| Input | Valid | E.164 | Country | Line type |
|---|---|---|---|---|
| +41 44 668 18 00 | yes | +41446681800 | CH | FIXED_LINE |
| 079 123 45 67 | yes | +41791234567 | CH | MOBILE |
| +1 650 253 0000 | yes | +16502530000 | US | FIXED_LINE_OR_MOBILE |
| 12345 | no | +4112345 | CH | - |
| hello | no | - | - | - |

The rows come from a real cloud run of 2026-11-08 with the default country CH. The full item is under Output.

### Who uses it

- **Lead and CRM lists:** drop numbers that cannot be real, and write the rest in one format (E.164).
- **SMS and call preparation:** separate mobile numbers from fixed lines before a campaign.
- **Forms and imports:** check a column of numbers from a file in one run.

### What it does not do

- It does not call, text or look up a number. It cannot tell whether a number is in use, who owns it, the carrier, or where the phone is.
- `valid` means the number fits the numbering plan of its region. A valid number can be unassigned.
- The line type is the plan's class for the number range. `FIXED_LINE_OR_MOBILE` means the plan does not separate the two, and a number that moved to another carrier keeps its range.
- For an invalid number, the formats show how the library reads the input, not a real number. Use `valid` first.
- Numbers without a country code need `defaultCountry`. Without it they come back with the error "the country or calling code is not known".

### Input

```json
{
  "phoneNumbers": ["+41 44 668 18 00", "079 123 45 67", "12345"],
  "defaultCountry": "CH",
  "maxResults": 10000
}
```

| Field | What it does |
|---|---|
| `phoneNumbers` | The numbers to check. Duplicates and empty entries are skipped. Up to 100,000. |
| `defaultCountry` | Two-letter country code for numbers written without a country code. |
| `maxResults` | The run checks at most this many numbers. Default 10,000. |

### Output

One item per number:

```json
{
  "input": "+41 44 668 18 00",
  "valid": true,
  "possible": true,
  "lengthProblem": null,
  "e164": "+41446681800",
  "international": "+41 44 668 18 00",
  "national": "044 668 18 00",
  "rfc3966": "tel:+41446681800",
  "country": "CH",
  "countryCallingCode": "41",
  "nationalNumber": "446681800",
  "extension": null,
  "type": "FIXED_LINE",
  "error": null,
  "source": "libphonenumber-js (Google libphonenumber metadata)"
}
```

- `possible`: the length fits some number of the region. `lengthProblem` names `TOO_SHORT`, `TOO_LONG` or another length reason.
- `error` holds the reason when the text cannot be read as a number. Then `valid` is `false`.
- The input is cut at 40 characters in the row.

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| `row` | **USD 0.001** | one phone number checked and pushed to the dataset |

Free: the note that maxResults stopped the run.
1,000 numbers cost USD 1.
You pay no more than the maximum charge that you set for a run.

### Personal data

- The actor processes only the numbers that you send. It looks nothing up and stores nothing outside your run's dataset.
- A phone number can be personal data. You are responsible for having a lawful basis to process the numbers that you send.

### Data source and terms

- **Source:** the library `libphonenumber-js` 1.13.15 (MIT licence), built on Google's libphonenumber metadata (Apache 2.0). The metadata changes when countries change their numbering plans, so a result is as current as this version.
- The actor makes no network request. It is provided without warranty.

**More official-data actors by darikami:** [European company registers](https://apify.com/darikami/european-company-registers) · [SEC company fundamentals](https://apify.com/darikami/sec-company-fundamentals) · [Swiss UID validator](https://apify.com/darikami/swiss-uid-validator) · [French company search](https://apify.com/darikami/french-company-search).
In an AI agent: ask the Apify MCP server (`mcp.apify.com`) for `darikami/phone-number-checker`.

# Actor input Schema

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

The numbers to check, one per entry, with or without the country code. Up to 100,000.

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

Two-letter country code (CH, DE, US) for numbers written without a country code. Empty: such numbers are not read.

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

The run checks at most this many numbers.

## Actor input object example

```json
{
  "phoneNumbers": [
    "+41 44 668 18 00",
    "079 123 45 67",
    "12345"
  ],
  "defaultCountry": "CH",
  "maxResults": 10000
}
```

# Actor output Schema

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

One item per number: input, valid, possible, formats, country, line type.

## `summary` (type: `string`):

SUMMARY record: pushed, charged, attempts, errors, stoppedByBudget, ok, message.

## `stats` (type: `string`):

STATS record: numbers, checked, valid, invalid, emitted, charged.

# 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": [
        "+41 44 668 18 00",
        "079 123 45 67",
        "12345"
    ],
    "defaultCountry": "CH"
};

// Run the Actor and wait for it to finish
const run = await client.actor("darikami/phone-number-checker").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": [
        "+41 44 668 18 00",
        "079 123 45 67",
        "12345",
    ],
    "defaultCountry": "CH",
}

# Run the Actor and wait for it to finish
run = client.actor("darikami/phone-number-checker").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": [
    "+41 44 668 18 00",
    "079 123 45 67",
    "12345"
  ],
  "defaultCountry": "CH"
}' |
apify call darikami/phone-number-checker --silent --output-dataset

```

## MCP server setup

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

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/zNKEycXb7GhLx4HfL/builds/2NqYbnN0gmzmEh1TK/openapi.json
