DEV Community

Alexey D
Alexey D

Posted on

Validate Phone Numbers Worldwide With One API Call

Phone number validation is harder than it looks. Format varies by country, carriers differ, and you need to know timezone, line type (mobile vs fixed), and operator.

Most solutions require heavy dependencies or expensive APIs. I built Phone Validator Pro — a lightweight REST API that validates any number and returns all the metadata you need.

What it returns

POST /validate

{
  "phone": "+1-212-555-2000",
  "country_code": "US"
}
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "is_valid": true,
  "is_possible": true,
  "international_format": "+1 212-555-2000",
  "national_format": "(212) 555-2000",
  "e164_format": "+12125552000",
  "country_code": 1,
  "country": "United States",
  "carrier": "Verizon",
  "line_type": "FIXED_LINE_OR_MOBILE",
  "timezones": ["America/New_York", "America/Chicago", ...]
}
Enter fullscreen mode Exit fullscreen mode

Quick start

Python

import requests

r = requests.post(
    "https://phone-validator-pro.p.rapidapi.com/validate",
    headers={"X-RapidAPI-Key": "YOUR_KEY"},
    json={"phone": "+79161234567", "country_code": "RU"}
)
print(r.json())
Enter fullscreen mode Exit fullscreen mode

Batch validation

Check 50 numbers in one call:

phones = [
    {"phone": "+12125552000", "country_code": "US"},
    {"phone": "+442071838750", "country_code": "UK"},
    {"phone": "+33123456789", "country_code": "FR"}
]

r = requests.post(
    "https://phone-validator-pro.p.rapidapi.com/batch",
    headers={"X-RapidAPI-Key": "YOUR_KEY"},
    json=phones
)
Enter fullscreen mode Exit fullscreen mode

Use cases

  • Lead validation — clean phone numbers before sales outreach
  • User signup — validate phone during registration
  • SMS campaigns — verify numbers before sending (prevent bounces)
  • Fraud detection — flag invalid or suspicious numbers
  • CRM enrichment — add carrier and timezone data to contacts
  • Global apps — validate numbers from 190+ countries

Pricing

Plan Price Limit
BASIC Free 50 req/hr
PRO $9.99/mo 1,000 req/hr
ULTRA $29.99/mo 10,000 req/hr

Try it

Phone Validator Pro on RapidAPI


Built for lead validation workflows where phone numbers come from 20+ countries and formats vary wildly.

Feedback welcome.

Top comments (0)