The `vonage-number-insight` package provides Python access to Vonage's Number Insight API, allowing users to retrieve real-time intelligence about phone numbers at basic, standard, and advanced levels. While currently functional, the Vonage Number Insight API is scheduled for sunset on February 4, 2027, with migration encouraged to the Vonage Identity Insights API. The library's current version is 1.0.7 and it's typically updated in conjunction with the main Vonage Python SDK.
pip install vonage-number-insight vonageVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to perform a basic Number Insight request. It initializes the Vonage client using API credentials, ideally sourced from environment variables, and then calls the `basic_number_insight` method with a `BasicInsightRequest` object. The response is printed in JSON format. For advanced insights, asynchronous requests via webhooks are recommended.
Review the Vonage Number Insights Transition Guide and migrate to the Vonage Identity Insights API. This will likely involve using a different library or a different part of the main `vonage` SDK.
Implement webhook handlers and use `AdvancedAsyncInsightRequest` with a `callback` URL when performing advanced number insight lookups.
Set the `cnam=True` parameter in `StandardInsightRequest` or `AdvancedInsightRequest` only when explicitly needed for US numbers, and be aware of potential extra costs and limitations.
Ensure numbers are correctly formatted or provide the `country` parameter in the request object (e.g., `BasicInsightRequest(number='79111234567', country='GB')`).