GET/v1/validate/phone
Parse and validate a phone number: E.164, national format, type and region
PARAMETERS
- numberquery · stringREQUIRED
- Number in any common formate.g. (415) 555-2671
- countryquery · string
- Default region when the number has no + prefixe.g. US
REQUEST
curl "https://api.apialmanac.com/v1/validate/phone?number=%28415%29+555-2671" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/validate/phone?number=%28415%29+555-2671", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/validate/phone?number=%28415%29+555-2671", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"input": "(415) 555-2671",
"valid": true,
"possible": true,
"e164": "+14155552671",
"international": "+1 415 555 2671",
"national": "(415) 555-2671",
"rfc3966": "tel:+14155552671",
"country": "US",
"country_calling_code": "1",
"national_number": "4155552671",
"type": "FIXED_LINE_OR_MOBILE"
}