Loading
Our Phone Number Validation API verifies phone numbers and retrieves detailed metadata including carrier name, line type, geographic location, time zones, and multiple format standards. The API checks if numbers are valid according to international numbering plans, identifies whether they are mobile, landline, or VoIP, and returns standardized formats like E.164 and RFC3966. Use it to block fake signups with disposable numbers, clean contact lists before SMS campaigns, or verify user data during registration. Supports phone numbers from 200+ countries in both international and local formats.
Designed for seamless integration, the API accepts phone numbers in international format, local format with a two-letter country code, or IDD format (country exit codes like 00 or 011) with a dialer region. It returns carrier details, geographic location, and time zones in a single response. Whether you need to validate a phone number validator for user onboarding, a carrier lookup API for SMS routing, or a mobile carrier detector to flag VoIP and disposable numbers, our Phone Number Validation API provides reliable, real-time data in a single endpoint.
Need to verify phone numbers in batches? Check out the Bulk Phone Number Validation API to process up to 100 numbers per request.
Identify the telecom carrier associated with any phone number. Use carrier data to optimize SMS routing, estimate delivery costs, or flag numbers registered with carriers known for disposable and temporary lines.
Detect whether a number is mobile, landline, VoIP, toll-free, premium rate, or any other recognized classification. Filter out VoIP numbers commonly used for fake signups, prevent SMS delivery to landline numbers, and identify toll-free or premium rate numbers before placing calls.
Convert any phone number into four standardized formats: E.164 for storage and APIs, international for display, national for local use, and RFC3966 for tel: links in HTML. Normalize inconsistent user input into clean, uniform data.
Retrieve the country, city, or region associated with a number along with applicable IANA time zones. Use location data to schedule outreach at appropriate hours, detect geographic mismatches during fraud checks, or personalize user experiences.
Two levels of validation. The possible field confirms the number has a valid length and prefix structure. The valid field confirms it matches the country's official numbering plan. A number can be possible but not valid.
Validate phone numbers from 200+ countries with automatic country code detection. Accept numbers in international format with a + prefix or in local format paired with a two-letter country code.
$ pip install requests
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| number | Yes | String | - | Phone number to validate. Accepts international format (+923301112233), local format (03301112233) with region, or IDD format (00923301112233) with dialer_region. |
| region | No | String | - | Two-letter ISO country code indicating the country the number belongs to (e.g., US, GB, AU). Required when number is in local format without a + prefix. Cannot be used together with dialer_region. |
| dialer_region | No | String | - | Two-letter ISO country code indicating the country the number is being dialed from (e.g., AU, GB, US). Required when number uses an IDD exit code. Cannot be used together with region. |
Explore detailed response fields including field names, data types, requirements, and descriptions in the interactive Response Table. For complete response documentation click here.
| HTTP Status | Reasons |
|---|---|
| 400 | Invalid Parameters Provided - Please provide valid parameters. |
| 400 | Missing Number - The 'number' is required in Post Body and cannot be empty. |
| 400 | Missing Region Information - Provide the region explicitly (e.g. 'US') or include a '+' with the country code. |
| 400 | Invalid Number Format - The input does not match the expected structure of a phone number. |
| 400 | Number Too Short - The number is too short after removing the international dialing prefix. |
| 400 | Too Short National Number - The national number part is shorter than allowed for valid phone numbers. |
| 400 | Number Too Long - The phone number has more digits than any valid phone number can have. |
| 400 | Invalid Region Code - Region code must be a 2-letter ISO country code (e.g., 'US', 'GB'). |
| 400 | Multiple Region Codes Provided - Only one of 'region' or 'dialer_region' can be provided. Do not use both in the same request. |
| 500 | Internal Server Error - Internal Server Error Occurred. |
The simplest way to validate a phone number is to provide it in international format with a + prefix. The API automatically detects the country and validates against that country's numbering rules.
# Response { "raw_input": { "number": "+9221111124444" }, "possible": true, "valid": true, "country_prefix": 92, "national_number": 21111124444, "country_code": "PK", "location": "Pakistan", "time_zones": [ "Asia/Karachi" ], "line_type": "UAN", "formats": { "E164": "+9221111124444", "International": "+92 21 111 124 444", "National": "(021) 111 124 444", "RFC3966": "tel:+92-21-111-124-444" }, "ndc_length": 2, "can_be_internationally_dialled": true }curl -X 'POST' 'https://api.apifreaks.com/v1.0/phone/validation' -H 'Content-Type: application/json' -H 'X-apiKey: 997ed911600c4b8ea94f39183531437e' -d '{ "number": "+9221111124444" }'
To use the Phone Number Validation API, API credits are required. Charges apply only for successful queries, defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded.
For each successful request, 2 credit will be charged.
Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.