---
title: "Get Caller Location"
method: GET
path: "/geolocate"
tags: ["Service"]
---

# Get Caller Location

`GET /geolocate`

Lookup the geographic location of a user based on their IP address.

This API exists for debugging purposes and may not be available in the future.

## Query parameters

- `ip` string, nullable — IP address to geolocate, defaults to client IP address

## Response `200`

Successful Response

- GeolocationRes
  - `ip` string, required — Resolved IP address, useful for debugging
  - `location` Geolocation
    - `file_index` integer, required — row in CSV file
    - `range_start_int` integer, required — Start of IP range as integer
    - `range_end_int` integer, required — End of IP range as integer
    - `range_start_ip` string, required — Start of IP range in dotted decimal notation
    - `range_end_ip` string, required — End of IP range in dotted decimal notation
    - `country_code` string, required — 2-letter country code in ISO 3166-1 Alpha 2 format
    - `country_name` string, nullable — Country name, None if could not be determined
  - `allowed` boolean — Whether the IP address is allowed to be used for inference.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/wandb/apis/fastapi.md) · [All operations](https://skmtc.net/wandb/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wandb/fastapi/revisions/56745769989b/schema)
