Free IP Geolocation API - IP Address Lookup with Location Data

Published Feb 20, 2026 · API Guide · 5 min read

Lookup IP addresses for geolocation data: country, city, timezone, ISP, and more. Batch lookup support. Free tier.

Try it Now - No API Key Required

Test this API instantly in your browser

Open API Playground

Welcome to the DevProToolkit API platform, where you can locate any IP address instantly using our free IP geolocation API. Our API provides accurate and reliable geolocation data, including country, region, city, latitude, longitude, timezone, ISP, organization, and AS number.

With our API, you can easily integrate IP geolocation into your application, enhancing your user experience, improving security, and increasing revenue. In this article, we will explore the features and benefits of our IP geolocation API, as well as provide a step-by-step guide on how to get started.

Try IP Geolocation Now

Look up any IP address instantly — no API key needed for the playground.

Open Geolocation Playground

What Is an IP Geolocation API?

An IP geolocation API is a service that provides geolocation data associated with an IP address. This data can include country, region, city, latitude, longitude, timezone, ISP, organization, and AS number. Our IP geolocation API uses a combination of proprietary algorithms and comprehensive databases to provide accurate and reliable geolocation data.

Why Use IP Geolocation?

IP geolocation can be used in a variety of applications, including content localization, fraud detection, analytics, compliance, and ad targeting. By using our IP geolocation API, you can enhance your user experience, improve security, and increase revenue.

Getting Started

To get started with our IP geolocation API, you need to sign up at api.commandsector.in/signup. Once you have an account, you can obtain an API key, which is required to make API requests. Our API endpoint is https://api.commandsector.in/api/geo/lookup, and you can pass the IP address as a query parameter, for example, https://api.commandsector.in/api/geo/lookup?ip=8.8.8.8.

API Reference

Our API supports the following parameters:


GET /api/geo/lookup HTTP/1.1
X-API-Key: YOUR_API_KEY
ip=8.8.8.8
fields=country,region,city
lang=en

The following fields are supported:

Field Description
ip The IP address to look up
fields A comma-separated list of fields to return
lang The language to return the data in

Response Format

The API returns a JSON response with the following fields:


{
  "ip": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4223,
  "longitude": -122.085,
  "timezone": "America/Los_Angeles",
  "isp": "Google LLC",
  "org": "Google LLC",
  "as_number": "AS15169"
}

cURL Examples


curl -X GET \
  https://api.commandsector.in/api/geo/lookup?ip=8.8.8.8 \
  -H 'X-API-Key: YOUR_API_KEY'

Python Integration


import requests

api_key = 'YOUR_API_KEY'
ip = '8.8.8.8'

response = requests.get(f'https://api.commandsector.in/api/geo/lookup?ip={ip}', headers={'X-API-Key': api_key})

print(response.json())

JavaScript / Node.js Integration


const axios = require('axios');

const api_key = 'YOUR_API_KEY';
const ip = '8.8.8.8';

axios.get(`https://api.commandsector.in/api/geo/lookup?ip=${ip}`, {
  headers: {
    'X-API-Key': api_key
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});

Use Cases

Our IP geolocation API can be used in a variety of applications, including:

Sample API Response

The DevProToolkit Geo API provides a comprehensive response for each IP lookup. Below is a sample JSON response for the IP address 8.8.8.8:


{
  "ip": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.4223,
  "longitude": -122.085,
  "timezone": "America/Los_Angeles",
  "isp": "Google LLC",
  "org": "Google LLC",
  "as_number": "AS15169"
}

This response includes the following fields: - ip: The IP address that was looked up. - country: The country where the IP is located. - country_code: The ISO 3166-1 alpha-2 code of the country. - region: The region or state where the IP is located. - city: The city where the IP is located. - latitude: The latitude of the IP's location. - longitude: The longitude of the IP's location. - timezone: The timezone of the IP's location. - isp: The Internet Service Provider (ISP) that owns the IP. - org: The organization that owns the IP. - as_number: The Autonomous System Number (ASN) of the IP.

Bulk IP Lookup

To perform a bulk lookup, you can use the POST /api/geo/bulk endpoint. This allows you to look up multiple IPs in a single request.

Here's an example of how to use Python to perform a bulk lookup:


import requests

ips = ["8.8.8.8", "1.1.1.1", "4.2.2.2", "208.67.222.222", "8.26.56.26", "93.184.216.34", "216.58.194.174", "199.7.157.0", "198.41.214.163", "172.217.18.110"]

response = requests.post("https://api.commandsector.in/api/geo/bulk", json={"ips": ips})

for result in response.json():
    print(result)

This example sends a POST request to the /api/geo/bulk endpoint with a JSON body containing a list of IPs. The response will be a list of Geo API responses, one for each IP in the request.

Building a Visitor Analytics Dashboard

A practical use case for the Geo API is building a visitor analytics dashboard. This can be done by logging the IP address of each visitor and using the Geo API to get their location.

Here's an example of how to use Node.js and Express to log visitor locations:


const express = require("express");
const axios = require("axios");
const app = express();

app.use((req, res, next) => {
  const ip = req.ip;
  axios.get(`https://api.commandsector.in/api/geo/${ip}`)
    .then(response => {
      const location = response.data;
      // Log the location
      console.log(`Visitor from ${location.city}, ${location.country}`);
      next();
    })
    .catch(error => {
      console.error(error);
      next();
    });
});

app.get("/", (req, res) => {
  res.send("Hello World!");
});

app.listen(3000, () => {
  console.log("Server listening on port 3000");
});

This example uses Express to create a server that logs the location of each visitor. It uses the Geo API to get the visitor's location and logs it to the console.

Fraud Detection with IP Geolocation

The Geo API can be used to detect suspicious logins and prevent fraud. One way to do this is to check if the visitor's location matches their expected location.

Here's an example of how to use Python to detect suspicious logins:


import requests

def check_login(ip, expected_country):
  response = requests.get(f"https://api.commandsector.in/api/geo/{ip}")
  location = response.json()
  if location["country"] != expected_country:
    return False
  return True

ip = "8.8.8.8"
expected_country = "United States"
if check_login(ip, expected_country):
  print("Login is valid")
else:
  print("Login is suspicious")

This example checks if the visitor's location matches their expected location. If it doesn't, it returns False, indicating a suspicious login.

Comparison: IP Geolocation APIs

API Free Tier Accuracy IPv6 Support Bulk Lookup Extra Data
DevProToolkit 100 requests per day 99.5% Yes Yes ISP, Organization, ASN
ipinfo.io 50,000 requests per month 99% Yes No ISP, Organization, Company
ipstack 10,000 requests per month 98% Yes Yes ISP, Organization, Timezone
MaxMind GeoIP No free tier 99.5% Yes Yes ISP, Organization, ASN, City, Region

This comparison shows the features and pricing of different IP geolocation APIs. The DevProToolkit API offers a free tier with 100 requests per day and provides accurate location data with extra information such as ISP and organization.

Pricing & Rate Limits

We offer the following pricing plans:

Plan Requests per day Price
Free 100 $0
Pro 10,000 $9.99/mo
Enterprise Unlimited Contact us

FAQ

What is the accuracy of your IP geolocation API?

Our IP geolocation API has an accuracy of 99.5%.

Do you support IPv6?

Yes, our IP geolocation API supports both IPv4 and IPv6.

How do you handle privacy and GDPR?

We take privacy and GDPR seriously, and we comply with all applicable laws and regulations.

Can I perform bulk lookups?

Yes, our IP geolocation API supports bulk lookups.

Can I get my own IP address?

Yes, you can use our API to get your own IP address.

Quick Start - Code Examples

cURL

curl "https://api.commandsector.in/api/ip-geo/lookup/8.8.8.8" \
  -H "X-API-Key: YOUR_API_KEY"

Python

import requests

info = requests.get("https://api.commandsector.in/api/ip-geo/lookup/8.8.8.8",
    headers={"X-API-Key": "YOUR_API_KEY"}).json()

print(f"Country: {info['country']}")
print(f"City: {info['city']}")
print(f"ISP: {info['isp']}")

Start Using This API Today

Get a free API key with 100 requests/day. No credit card required.

Get Free API Key