IP Geolocation API

IP Geolocation API

  • Category: Geocoding


Getting started with IPWhois.io API

IPWhois.io is a public API that provides information on a given IP address. This API can be used to gather geolocation data, ISP information, and more. In this blog post, we will explore how to access the IPWhois.io API using JavaScript.

Registering for an API Key

To use the IPWhois.io API, you need to sign up for an API key. The registration process is straightforward, and it only takes a few minutes. You can sign up for a free API key by visiting the IPWhois.io website.

Accessing the API

Once you have your API key, you can start accessing the IPWhois.io API. The API supports both HTTP and HTTPS protocols, and it responds with JSON data. Here's an example of how to use the IPWhois.io API in JavaScript:

const ip = '8.8.8.8';
const apiKey = 'YOUR_API_KEY';

const url = `https://ipwhois.io/json/${ip}?apiKey=${apiKey}`;

fetch(url)
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.log(error.message));

In the example above, we use the fetch method to send a GET request to the IPWhois.io API endpoint. We pass the IP address and the API key in the URL, and we use the then method to handle the response data.

Example Response

The IPWhois.io API returns a JSON object that contains various details about the given IP address. Here's an example response:

{
  "ip": "8.8.8.8",
  "success": true,
  "type": "ipv4",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "region": "Virginia",
  "city": "Ashburn",
  "latitude": 39.04375,
  "longitude": -77.48745,
  "isp": "Google LLC",
  "org": "Google LLC",
  "timezone": "America/New_York",
  "timezone_offset": -4,
  "currency": "USD",
  "currency_code": "USD",
  "currency_symbol": "$",
  "currency_rates": {
    "USD": 1,
    "EUR": 0.842564
  },
  "languages": [
    {
      "code": "en",
      "name": "English"
    }
  ]
}

Conclusion

That's it! You should now be able to access the IPWhois.io API using JavaScript. This API is a great resource for anyone who needs to get geolocation data and other information about an IP address. If you have any questions or comments, please feel free to leave them below.

Visit to IP Geolocation API website

Similar APIs of Geocoding

Walk Score

Walk Score

Geocoding

Calculates travel times between an origin and a set of destinations. Visualize travel times on a map and supports walking, public transit, driving, and biking times. Calls to the Travel Time HTTP API must be made from a server-side script.

distancetransitmap

IPGeolocation API

IPGeolocation API

Geocoding

ipgeolocation.io API provides IP to Location information such as country, city, state, province, latitude and longitude, company detail, ISP lookup, threat intelligence information, tor, VPN and proxy data. It also provides user agent lookup information, sun rise, sun set and moon set, moon rise timings. All APIs support REST JSON and XML formats.

IPGeoIPIP

Abstract Geolocation API

Abstract Geolocation API

Geocoding

Abstract IP geolocation API provides developers from small startups to big technology companies with a fast and robust API to get the location of any IP worldwide. With Abstract, you can get the city, region and country of any IP. In addition, Abstract IP Geolocation API provides you with timezone and coordinates data so you can build the most delightful experience for your developers. Whether it's for content personalisation, fraud detection or GDPR compliance, Abstract covers a variety of use cases thanks to its extensive and robust platform currently used by 100,000 developers worldwide in companies like Google or Shopify. Freelancers and indiehackers can enjoy an extensive free plan serving up to 20,000 calls per month.

ipgeolocationip

Geocodify

Geocodify

Geocoding

Worldwide geocoding, geoparsing and autocomplete for addresses.

geocodingaddressapi

ArcGIS World Geocoding Services

ArcGIS World Geocoding Services

Geocoding

The World Geocoding Service finds addresses and places from a single endpoint.

geocodingmappingarcgis

Geolake

Geolake

Geocoding

Easy to use geocoding API with best-in-class accuracy. Provides both API based geocoding as well as via CSV batch upload. Can return ZIP+4 values for US addresses, geocode IP addresses and phone numbers based on the data that is available. Data returned may include the top level domain for a country, currency and time zone for the location.

geocodegeocodergeolake

Maps Me

Maps Me

Geocoding

API is designed to allow integrating the offline maps with your iOS or Android app. The best part is that MAPS.ME code is completely open, and you can hack it to your needs!

ipgeocodingapi

IP Api

IP Api

Geocoding

Find location with ip address

ipgeocodingapi

International Street Address API

International Street Address API

Geocoding

Convert addresses into proper USPS or international address format

streetaddressip

Indian Cities

Indian Cities

Geocoding

Indian Cities returns all cities with District And States in a clean JSON format

indiancitiesapi