Phone Lookup API
The Phone Lookup API returns line intelligence for a phone number — carrier, line type, VOIP status, and MCC/MNC — worldwide, sourced from free public data. For basic validation and formatting, see the Validate Phone API.
From 2,696 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 304ms | 322ms | 381ms | 748ms | 1239ms |
Didn't find what you were looking for? Suggest an improvement
/v1/phonelookup GET
https://api.api-ninjas.com/v1/phonelookup
Returns carrier, line type, and network metadata for a given phone number.
Parameters
numberrequiredPhone number to look up. If
countryis not set, the country code prefix needs to be included.countryoptional2-letter ISO-3166 country code the phone number belongs to.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
A JSON object with the following fields or an error if the request is unsuccessful. Fields marked premium require a Business or higher subscription.
is_validWhether the phone number is valid.
numberThe phone number in E.164 format.
countryFull country name the number is registered to.
country_codeThe international country calling code (e.g.
1for the US).region_code2-letter ISO-3166 region code (e.g.
US).locationSub-national geographic description, when available.
line_typeLine type such as
mobile,landline,voip, ortoll_free(North American numbers may reportfixed_line_or_mobile).carrierCarrier / operator name (original allocation, not corrected for number portability).
is_voippremiumWhether the number belongs to a VOIP provider.
mccpremiumMobile Country Code of the operator, when known.
mncpremiumMobile Network Code of the operator, when known.
is_disposablepremiumWhether the number is a known disposable / receive-SMS number.
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v1/phonelookup?number=%2B12065550100Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/phonelookup?number=%2B12065550100" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.
Frequently Asked Questions
Can I use the Phone Lookup API for commercial purposes?
Yes, but you must have a premium subscription. Commercial use of the Phone Lookup API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.How do I get an API key and start using the Phone Lookup API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.What happens if a request to the Phone Lookup API fails?
The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.What does the Phone Lookup API return?
For a givennumber, it returnsis_valid, the E.164number,country,country_code,region_code,location,line_type, andcarrier. Premium (Business+) responses also includeis_voip,mcc,mnc, andis_disposable. If you only need validity and formatting, see the Validate Phone API.Which fields are available on the free tier versus premium?
Validity, country, location,line_type, andcarrierare available on all plans. Theis_voip,mcc,mnc, andis_disposablefields require a Business or higher subscription. Carrier data reflects the original number allocation and is not corrected for number portability.Which countries are supported?
Line type and original carrier are available worldwide from the underlying numbering plans, with enhanced carrier and VOIP data for the United States and selected European markets. All data comes from free, public numbering sources.