Number Insight Basic

Effective February 4, 2027, Vonage will sunset Vonage Number Insights. To ensure uninterrupted support and to provide a more scalable and future-proof solution, we encourage you to migrate to our enhanced offering: Vonage Identity Insights API. The Vonage Identity Insights API consolidates multiple phone number-related datasets into a single, flexible API, allowing you to request real-time information about a phone number and retrieve any combination of insights - such as number formatting, carrier details, SIM Swap and Subscriber Match - in one call.

Please review the Number Insights Transition Guide, which provides detailed guidance on API differences, required changes, and best practices for a smooth transition.

Use the Vonage Number Insight Basic API to determine:

  • The country where a number is registered
  • The local and international representation of that number

This can help you present numbers to your users in the correct format for their locale.

Before attempting to run the code examples, replace the variable placeholders:

KeyDescription
VONAGE_API_KEY

Your Vonage API key (see it on your dashboard).

VONAGE_API_SECRET

Your Vonage API secret (also available on your dashboard).

INSIGHT_NUMBER

The number you want to retrieve insight information for.

Write the code

Add the following to ni-basic.sh:

curl "https://api.nexmo.com/ni/basic/json?api_key=$VONAGE_API_KEY&api_secret=$VONAGE_API_SECRET&number=$INSIGHT_NUMBER"

View full source

Run your code

Save this file to your machine and run it:

sh ni-basic.sh

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

For a description of each returned field and to see all possible values, see the Number Insights API documentation