Phone Validation API - Carrier Lookup, Line Type Detection & Location Data
Every fake signup that slips through costs you twice: once in fraud exposure, and again in SMS spend on numbers that will never receive a message. The Phone Validation API checks any number against the latest international numbering plans in real time, before it enters your database. Each call returns validity at two levels, the carrier name, the line type down to VoIP, toll-free, and premium-rate classifications, the geographic location with its time zones, and the number in four standardized formats. It's built for trust-and-safety engineers blocking fake registrations, developers who need a phone number validation API inside their signup flow, and teams cleaning contact lists before SMS campaigns. Start with 10,000 free credits - no credit card, and credits are only charged on successful responses.
Features
Two-Level Number Verification
Every response separates structural plausibility from actual validity. The possible field confirms the number has a workable length and prefix; the validfield confirms it matches the country's official numbering plan. A number can be possible but not valid - a distinction most single-flag phone number verification APIs miss. Use valid as your acceptance gate at registration and possible to give users a chance to correct typos before rejecting outright.
Carrier Lookup
The carrier field returns the telecom operator associated with a number, where available. Use it as a carrier lookup API to estimate SMS routing costs, segment lists by network, or flag operators known for disposable and temporary lines. Carrier data is numbering-plan based, so recently ported numbers may show their original operator - treat it as a routing signal, not a live network check.
Line Type Detection
The line_type field classifies numbers into twelve categories: MOBILE, FIXED_LINE, FIXED_LINE_OR_MOBILE, VOIP, TOLL_FREE, PREMIUM_RATE, SHARED_COST, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL, and UNKNOWN. Filter VoIP numbers commonly used for fake signups, stop SMS sends to fixed lines before they fail, and catch premium-rate numbers before your dialer places an expensive call.
Four Output Formats
The formats object returns every number four ways: E164 for storage and API calls, International for display, National for local dialing, and RFC3966 for tel: links in HTML and SIP applications. Normalize whatever your users type - spaces, dashes, brackets, missing country codes - into one canonical representation before it touches your database.
Geolocation & Time Zones
Each response includes country_code, country_prefix, location (city or region where applicable), and a time_zonesarray of IANA identifiers - plural, because numbers in countries spanning multiple zones return every possibility. Schedule outreach inside legal calling windows, localize onboarding, or cross-check a phone's origin against a user's claimed address during fraud review.
International Coverage & Dialability
Validate numbers from 200+ countries. Send E.164 input with a + prefix for automatic country detection, or pair local input with a two-letter region code. The can_be_internationally_dialled field flags short codes, emergency numbers, and domestic-only services, and ndc_length plus area_code_lengthexpose the number's routing structure for telecom-grade parsing.
Built for These Use Cases
Block fake signups at registration
Gate account creation on a real-time validation call and reject numbers that fail structural checks or resolve to VoIP services - the line type behind most throwaway registrations. Pair it with the Email Checker API to verify both contact fields in the same signup flow, so fraudulent accounts never reach your database.Clean contact lists before SMS campaigns
Run your list through validation before a send and drop invalid numbers and fixed lines that can't receive texts. Every removed number is a delivery failure you don't pay for. For lists of any real size, the Bulk Phone Validation API applies the same checks to batches with per-number error handling.Normalize CRM phone data
User-entered numbers arrive in every imaginable shape. Convert each one to a single machine-readable storage format on the way in, and duplicates, broken click-to-call links, and failed integrations with dialers and messaging platforms largely disappear.
Time outreach by the number's clock, not yours
Every validated number comes back with its possible time zones, so your dialer or campaign scheduler can hold calls and messages until they land inside the recipient's acceptable hours - a compliance requirement in many markets, not just a courtesy.
API Endpoint
$ pip install requestsimport requests
import json
url = "https://api.apifreaks.com/v1.0/phone/validation"
payload = json.dumps({
"number": "+14155552671"
})
headers = {
'Content-Type': 'application/json',
'X-apiKey': 'API-KEY'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
How-To-Guides
Validate a Phone Number
Before a new account, order, or lead enters your system, one call tells you whether its phone number is real. Send the number in E.164 format and read valid in the response - everything else, from carrier to formats, arrives in the same payload.
# Response { "raw_input": { "number": "+14155552671" }, "possible": true, "valid": true, "country_prefix": 1, "national_number": 4155552671, "country_code": "US", "location": "San Francisco, CA", "time_zones": [ "America/Los_Angeles" ], "line_type": "FIXED_LINE_OR_MOBILE", "formats": { "E164": "+14155552671", "International": "+1 415-555-2671", "National": "(415) 555-2671", "RFC3966": "tel:+1-415-555-2671" }, "area_code_length": 3, "ndc_length": 3, "can_be_internationally_dialled": true }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/phone/validation' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: YOUR_API_KEY' \ -d '{ "number": "+14155552671" }'
Validate a National-Format Number
Country-specific forms collect numbers the way locals write them - no +, no country code. Pass the raw local input together with a two-letter region code and the API resolves the numbering plan for you, so you can validate phone numbers exactly as users type them.
# Response { "raw_input": { "number": "(415) 555-2671", "region": "US" }, "possible": true, "valid": true, "country_prefix": 1, "national_number": 4155552671, "country_code": "US", "location": "San Francisco, CA", "time_zones": [ "America/Los_Angeles" ], "line_type": "FIXED_LINE_OR_MOBILE", "formats": { "E164": "+14155552671", "International": "+1 415-555-2671", "National": "(415) 555-2671", "RFC3966": "tel:+1-415-555-2671" }, "area_code_length": 3, "ndc_length": 3, "can_be_internationally_dialled": true }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/phone/validation' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: YOUR_API_KEY' \ -d '{ "number": "(415) 555-2671", "region": "US" }'
Filter VoIP and Toll-Free Numbers Before an SMS Send
An SMS blast to a list full of VoIP and fixed-line numbers burns budget on messages that never arrive. Validate each number first and gate the send on line_type: allow MOBILE and FIXED_LINE_OR_MOBILE, skip VOIP, FIXED_LINE, and TOLL_FREE, and quarantine PREMIUM_RATE entirely.
# Response line_type: "TOLL_FREE" -> exclude from SMS sendcurl -X 'POST' \ 'https://api.apifreaks.com/v1.0/phone/validation' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: YOUR_API_KEY' \ -d '{ "number": "+18005551234" }'
Normalize Numbers to E.164 for Storage
Databases holding five versions of the same number break deduplication and dialer integrations. Validate on write and store the E164 value from the formats object as your canonical key - keep National for display and RFC3966 for tel: links.
# Response Store formats.E164 ("+14155552671") as the canonical valuecurl -X 'POST' \ 'https://api.apifreaks.com/v1.0/phone/validation' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: YOUR_API_KEY' \ -d '{ "number": "415-555-2671", "region": "US" }'
Frequently Asked Questions
A single request returns possible and valid flags, country_prefix, national_number, country_code, carrier (where available), location, a time_zones array, line_type, the four-entry formats object (E164, International, National, RFC3966), area_code_length, ndc_length, and can_be_internationally_dialled. Everything arrives in one payload - there are no separate paid data packages for carrier or line type.
possible confirms the number has a plausible length and prefix structure. validconfirms it matches the country's official numbering plan. A number can be possible but not valid - useful for distinguishing a typo from a fabricated number in your error handling.
International format with a + prefix, which triggers automatic country detection, or local format paired with a two-letter region country code. An optional dialer_region parameter sets the dialing origin for dialability checks.
Yes. The carrier field returns the operator name where available and line_type classifies the number into one of twelve categories, including VOIP, TOLL_FREE, and PREMIUM_RATE. Note that carrier data is numbering-plan based and may not reflect ported numbers.
This endpoint validates one number per request and is built for real-time checks at signup or point of entry. The Bulk Phone Validation API processes batches in a single call with per-number error handling, which suits list cleaning and migrations. Both return the same validation data.
Pricing
To use the Phone 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.