IPinfo

IPinfo

Development

IPinfo is a free IP data API provider specializing in IP geolocation, though also offering endpoints for ASN, IP to company, IP to carrier, IP ranges, abuse responses, and hosted domains. The geolocation API returns a JSON response containing data fields describing the specified IP's region, country, city, postal code, coordinates, and more.

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with IPinfo

πŸš€ Quick Start Examples

IPinfo Javascript Examplejavascript
// IPinfo API Example
const response = await fetch('https://ipinfo.io/developers', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Public API Docs for IPInfo.io using JavaScript

If you're looking for a reliable, easy-to-use API to gather information about any IP address, look no further than IPInfo.io. Their public API is free for up to 50,000 requests per month, and offers a ton of useful data on any IP address, including location, ISP, and more.

If you want to use IPInfo.io in your own JavaScript application, you're in luck – it's incredibly easy to do so. Here are a few examples:

Get Information on the Requesting IP Address

To get information about the IP address that the user is accessing your application from, you can simply make a GET request to https://ipinfo.io/json:

fetch('https://ipinfo.io/json')
  .then(response => response.json())
  .then(data => console.log(data))

This will return a JSON object with details on the requesting IP address, including where it's located, what ISP it's associated with, and more.

Get Information on Any IP Address

If you want to look up information on an IP address that's not the requesting one, you can do so by including the IP address at the end of the request URL:

fetch('https://ipinfo.io/8.8.8.8/json')
  .then(response => response.json())
  .then(data => console.log(data))

This will return information on the IP address 8.8.8.8, which is actually Google's DNS server.

Work with the Data Returned

Once you have the data returned from IPInfo.io, you can work with it however you like. Here's an example of how you might extract the city and region of a given IP address:

fetch('https://ipinfo.io/8.8.8.8/json')
  .then(response => response.json())
  .then(data => {
    const { city, region } = data
    console.log(`This IP address is located in ${city}, ${region}.`)
  })

Overall, the IPInfo.io API is incredibly easy to use in your own JavaScript application. Whether you need to look up information on a user's requesting IP address, or any other IP address, it's fast, reliable, and provides a wealth of information.

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 6Jun 8Jun 10Jun 12Jun 14Jun 16Jun 18Jun 20Jun 22Jun 24Jun 26Jun 28Jun 30Jul 2Jul 504008001440Minutes
Online
Offline

Related APIs in Development