DEV Community

Ing. Pablo Cueto
Ing. Pablo Cueto

Posted on

I Built a Phone Validation API — Live on RapidAPI published: true tags: python, fastapi, api, productivity

Validating phone numbers sounds simple until you realize regex won't tell you if a number is mobile, landline, or VoIP — or what country it belongs to.
I built Phone Validator Pro, a REST API that does all of that in a single request.

What it does:

Validates format (E.164, international, national)
Detects country, region and timezone
Identifies the carrier/operator
Detects line type: mobile, landline, VoIP, toll-free
Batch validation — up to 100 numbers per request

Example response
jsonGET /v1/validate/+14155551234

{
"is_valid": true,
"formats": {
"e164": "+14155551234",
"international": "+1 415-555-1234",
"national": "(415) 555-1234"
},
"country": {
"iso2": "US",
"name": "United States",
"calling_code": "+1",
"timezone": ["America/New_York"]
},
"line_type": "mobile",
"carrier": { "name": "T-Mobile", "available": true }
}

Stack

FastAPI + Python 3.12
Google's libphonenumber for validation
Deployed on Render
Monetized via RapidAPI

Try it free
No credit card required. The free tier gives you 100 requests/month to test it in your project.
rapidapi.com/PabsCueto/api/phone-validator-pro1

Top comments (0)