IP Geolocation API

A fast and reliable service that provides IP address geolocation information using the MaxMind GeoLite2 database. Get detailed location data for any IP address or discover your own IP address with our simple API endpoints.

Available Endpoints

Get Your IP Address

Endpoint: GET /ip

Returns your current IP address.

Response: Plain text containing the IP address

Try it

IP Geolocation Lookup

Endpoint: GET /lookup?ip=x.x.x.x

Returns geolocation data for the specified IP address. If no IP is provided, it uses your current IP.

Query Parameters:

Response Example:

{
    "country": "US",
    "city": "San Francisco",
    "latitude": 37.7749,
    "longitude": -122.4194,
    "postal_code": "94105",
    "time_zone": "America/Los_Angeles",
    "subdivision": "CA",
    "asn": 13335,
    "organization": "Cloudflare, Inc."
}
Try it with your IP

Batch IP Lookup

Endpoint: POST /batch-lookup

Lookup multiple IP addresses in a single request. Supports up to 100 IPs per request.

Request Body:

{
    "ips": ["8.8.8.8", "1.1.1.1"]
}

Response Example:

{
    "results": {
        "8.8.8.8": {
            "country": "US",
            "city": "Mountain View",
            "latitude": 37.4056,
            "longitude": -122.0775,
            "postal_code": "94043",
            "time_zone": "America/Los_Angeles",
            "subdivision": "CA",
            "asn": 15169,
            "organization": "Google LLC"
        },
        "1.1.1.1": {
            "country": "US",
            "city": "Los Angeles",
            "latitude": 34.0522,
            "longitude": -118.2437,
            "postal_code": "90001",
            "time_zone": "America/Los_Angeles",
            "subdivision": "CA",
            "asn": 13335,
            "organization": "Cloudflare, Inc."
        }
    },
    "errors": {}
}