IP Geolocation API docs

Get country, city, ISP, timezone, currency, and threat score for any IP address. Supports IPv4 and IPv6.

Authentication

All IP Geolocation API requests authenticate via two headers. Get your API key from your RapidAPI dashboard after subscribing on the Basic (free) tier or higher.

X-RapidAPI-Key: YOUR_API_KEY
X-RapidAPI-Host: ip-geolocation-by-helix-api.p.rapidapi.com

Base URL

https://ip-geolocation-by-helix-api.p.rapidapi.com

Endpoints

GET
/lookup/{ip}

Full geolocation for an IP

GET
/lookup/me

Lookup caller's IP

POST
/bulk

Lookup up to 20 IPs

Code Examples

Python

import requests

url = "https://ip-geolocation-by-helix-api.p.rapidapi.com/lookup/{ip}"
headers = {
    "X-RapidAPI-Key": "YOUR_API_KEY",
    "X-RapidAPI-Host": "ip-geolocation-by-helix-api.p.rapidapi.com",
}

response = requests.get(url, headers=headers)
print(response.json())

JavaScript

const response = await fetch(
  "https://ip-geolocation-by-helix-api.p.rapidapi.com/lookup/{ip}",
  {
    method: "GET",
    headers: {
      "X-RapidAPI-Key": "YOUR_API_KEY",
      "X-RapidAPI-Host": "ip-geolocation-by-helix-api.p.rapidapi.com"
    }
  }
);
const data = await response.json();

cURL

curl -X GET "https://ip-geolocation-by-helix-api.p.rapidapi.com/lookup/{ip}" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: ip-geolocation-by-helix-api.p.rapidapi.com"

Response Format

All endpoints return JSON in this consistent envelope:

{
  "status": "ok",
  "data": { /* endpoint-specific payload */ },
  "meta": {
    "cached": false,
    "latency_ms": 142,
    "request_id": "req_abc123"
  },
  "timestamp": "2026-05-21T12:00:00Z"
}

Error Codes

HTTPCodeMeaning
400BAD_REQUESTMissing or invalid parameter
401UNAUTHORIZEDInvalid or missing API key
403FORBIDDENYour plan doesn't include this endpoint
429RATE_LIMIT_EXCEEDEDToo many requests — back off and retry
500INTERNAL_ERRORSomething went wrong on our side
503UPSTREAM_UNAVAILABLEA third-party data source is down

Common Use Cases

Fraud detection
Content localization
Ad targeting
Analytics
Access control
GDPR compliance geofencing
Bot detection and filtering
Regional pricing pages
VPN and proxy detection
User registration validation
Geo-targeted push notifications
Shipping cost estimation
Tax jurisdiction detection
Content licensing enforcement
Multi-region load balancing
Login anomaly detection
Audience segmentation
Compliance audit logging
Location-based feature flags
ISP throttle detection

Related APIs

Ready to build with IP Geolocation API?

Get API Key on RapidAPI

Start building with real APIs today

Free tier on every API, a live demo on every page, and a guide for each. No credit card to explore.

Helix-API Newsletter

Get new API launches, integration guides, and code examples in your inbox.