← Docs

Phone API

Validate and format a number. E.164 preferred.

Validate and format a phone number. Pass something like +14155552671 or (415) 555-2671. Prefer E.164 with a leading +. You get valid, e164, country, and national / international display strings when it checks out.

National numbers without a + need ?country= (ISO2), like ?country=US. URL-encode +, spaces, and parentheses. Format and validity only.

Validate

GET
api.parseapi.com/phone/{number}
Validate and format. Optional ?country= (ISO2) for national numbers. Paid deep adds type and region
curl "https://api.parseapi.com/phone/%2B14155552671" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "valid": true,
  "e164": "+14155552671",
  "country": "US",
  "national": "(415) 555-2671",
  "international": "+1 415-555-2671"
}

Response fields

valid
Number is valid
e164
E.164 form (+…), or null if invalid
country
ISO 3166-1 alpha-2 country
national
National formatting
international
International formatting

Deep

Paid. Line type (mobile, landline, toll_free, or unknown) and a state or province hint from the area code (US and Canada only) when known. Free omits the deep object.

curl "https://api.parseapi.com/phone/%2B14155552671?deep=true" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "valid": true,
  "e164": "+14155552671",
  "country": "US",
  "national": "(415) 555-2671",
  "international": "+1 415-555-2671",
  "deep": {
    "type": "landline",
    "state": "CA",
    "state_name": "California"
  }
}

Deep fields

deep.type
mobile | landline | toll_free | unknown
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

Questions? Email