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 2026Request 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.
curl 'https://api.apifor.dev/v1/ip' \
-G -d address=8.8.8.8 \
-H 'x-api-key: YOUR_API_KEY'{
"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.
| Field | Type | Example |
|---|---|---|
| address | string | "8.8.8.8" |
| version | integer | 4 |
| id | integer | 18894 |
| continent | string | "NA" |
| country | string | "US" |
| region | string | "California" |
| city | string | "Mountain View" |
| lat | number | 37.422 |
| lon | number | -122.085 |
Filters and paging
Query parameters accepted by GET /v1/ip. Full detail, including the single-record route, is in the endpoint reference.
| Parameter | Type | Rules |
|---|---|---|
| address | string | None |
This dataset is not split by country in our coverage snapshot, so it has no country pages. Query it directly with the filters above.