HomeGuides › Phone Number Validation API

Phone Number Validation API

Regex cannot tell a valid phone number from a plausible-looking one, or format it correctly per country. A real validator can.

Send a number and get back validity, country, line type, and clean E.164, national, and international formatting in one JSON response.

Validate and format a number

curl
curl -G "https://phone-number-validator15.p.rapidapi.com/phone/validate" \
  --data-urlencode "number=+14155552671" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: phone-number-validator15.p.rapidapi.com"
JavaScript (fetch)
const res = await fetch(
  "https://phone-number-validator15.p.rapidapi.com/phone/validate?number=" + encodeURIComponent("+14155552671"),
  { headers: {
      "X-RapidAPI-Key": "YOUR_KEY",
      "X-RapidAPI-Host": "phone-number-validator15.p.rapidapi.com",
  } }
);
const result = await res.json();

What the response tells you

You get whether the number is valid and possible, the detected country and region, the line type (mobile, fixed line, VoIP, or toll-free where known), and the number formatted as E.164, national, and international.

Tips for accuracy

Pass numbers in E.164 (a leading + and country code) when you can — that removes ambiguity. If you only have a national number, also pass the country so the validator knows how to parse it.

Run it in production

Phone Number Validator has a permanent free tier — 1,000 requests a month, no credit card. Paid plans start at $5/month for 100,000 requests.

Get a free API key on RapidAPI ↗

Full endpoint reference →

FAQ

What powers the validation?

It is built on libphonenumber, the same dataset Google uses, so country rules and formats stay current.

Do I need the + country code?

It is recommended. Without it, supply the country/region so the number can be parsed unambiguously.

Can it detect mobile vs landline?

Yes, where the numbering plan makes that distinction available.