Numlookupapi

Numlookupapi


NumLookup Public API Documentation

NumLookup provides a public API that allows developers to perform phone number lookups. The API returns relevant data such as the carrier, line type, and geographic information associated with a phone number. In this blog post, we will explore the different endpoints of the NumLookup API and provide examples of how to use it in JavaScript.

API Endpoints

/api/numlookup/:number

This endpoint provides a way to lookup a phone number. Here’s how to use it in JavaScript:

fetch('https://numlookupapi.com/api/numlookup/15551234567')
    .then((response) => response.json())
    .then((data) => console.log(data));

The response will be a JSON object that includes the following fields:

  • number: The phone number that was looked up
  • country_code: The country code of the phone number
  • country_name: The name of the country where the phone number is registered
  • location: The geographic location of the phone number
  • carrier: The carrier of the phone number
  • line_type: The type of phone line associated with the phone number (mobile, landline, voip)

/api/carriers/:country

This endpoint provides a list of all the carriers in a given country. Here’s how to use it in JavaScript:

fetch('https://numlookupapi.com/api/carriers/US')
    .then((response) => response.json())
    .then((data) => console.log(data));

The response will be a JSON object that includes an array of all the carriers in the country.

Conclusion

The NumLookup public API provides a simple and efficient way to lookup phone numbers and retrieve the associated data. This blog post provided examples of how to use the API in JavaScript. Happy coding!