# Phone Number Validator: Bulk, Country, Mobile or Landline (`swiftkit/phone-check`) Actor

Validate and clean phone number lists: valid or not, country, mobile / landline / toll-free / VoIP, E.164 and international format, extensions and duplicates. 240+ countries, Google's libphonenumber data. CSV link input. Nothing is dialed.

- **URL**: https://apify.com/swiftkit/phone-check.md
- **Developed by:** [SwiftKit](https://apify.com/swiftkit) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.30 / 1,000 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, Country, Mobile or Landline

Clean a phone number list in seconds. For every number you get:

- **valid / possible / invalid**, and the reason (`too_short`, `too_long`, `unknown_country_code`…)
- **Country** and calling code
- **Line type:** mobile, landline, toll-free, premium rate, VoIP, shared cost…
- **Clean formats:** E.164 (`+14155552671`, what CRMs and SMS tools want), international,
  national and a `tel:` link
- **Extensions** split out (`ext. 12`)
- **Duplicates**: `090-1234-5678` and `+81 90 1234 5678` are the same number

It uses the numbering-plan data from Google's open-source **libphonenumber**, covering 240+
countries and regions. **No number is called, texted or looked up anywhere.** It's fast, cheap and
private.

### Who it's for

- **CRM and marketing ops:** normalize numbers to E.164 before importing or sending SMS.
- **Sign-up forms and lead lists:** catch typos and fake numbers like `12345`.
- **Sales teams:** separate mobile from landline numbers.
- **Developers and AI agents:** one call, consistent JSON.

### Input

- **Phone numbers:** one per line, in any common format.
- **Or a CSV link** (for example a Google Sheet published as CSV). Every phone-looking cell is used.
- **Default country** (optional): for numbers written without `+country code`, like `020 7946 0958`
  with `GB`.

### Output

```json
{
  "input": "090-1234-5678",
  "valid": true,
  "result": "valid",
  "reason": null,
  "e164": "+819012345678",
  "international": "+81 90 1234 5678",
  "national": "090-1234-5678",
  "countryCode": "JP",
  "country": "Japan",
  "callingCode": "+81",
  "type": "mobile",
  "extension": null,
  "uri": "tel:+819012345678",
  "isDuplicate": false
}
```

| result | meaning |
|---|---|
| `valid` | Right length and in a number range that's in use for that country. |
| `possible` | Right length, but in a range not assigned (yet). Often a typo. |
| `invalid` | Wrong length, unknown country code, or not a number. |

A `SUMMARY` record in the key-value store counts each result and the duplicates.

### Pricing

You pay **per number checked**. See the Pricing tab.

### Limits, honestly

- "Valid" means the number fits the country's official numbering plan. It does **not** mean the line
  is active or who owns it. Checking that needs a carrier lookup, which this tool doesn't do.
- Some countries don't separate mobile and landline ranges (the US and Canada, for example). Those
  numbers show `landline_or_mobile`.
- Numbers keep moving between carriers, so the carrier isn't reported.
- We process only the numbers you send and don't store or reuse them.

### More tools from SwiftKit

- [Email Validator](https://apify.com/swiftkit/email-check): clean email lists: MX, disposable, typos, duplicates
- [Website Contact Finder](https://apify.com/swiftkit/website-contacts): company socials, phones and shared inboxes from a website
- [WHOIS & Domain Expiry Checker](https://apify.com/swiftkit/domain-lookup): registrar, expiry, age and DNS for any domain

### Questions?

Open an issue on the Issues tab.

# Actor input Schema

## `phones` (type: `array`):

One per line, in any common format: +1 415 555 2671, (020) 7946 0958, 0044 7911 123456…

## `csvUrl` (type: `string`):

A link to a CSV or text file (e.g. a Google Sheet published as CSV). Every phone-looking cell is checked.

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

Two-letter code (US, GB, DE, JP…) used for numbers written without +country code, like 020 7946 0958.

## Actor input object example

```json
{
  "phones": [
    "+1 (415) 555-2671",
    "+44 20 7946 0958",
    "+49 1512 3456789",
    "12345"
  ]
}
```

# Actor output Schema

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

One row per number.

# 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 = {
    "phones": [
        "+1 (415) 555-2671",
        "+44 20 7946 0958",
        "+49 1512 3456789",
        "12345"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("swiftkit/phone-check").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 = { "phones": [
        "+1 (415) 555-2671",
        "+44 20 7946 0958",
        "+49 1512 3456789",
        "12345",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("swiftkit/phone-check").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 '{
  "phones": [
    "+1 (415) 555-2671",
    "+44 20 7946 0958",
    "+49 1512 3456789",
    "12345"
  ]
}' |
apify call swiftkit/phone-check --silent --output-dataset

```

## MCP server setup

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

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/DrfN8Cb8M6wPVfTSY/builds/gw3GfAJWKV3b8RvgU/openapi.json
