---
title: "Get a location by ID"
method: GET
path: "/locations/{id}"
tags: ["Locations"]
---

# Get a location by ID

`GET /locations/{id}`

## Request

- Base URL: `https://api.commonroom.io/api/v2`
- URL: `https://api.commonroom.io/api/v2/locations/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/commonroom/apis/common-room-api-v2/docs/locations/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve a specific location by its unique identifier.

## Path parameters

- `id` string, required

## Response `200`

OK

- LocationItemResponse
  - `success` true, required
  - `data` ApiLocationItem, required
    - `id` string, required: Prefixed location ID
    - `name` string, required: Display name for the location
    - `type` 'city' | 'country' | 'country_region' | 'world_region', required: The granularity of this location
    - `city` string
    - `region` string
    - `country` string

## Other responses

- `400`: Bad Request (e.g. invalid location ID)
- `403`: Forbidden
- `404`: Location not found
- `429`: Rate Limited

---

[API](https://skmtc.dev/commonroom/apis/common-room-api-v2.md) - [All operations](https://skmtc.dev/commonroom/apis/common-room-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/commonroom/apis/common-room-api-v2/revisions/865d4d43dadf?raw)
