v1

latestSwagger 2.02026-07-132830204.5 KB
Data Tools

Phone Validate

Parse, validate and get location information about a phone number

get/phone-validate

Query parameters

numberstring required

A phone number. This can be in international format (E.164) or local format. If passing local format you must also set either the 'country-code' OR 'ip' options as well

country-codestring

ISO 2-letter country code, assume numbers are based in this country. If not set numbers are assumed to be in international format (with or without the leading + sign)

ipstring

Pass in a users IP address and we will assume numbers are based in the country of the IP address

Response

OK

validboolean required

Is this a valid phone number

international-calling-codestring required

The international calling code

country-codestring required

The phone number country as an ISO 2-letter country code

locationstring required

The phone number location. Could be the city, region or country depending on the type of number

is-mobileboolean required

True if this is a mobile number. If the number type is unknown this value will be false

typestring required

The number type based on the number prefix. <br> Possible values are: <br> <ul> <li>mobile</li> <li>fixed-line</li> <li>premium-rate</li> <li>toll-free</li> <li>voip</li> <li>unknown (use HLR lookup)</li> </ul>

international-numberstring required

The number represented in full international format (E.164)

local-numberstring required

The number represented in local dialing format

countrystring required

The phone number country

country-code3string required

The phone number country as an ISO 3-letter country code

currency-codestring required

ISO 4217 currency code associated with the country

prefix-networkstring required

The network/carrier who owns the prefix (this only works for some countries, use HLR lookup for global network detection)

Example response

{
  "country": "New Zealand",
  "country-code": "NZ",
  "country-code3": "NZL",
  "currency-code": "NZD",
  "international-calling-code": "64",
  "international-number": "+6495552000",
  "is-mobile": false,
  "local-number": "09 555 2000",
  "location": "Auckland",
  "prefix-network": "",
  "type": "fixed-line",
  "valid": true
}