---
title: "Get geolocation information for an IP address"
method: GET
path: "/geo/{ip}"
tags: ["geo"]
---

# Get geolocation information for an IP address

`GET /geo/{ip}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/geo/{ip}`
- Auth: HTTP bearer

## Path parameters

- `ip` string, required

## Response `200`

Geolocation information retrieved

- GeoLocationResponse: Response containing geolocation information for an IP address
  - `city` string, nullable: City name
  - `country` string, nullable: Country name
  - `country_code` string, nullable: ISO country code (2 letters)
  - `ip` string, required: IP address that was geolocated
  - `is_eu` boolean, required: Whether the IP is in the European Union
  - `latitude` number, double, nullable: Latitude coordinate
  - `longitude` number, double, nullable: Longitude coordinate
  - `region` string, nullable: Region/state name
  - `timezone` string, nullable: Timezone identifier

## Other responses

- `400`: Invalid IP address
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: IP address not found in database
- `500`: Internal server error
- `503`: No GeoIP database is loaded yet

## Changes

- **2026-11-09** `12896146b193`: 6 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
  - removed the required property `extensions` from the response with the `404` status
  - …2 more
- **2026-11-04** `33d4c89a8028`: 1 info
  - added the non-success response with the status `503`
- **2026-10-05** `4b228ebed583`: 5 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
  - added the optional property `status` to the response with the `404` status
  - …1 more
- **2026-10-05** `63a80791dc58`: 5 warning
  - removed the optional property `status` from the response with the `400` status
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
  - removed the optional property `status` from the response with the `404` status
  - …1 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/geo/:ip/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
