API menu

Number Insight Documentation

Introduction

Nexmo is now called Vonage, but there are still references to Nexmo in our URLs, code snippets and message templates.

The Number Insight API provides details about the validity, reachability and roaming status of a phone number, as well as details on how to format the number properly in your application.

API specification

Test the API on SwaggerHub

Base URL

https://api-prd.kpn.com/communication/nexmo/number-insight

Conceptual model

Documentation page Vonage number-insight-conceptual model

Definitions

Callback (WebHook)

A Callback or WebHook is an HTTP POST callback implemented by you, that can be called by another system when an event is triggered on that system to notify you. You will need to make the address of your webhook/callback known on the other system to make it work.

API workflow

Documentation page Vonage Number Insight API workflow

Features and constraints

Features

Feature   Basic   Standard   Advanced
Number format and origin   Y   Y   Y
Number type   N   Y   Y
Carrier and country   N   Y   Y
Ported   N   N   Y
IP match   N   N   Y
Validity   N   N   Y
Reachability   N   N   Y
Roaming status   N   N   Y
Roaming carrier and country   N   N   Y
US number caller name and type   N   Y   Y

Check the legislation in your country to ensure that you are allowed to save user roaming information.

Constraints

  • Only 1 phone number can be checked with each request.
  • Phone numbers are in E.164 format.

Getting started

Make sure you've read What's in it for you for more info on how to register and start testing APIs.

Authentication

The API follows the KPN Store API Authentication Standard to secure the API. It includes the use of OAuth 2.0 client_id and client_secret to receive an access token.

Go to the Authentication tab on top of this page to find out how to:

  • Authenticate to an API using cURL.
  • Authenticate to an API on Swaggerhub.
  • Import Open API Specifications (OAS), also called Swagger files into Postman.

How to...

Use Number Insight Basic

You can use Vonage'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 normalize and consistently print numbers in your user interface and give you information to help you decide whether you accept the phone number entered by your user, or ask them to check and correct it.

The 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.

SwaggerHub:

  1. Select POST /{level}.
  2. Click 'Try it out'.
  3. In the drop-down box level, select basic.
  4. In the number field, fill out the phone number.
  5. Click 'Execute'.
  6. Check the response code and message.

Postman:

  1. Select (POST) Number Insight - Basic.
  2. Click the Body section of the request and provide value for the number key.
  3. Click 'Send'.
  4. Check the response code and message.

Use Number Insight Standard

You can use Vonage's Number Insight Standard API to retrieve a user's landline or mobile number, including checking to see if it's registered to an operator. This can help you verify that a phone number is real and give you information on how to format the number.

The Number Insight Standard API is a 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.
  • Detect the line type (mobile/landline/virtual number/premium/toll-free).
  • Detect mobile country code (MCC) and mobile network code (MNC).
  • Detect if the number is ported.
  • Identify caller name (USA only).
  • Check if the phone number is reachable.

SwaggerHub:

  1. Select POST /{level}.
  2. Click 'Try it out'.
  3. In the drop-down box level, select standard.
  4. In the number field, fill out the phone number.
  5. Click 'Execute'.
  6. Check the response code and message.

Postman:

  1. Select (POST) Number Insight - Standard.
  2. Click the Body section of the request and provide value for the number key.
  3. Click 'Send'.
  4. Check the response code and message.

Use Number Insight Advanced

You can use Vonage's Number Insight Advanced API to retrieve a user's landline or mobile number, including checking to see if it's registered to an operator. This can help you verify that a phone number is real and give you information on how to format the number.

The Number Insight Advanced Async API is a 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.
  • Detect the line type (mobile/landline/virtual number/premium/toll-free).
  • Detect mobile country code (MCC) and mobile network code (MNC).
  • Detect if the number is ported.
  • Identify caller name (USA only) - see the CNAM guide for details.
  • Identify network when roaming.
  • Confirm that user's IP address is in the same location as their mobile phone.

Be aware that the Advanced API does not give any information about landlines that have not already been given by the Standard API. For number insights about landlines, you should use the Standard API.

SwaggerHub:

  1. Select POST /{level}.
  2. Click 'Try it out'.
  3. In the drop-down box level, select advanced
  4. In the number field, fill out the phone number.
  5. Click 'Execute'.
  6. Check the response code and message.

Postman:

  1. Select (POST) Number Insight - Advanced.
  2. Click the Body section of the request and provide value for the number key.
  3. Click 'Send'.
  4. Check the response code and message.

Use Number Insight Advanced Async

You can use Vonage's Number Insight Async API to retrieve a user's landline or mobile number, including checking to see if it's registered to an operator. This can help you verify that a phone number is real and give you information on how to format the number.

The Number Insight Advanced Async API is an asynchronous web service that returns data to a webhook. For any phone number you can:

  • Retrieve the international and local format.
  • Know the country where the number is registered.
  • Line type detection (mobile/landline/virtual number/premium/toll-free).
  • Detect mobile country code (MCC) and mobile network code (MNC).
  • Detect if the number is ported.
  • Identify caller name (USA only).
  • Identify network when roaming.
  • Confirm that user's IP address is in the same location as their mobile phone.

Be aware that the Advanced API does not give any information about landlines that have not already been given by the Standard API. For number insights about landlines, you should use the Standard API.

SwaggerHub:

  1. Select POST /advanced/async.
  2. Click 'Try it out'.
  3. In the number field, fill out the phone number.
  4. In the callback field, provide the URL of your webhook.
  5. Click 'Execute'.
  6. Check the response code and message.

Postman:

  1. Select (POST) Number Insight Advanced - Async.
  2. Click the Body section of the request and provide values for the number and callback key.
  3. Click 'Send'.
  4. Check the response code and message.
Response example
{ "status": 0, "status_message": "Success", "lookup_outcome": 0, "lookup_outcome_message": "Success", "request_id": "55a7ed8e-ba3f-4730-8b5e-c2e787cbb2b2", "international_format_number": "447700900000", "national_format_number": "07700 900000", "country_code": "GB", "country_code_iso3": "GBR", "country_name": "United Kingdom", "country_prefix": "44", "request_price": "0.03000000", "remaining_balance": "1.97", "current_carrier": { "network_code": "23410", "name": "Telefonica UK Limited", "country": "GB", "network_type": "mobile" }, "original_carrier": { "network_code": "23410", "name": "Telefonica UK Limited", "country": "GB", "network_type": "mobile" }, "valid_number": "valid", "reachable": "reachable", "ported": "not_ported", "roaming": { "status": "not_roaming" } }