---
title: "List locations"
method: GET
path: "/locations"
tags: ["Locations"]
---

# List locations

`GET /locations`

## Request

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

Retrieve a paginated list of locations, sorted by member count (descending).

## Query parameters

- `locationType` 'city' | 'country' | 'country_region' | 'world_region', required
- `limit` integer
- `cursor` string
- `cols` string

## Response `200`

OK

- LocationItemList
  - `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
  - `meta` object, required
    - `nextCursor` string, nullable: Cursor for pagination; pass as the `cursor` query parameter to fetch the next page.
    - `recordCount` integer: Total number of records matching the query. Only returned when `cols=recordCount` is requested.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `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)
