Parse, validate and get location information about a phone number.
Use this API to validate local and international phone numbers in any country.
You can determine the location of the number and also reformat the number into local and international dialing formats.
Note:
We can detect the line type (e.g. fixed or mobile) without the need to talk to the carrier network by analyzing the number prefix.
However, line type detection is not possible for all countries notably most of the
NANP region.
In cases where the number type returns "unknown" you can utilize an HLR Lookup
to get carrier level type detection as well as more detailed mobile device information.
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-code
no
string
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)
ip
no
string
Pass in a users IP address and we will assume numbers are based in the country of the IP address
API Response
Parameter
Type
Description
valid
boolean
Is this a valid phone number
type
string
The number type based on the number prefix. Possible values are:
mobile
fixed-line
premium-rate
toll-free
voip
unknown (use HLR lookup)
international-calling-code
string
The international calling code
international-number
string
The number represented in full international format (E.164)
local-number
string
The number represented in local dialing format
location
string
The phone number location. Could be the city, region or country depending on the type of number
country
string
The phone number country
country-code
string
The phone number country as an ISO 2-letter country code
country-code3
string
The phone number country as an ISO 3-letter country code
currency-code
string
ISO 4217 currency code associated with the country
is-mobile
boolean
True if this is a mobile number. If the number type is unknown this value will be false
prefix-network
string
The network/carrier who owns the prefix (this only works for some countries, use HLR lookup for global network detection)
API Performance
Characteristic
Value
Description
Avg Latency
15ms
Average RTT for requests within the same data center/region
Max Rate
500/second
Maximum inbound request rate. Exceeding this will result in request throttling
Max Concurrency
250
Maximum concurrent/simultaneous requests. Exceeding this will result in error code 06 [TOO MANY CONNECTIONS]