Back to US Phone Validation

US Phone Validation API

Validate US phone numbers with carrier detection, line type, and geolocation data.

Overview

The US Phone Validation API provides real-time validation and enrichment for United States phone numbers. Submit a phone number and receive carrier information, line type classification, geographic location, and formatted output. All responses include a confidence score indicating reliability.

  • Real-time validation with carrier detection
  • Line type classification (mobile, landline, VoIP)
  • Geographic location by area code and prefix
  • Automatic formatting and normalization

Authentication

All API requests require a RapidAPI key passed via the request header. Subscribe to any plan on RapidAPI to receive your API key.

Header
X-RapidAPI-Key: your-api-key

Endpoints

POST /v1/phone/validate

Validates a US phone number and returns carrier, line type, and geolocation data.

Request

Send a POST request with a JSON body containing the phone number to validate.

ParameterTypeRequiredDescription
phonestringYesUS phone number (digits, with or without formatting)
Example Request Body
{
  "phone": "+12125550147"
}

Response

A successful validation returns a 200 status with the following JSON structure.

FieldTypeDescription
statusstringvalid or invalid
phonestringOriginal input phone number
formattedstringFormatted phone number (if valid)
carrierstring | nullWireless carrier name
locationstring | nullGeographic location (city, state)
line_typestring | nullLine type: mobile, landline, or voip
confidencenumberConfidence score (0.0 – 1.0)
Example Response (200 OK)
{
  "status": "valid",
  "phone": "+12125550147",
  "formatted": "+1 (212) 555-0147",
  "carrier": "Verizon Wireless",
  "location": "New York, NY",
  "line_type": "mobile",
  "confidence": 0.97
}

Error Codes

StatusCodeMessageDescription
400INVALID_PHONEInvalid phone number formatThe provided phone number could not be parsed
400MISSING_PARAMMissing required parameter: phoneNo phone number was provided in the request body
401UNAUTHORIZEDInvalid or missing API keyThe X-RapidAPI-Key header is missing or invalid
429RATE_LIMITRate limit exceededRequest limit for your plan has been reached
500INTERNAL_ERRORInternal server errorAn unexpected error occurred. Please try again.

Code Examples

cURL

curl --request POST \
--url https://frapi-phone-v1.p.rapidapi.com/v1/phone/validate \
--header 'X-RapidAPI-Key: your-api-key' \
--header 'Content-Type: application/json' \
--data '{"phone": "+12125550147"}'

Python

import requests url = "https://frapi-phone-v1.p.rapidapi.com/v1/phone/validate" headers = { "X-RapidAPI-Key": "your-api-key", "Content-Type": "application/json" } data = { "phone": "+12125550147" } response = requests.post(url, json=data, headers=headers) print(response.json())

JavaScript

const url = 'https://frapi-phone-v1.p.rapidapi.com/v1/phone/validate'; const options = { method: 'POST', headers: { 'X-RapidAPI-Key': 'your-api-key', 'Content-Type': 'application/json' }, body: JSON.stringify({ phone: '+12125550147' }) }; const response = await fetch(url, options); const data = await response.json(); console.log(data);

Rate Limits

Request limits depend on your subscription tier. Exceeding your limit returns a 429 status.

TierRequests / MonthRate Limit
Starter (Free)50010 req/min
Pro10,00060 req/min
Enterprise100,000300 req/min

Try It Out

Test the API right in your browser. No API key required.