1. Datasets
  2. IP Geolocation

IP Geolocation API

Look up approximate locations and autonomous system information for IP addresses. Served from IP Geolocation by DB-IP.

GET /v1/ipCC BY 4.0Global28 Nov 2026

Request and response

The response below is the example from our OpenAPI document, so it shows the exact shape you get, though the record itself may come from another country.

GET/v1/ip
curl 'https://api.apifor.dev/v1/ip' \
  -G -d address=8.8.8.8 \
  -H 'x-api-key: YOUR_API_KEY'
Example response · application/json
{
  "success": true,
  "data": {
    "address": "8.8.8.8",
    "version": 4,
    "id": 18894,
    "continent": "NA",
    "country": "US",
    "region": "California",
    "city": "Mountain View",
    "lat": 37.422,
    "lon": -122.085
  }
}

Fields

Each record in data has these fields. Types are read from the example values; a nullable field can hold null for some records.

FieldTypeExample
addressstring"8.8.8.8"
versioninteger4
idinteger18894
continentstring"NA"
countrystring"US"
regionstring"California"
citystring"Mountain View"
latnumber37.422
lonnumber-122.085

Filters and paging

Query parameters accepted by GET /v1/ip. Full detail, including the single-record route, is in the endpoint reference.

ParameterTypeRules
addressstringNone

This dataset is not split by country in our coverage snapshot, so it has no country pages. Query it directly with the filters above.