Phone All docs

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 credit

Offline parse with libphonenumber metadata. 1 credit. No carrier or live line status.

ParameterInTypeRules
number *querystringmax 64 chars
countryquerystringISO 3166-1 alpha-2 · Default region for numbers written without +country code
GET/v1/phone
curl 'https://api.apifor.dev/v1/phone?number=%2B14155550132' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "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."
    }
  }
}
  • 200Analysis
  • 400Invalid input
  • 401Missing or invalid API key
  • 402Not enough credits
  • 429Rate limit reached
POST/v1/phone/batch50 credits

Same analysis for up to 100 numbers. Flat 50 credits per call. Price note: flat, up to 100 numbers.

Request body · application/json
{
  "numbers": [
    "081234567890",
    "+442079460958"
  ],
  "country": "ID"
}
POST/v1/phone/batch
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"}'
Example response · 200
{
  "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 order
  • 400Invalid input
  • 401Missing or invalid API key
  • 402Not enough credits
  • 413Body over 64 KB
  • 429Rate limit reached

Error handling · Rate limits · Prices