Welcome to Nexmo Developer

We are improving our Documentation, API references, learning resources & tooling to help you more effectively use our services. We want to help you find everything you need to integrate Nexmo APIs into your code.

As we start this transition, we’d love to hear from you with thoughts & suggestions. If you’ve got something, positive or negative, to tell us, please tell us using the feedback tool at the bottom of each guide or file an issue on GitHub. - Nexmo

Number Insight Basic

You can use Nexmo's Number Insight Basic API to retrieve local and international representations of a phone number by doing semantic checks on the number you submit. This can help you normalise and consistently print numbers in your user interface and gives you information to help you decide if a phone number accept the phone number entered by your user, or ask them to check and correct it.

Number Insight Basic API is a free synchronous, easy-to-use RESTful web service. For any phone number you can:

  • Retrieve the international and local format.
  • Know the country where the number is registered.
curl -X "POST" "https://api.nexmo.com/ni/basic/json" \
-d "api_key=API_KEY" \
-d "api_secret=API_SECRET" \
-d "number=447700900000"

The response from the API contains the following data:

{
    "status": 0,
    "status_message": "Success",
    "request_id": "fcb1e9a2-db9c-4ea2-84be-4e60da45e187",
    "international_format_number": "447700900000",
    "national_format_number": "07700 900000",
    "country_code": "GB",
    "country_code_iso3": "GBR",
    "country_name": "United Kingdom",
    "country_prefix": "44"
}