API Almanac
API reference › Validate

Parse and validate a phone number: E.164, national format, type and region

GET/v1/validate/phone

GET/v1/validate/phone

Parse and validate a phone number: E.164, national format, type and region

PARAMETERS
numberquery · stringREQUIRED
Number in any common format
e.g. (415) 555-2671
countryquery · string
Default region when the number has no + prefix
e.g. US
In the full reference
REQUEST
curl "https://api.apialmanac.com/v1/validate/phone?number=%28415%29+555-2671" \
  -H "X-API-Key: YOUR_KEY"
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"
}
Try it — sign in first
Runs on a sandbox key: 200 requests a month. Your real key is for production.