Phone API Reference
2 routes. Base URL https://api.apifor.dev, authenticated with x-api-key. Failed calls are not charged. Overview, limits and sources are on the Phone number validation API page.
GET
/v1/phone1 creditOffline parse with libphonenumber metadata. 1 credit. No carrier or live line status.
| Parameter | In | Type | Rules |
|---|---|---|---|
| number * | query | string | max 64 chars |
| country | query | string | ISO 3166-1 alpha-2 · Default region for numbers written without +country code |
curl 'https://api.apifor.dev/v1/phone?number=%2B14155550132' \
-H 'x-api-key: YOUR_API_KEY'{
"success": true,
"data": {
"input": "+14155550132",
"valid": true,
"possible": true,
"reason": null,
"e164": "+14155550132",
"international": "+1 415 555 0132",
"national": "(415) 555-0132",
"country_code": "US",
"region_name": "United States",
"calling_code": "1",
"number_type": "fixed_line_or_mobile",
"timezones": [
"America/Adak",
"America/Anchorage"
],
"timezones_scope": "region"
},
"meta": {
"attribution": {
"source": "libphonenumber-js (metadata from Google libphonenumber)",
"license": "MIT; metadata Apache-2.0",
"license_url": "https://github.com/catamphetamine/libphonenumber-js/blob/master/LICENSE",
"source_url": "https://github.com/google/libphonenumber",
"attribution_page": "https://apifor.dev/docs/",
"notice": "Offline analysis. Not a live carrier or line-status check."
}
}
}200Analysis400Invalid input401Missing or invalid API key402Not enough credits429Rate limit reached
POST
/v1/phone/batch50 creditsSame analysis for up to 100 numbers. Flat 50 credits per call. Price note: flat, up to 100 numbers.
{
"numbers": [
"081234567890",
"+442079460958"
],
"country": "ID"
}curl -X POST 'https://api.apifor.dev/v1/phone/batch' \
-H 'content-type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{"numbers":["081234567890","+442079460958"],"country":"ID"}'{
"success": true,
"data": [
{
"input": "081234567890",
"valid": true,
"possible": true,
"reason": null,
"e164": "+6281234567890",
"international": "+62 812 3456 7890",
"national": "0812-3456-7890",
"country_code": "ID",
"region_name": "Indonesia",
"calling_code": "62",
"number_type": "mobile",
"timezones": [
"Asia/Jakarta",
"Asia/Jayapura"
],
"timezones_scope": "region"
},
{
"input": "+442079460958",
"valid": true,
"possible": true,
"reason": null,
"e164": "+442079460958",
"international": "+44 20 7946 0958",
"national": "020 7946 0958",
"country_code": "GB",
"region_name": "United Kingdom",
"calling_code": "44",
"number_type": "fixed_line",
"timezones": [
"Europe/London"
],
"timezones_scope": "region"
}
],
"meta": {
"total": 2,
"attribution": {
"source": "libphonenumber-js (metadata from Google libphonenumber)",
"license": "MIT; metadata Apache-2.0",
"license_url": "https://github.com/catamphetamine/libphonenumber-js/blob/master/LICENSE",
"source_url": "https://github.com/google/libphonenumber",
"attribution_page": "https://apifor.dev/docs/",
"notice": "Offline analysis. Not a live carrier or line-status check."
}
}
}200One result per number, in order400Invalid input401Missing or invalid API key402Not enough credits413Body over 64 KB429Rate limit reached