Geolocation Endpoints
IP-to-location lookups, timezone detection, and IP address validation.
Base URL
All endpoints below are relative to https://api.netloc8.com.
/v1/ip/meAuthenticatedGeolocate caller
Returns full geolocation data for the requesting client's IP address. The IP is auto-detected from x-forwarded-for or the connection. Same response shape as /v1/ip/{ipAddress}.
Example Request
curl -H "X-API-Key: YOUR_KEY" \
https://api.netloc8.com/v1/ip/meResponse
{
"query": {
"type": "ip",
"value": "8.8.8.8",
"ipVersion": 4
},
"location": {
"continent": {
"code": "NA",
"name": "North America"
},
"country": {
"code": "US",
"name": "United States",
"flag": "πΊπΈ"
},
"region": {
"code": "CA",
"name": "California"
},
"city": "Mountain View",
"postalCode": "94043",
"coordinates": {
"latitude": 37.386,
"longitude": -122.084,
"accuracyRadius": 621
},
"timezone": "America/Los_Angeles",
"utcOffset": "-07:00",
"geoConfidence": 1
},
"network": {
"asn": "AS15169",
"organization": "Google LLC",
"domain": "google.com"
},
"sources": {
"geo": [
"dbip",
"ip2location"
],
"asn": [
"ipinfo"
],
"tz": [
"derived"
]
},
"meta": {
"precision": "city",
"tier": "pro",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}/v1/ip/{ipAddress}AuthenticatedIP geolocation lookup
Returns full geolocation data for the given IP address including city, region, country, coordinates, and timezone.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ipAddress | string | Required | IPv4 or IPv6 address to look up (e.g. 8.8.8.8) |
Example Request
curl -H "X-API-Key: YOUR_KEY" \
https://api.netloc8.com/v1/ip/8.8.8.8Response
{
"query": {
"type": "ip",
"value": "8.8.8.8",
"ipVersion": 4
},
"location": {
"continent": {
"code": "NA",
"name": "North America"
},
"country": {
"code": "US",
"name": "United States",
"flag": "πΊπΈ"
},
"region": {
"code": "CA",
"name": "California"
},
"city": "Mountain View",
"postalCode": "94043",
"coordinates": {
"latitude": 37.386,
"longitude": -122.084,
"accuracyRadius": 621
},
"timezone": "America/Los_Angeles",
"utcOffset": "-07:00",
"geoConfidence": 1
},
"network": {
"asn": "AS15169",
"organization": "Google LLC",
"domain": "google.com"
},
"sources": {
"geo": [
"dbip",
"ip2location"
],
"asn": [
"ipinfo"
],
"tz": [
"derived"
]
},
"meta": {
"precision": "city",
"tier": "pro",
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}/v1/ip/me/timezoneAuthenticatedGet timezone for caller
Returns the IANA timezone string (e.g. America/Chicago) for the requesting client's IP address.
Example Request
curl -H "X-API-Key: YOUR_KEY" \
https://api.netloc8.com/v1/ip/me/timezoneResponse
"America/Chicago"/v1/ip/{ipAddress}/timezoneAuthenticatedGet timezone for IP
Returns the IANA timezone string (e.g. America/Chicago) for the given IP address.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ipAddress | string | Required | IPv4 or IPv6 address |
Example Request
curl -H "X-API-Key: YOUR_KEY" \
https://api.netloc8.com/v1/ip/8.8.8.8/timezoneResponse
"America/Los_Angeles"/v1/ip/{ipAddress}/validationAuthenticatedValidate IP address
Returns true if the address is a valid IPv4 or IPv6 address, false otherwise. Does not perform a geolocation lookup.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ipAddress | string | Required | IP address string to validate |
Example Request
curl -H "X-API-Key: YOUR_KEY" \
https://api.netloc8.com/v1/ip/8.8.8.8/validationResponse
trueResponse Shape
All geolocation endpoints return a GeolocationResult object. Null fields are omitted rather than sent as null. See the Response Format page for the full schema reference.
Precision Levels
The meta.precision field indicates how specific the geolocation data is:
| Precision | Fields Available |
|---|---|
city | All fields: country, region, city, coordinates, timezone |
region | Country, region, timezone (no city/coords) |
country | Country code and name only |
continent | Continent only |
none | No geolocation data found |
Error Responses
See Error Codes for the full error response format and code reference.