How to Get Advanced Number Insights Within an ASP.NET App

Published May 25, 2018 by Rabeb Othmani

This is the fourth article in a step-by-step series on how to use Nexmo’s Number Insight API within an ASP.NET web application.

In the first article, we walked through everything we need to know about Number Insight API, setting up the ASP.NET application and getting ready to explore how to get insights about a phone number.
In the second article, we covered Number Insight Basic API and how to use it.
The third article was dedicated to Number Insight Standard API.

In this article, we will have a deep dive into Number Insight Advanced API.

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

Hands on code

In NumberInsightController.cs, let’s start by creating the method that would allow the navigation to the advanced insights view.

then add the view Advanced.cshtml to the NumberInsight views folder.

This view will serve as a placeholder for the user to enter a phone number.

In order to get advanced insights about that phone number, we will add another method to ‘NumberInsightController.cs’ with a string parameter representing the phone number and make a call to Number Insight Advanced API.

Notice that after fetching the insights, we need to publish them to the user.
We are going to create an AdvancedResults method in the controller and a AdvancedResults.cshtml view for that matter.

Now, let’s run the app and make a call to Number Insight advanced API.
You can use one of the Nexmo numbers provided for testing.


In this article, we learnt how to use Nexmo’s Number Insight Advanced API to retrieve advanced insights about a phone number. Then we showed this information on a view within an ASP.NET application.

Nexmo Number Insight getting started guide for ASP.NET

Leave a Reply

Your email address will not be published.

Get the latest posts from Nexmo’s next-generation communications blog delivered to your inbox.

By signing up to our communications blog, you accept our privacy policy , which sets out how we use your data and the rights you have in respect of your data. You can opt out of receiving our updates by clicking the unsubscribe link in the email or by emailing us at