API Documentation

Integrate powerful IP geolocation data into your applications in minutes.

Overview

The IP-API API provides real-time IP geolocation data including country, region, city, latitude, longitude, ZIP code, time zone, and ISP information.

Base URL
https://ip-api.in/api/v1

Authentication

Authentication is optional for public endpoints but recommended for higher rate limits. You can authenticate your requests by including your API token in the Authorization header.

Headers
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json
Tip: You can find your API token in your Dashboard after logging in.

Rate Limits

API requests are rate-limited to ensure fair usage and system stability. Rate limits vary based on authentication status.

Guest Users
100
requests per day
  • No authentication required
  • Rate limited by IP address
  • Shared limit per IP
  • Resets every 24 hours
Authenticated Users
1000
requests per day
  • Requires API token
  • Rate limited by user account
  • 10x higher limit
  • Resets every 24 hours
Pro Tip: Create a free account and generate an API token to get 1000 requests per day instead of 100! Sign up now →
Rate Limit Headers

Every API response includes headers with your current rate limit status:

Response Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1733529600
Rate Limit Exceeded Response

When you exceed your rate limit, you'll receive a 429 Too Many Requests response:

{
  "success": false,
  "message": "Daily rate limit exceeded. Please try again later.",
  "error": "Too Many Requests",
  "code": 429,
  "retry_after": 86400,
  "limit": 100,
  "limit_type": "guest"
}

GET

/ip/{ip_address}

Retrieve geolocation information for a specific IP address.

Parameters
Parameter Type Required Description
ip_address String Yes The IPv4 or IPv6 address you want to query (e.g., 8.8.8.8).
Example Request
cURL
curl -X GET "https://ip-api.in/api/v1/ip/8.8.8.8" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"
Example Response
{
  "success": true,
  "message": "IP lookup successful",
  "api_version": "v1",
  "data": {
    "ip": "8.8.8.8",
    "country": "United States",
    "country_code": "US",
    "region": null,
    "region_code": null,
    "city": null,
    "postal_code": null,
    "latitude": 37.751,
    "longitude": -97.822,
    "timezone": "America/Chicago",
    "continent": "North America",
    "continent_code": "NA",
    "asn": "AS15169",
    "organization": "GOOGLE",
    "is_in_european_union": false
  }
}

GET

/ip

Retrieve geolocation information for the IP address making the request (useful for client-side detection).

Example Request
curl -X GET "https://ip-api.in/api/v1/ip" \
  -H "Accept: application/json"

POST

/ip/bulk

Look up multiple IP addresses in a single request.

Request Body
{
  "ips": ["8.8.8.8", "1.1.1.1"]
}
Example Request
curl -X POST "https://ip-api.in/api/v1/ip/bulk" \
    -H "Content-Type: application/json" \
    -d '{"ips": ["8.8.8.8", "1.1.1.1"]}'