Lookup API helps you with phone number formatting and to retrieve additional information that will help you to increase the lead conversion for your business. As such, non-formatted numbers can become invalid, and the messages/calls will fail in such cases but using lookup API, you can avoid such scenarios by formatting the number before sending SMS/MMS messages or making voice calls. Please check the below prerequisites to get started with the Lookup API.
Sign up for a Plivo trial account.
Check out our server SDKs page and install the right helper based on the programming language you want to use.
Have a phone number you want to look up for.
Sign up for a Plivo Account
You can sign up with Plivo and start with a free trial account to experiment with and learn about our services. This free trial account comes with free credits. If you wish to continue with our service, you can add more credits and buy a number by clicking here. Add a number and credits to your account to test the full range of our voice and SMS service features.
Sign up here to get your free Plivo account today.
Follow these steps to sign up for a free trial account:
Sign up with your work email address
Check your inbox for an activation email from Plivo. Click on the link in the email to activate your account.
Enter your mobile number to complete the phone verification step.
Sign up with your work email address
If you have any issues creating a Plivo account, please reach out to our Support Team for help.
Looking Up a Number
Lookup allows you to obtain information about phone numbers. With Lookup, you can identify local number formats and reduce the likelihood of undelivered messages.
Plivo provides a simple API that allows you to lookup a phone number. Lookup requests cost $0.004 per request. It enables you to identify phone number types (mobile, fixed, VoIP and toll-free) and also the service provider of the phone number, including ported numbers(portability information limited to the US and CA).
<?phprequire'vendor/autoload.php';usePlivo\RestClient;$client=newRestClient("<auth_id>","<auth_token>");$client->client->setTimeout(40);// Numberlookup API Producttry{$response=$client->lookup->get("<your_number>");print_r($response);}catch(PlivoRestException$ex){print_r(ex);}
usingSystem;usingSystem.Collections.Generic;usingPlivo;usingPlivo.Exception;namespacetest_apps{classProgram{staticvoidMain(string[]args){varapi=newPlivoApi("auth_id","auth_token");// Number Look Up APItry{varresponse=api.Lookup.Get("your_number");Console.WriteLine(response);}catch(PlivoRestExceptione){Console.WriteLine("Exception: "+e.Message);}}}}