1. Services
  2. Phone

Phone number validation API

Check a phone number and get it back in E.164 and local format, with its country, line type and time zones. It runs on libphonenumber metadata and never calls a carrier.

GET /v1/phone1 creditAbout $0.001

Try it

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."
    }
  }
}

A real response from our OpenAPI file, with long lists and strings shortened.

Endpoints and price

EndpointCreditsAbout
GET /v1/phone1 credit$0.001
POST /v1/phone/batch (flat, up to 100 numbers)50 credits$0.05

USD at Starter pack prices ($5 for 5,000 credits). Calls that fail before work starts are refunded.

Limits

  • No carrier name and no live line status. That needs an HLR lookup, which this is not.
  • Time zones list every zone in the number's country, not narrowed by area code.
  • Batch: up to 100 numbers for a flat 50 credits.

Questions

Does it tell me if a number is in use?

No. It checks the number against numbering plans. Whether a line is active needs a carrier lookup.

Can I check a list?

POST up to 100 numbers to /v1/phone/batch for 50 credits. It pays off above 50 numbers.

What if the number has no country code?

Pass country with an ISO code, for example country=ID, and we read it in that country's format.

Other services