← Docs

Phone Number API

Validate and format a number. 245 countries and regions.

Check a phone number before you store it. Pass +14155552671 and get back phone, valid, country, plus national and international when it checks out.

A North American local number like (415) 555-2671 is detected from the area code. Other national formats take ?country=. Junk answers valid: false as a 200, never a 404. Everything here is computed locally and draws pooled requests only.

type is what the numbering plan says, so it never says voip — the network knows that. Same number, sibling endpoints: /carrier for who serves it, /caller for the name, /hlr for live status.

Validate

GET
api.parseapi.com/phone/{number}
Validate and format. Optional ?country= (ISO2) for national numbers
Explore
Parameters 3
numberstring · path · required

Phone number (E.164 preferred)

countrystring · query · optional

Default region for national formats without a leading +

deepboolean · query · optional

Numbering-plan state and timezone, when known. Included on every plan, with no additional charge.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.phone("+14155552671");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "phone": "+14155552671",
  "valid": true,
  "country": "US",
  "type": "unknown",
  "national": "(415) 555-2671",
  "international": "+1 415 555 2671"
}

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.phone("555-0100");
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "phone": null,
  "valid": false,
  "country": null,
  "type": null,
  "national": null,
  "international": null
}

Response fields

phone
Normalized number (+ country code, no spaces), or null if invalid
valid
Number is valid
country
ISO 3166-1 alpha-2 country
type
mobile | landline | toll_free | unknown, what the numbering plan says. The network's word (voip) lives on /carrier
national
National formatting
international
International formatting

Deep

?deep=true Numbering-plan state and timezone, when known. Included on every plan, with no additional charge.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.phone("+14155552671", { deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "phone": "+14155552671",
  "valid": true,
  "country": "US",
  "type": "unknown",
  "national": "(415) 555-2671",
  "international": "+1 415 555 2671",
  "deep": {
    "state": "CA",
    "state_name": "California",
    "timezone": "America/Los_Angeles"
  }
}

Deep fields

deep.state
State/province code from the area code (NANP), else null
deep.state_name
State/province name from the area code (NANP), else null
deep.timezone
IANA timezone id from the numbering plan, else null. Zone of the number, not the handset

Build with Phone

All tutorials →

Questions? Email