Validate Phone API
The Validate Phone API allows you to check whether a given phone number is valid and return its metadata.
From 4,450 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 285ms | 297ms | 327ms | 552ms | 1129ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/validatephone GET
https://api.api-ninjas.com/v1/validatephone
Returns metadata (including whether it is valid) for a given phone number.
Parameters
numberrequiredPhone number to check. If
countryis not set, the 3-digit country code prefix needs to be included.countryoptional2-letter ISO-3166 country code the phone number belongs to.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
validBoolean indicating whether the phone number is valid.
typePhone number type such as
mobile,landline, ortoll_free(if available).international_numberThe normalized international representation of the phone number (E.164 format).
country_codeThe ISO-3166 country code associated with the phone number.
carrierThe carrier / operator name when available.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/validatephone?number=%2B12065550100Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
{
"valid": true,
"type": "landline",
"international_number": "+12065550100",
"country_code": "US",
"carrier": "Level 3 Communications"
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/validatephone?number=%2B12065550100" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.