---
title: "List cities"
method: GET
path: "/api/city"
tags: ["Territory"]
---

# List cities

`GET /api/city`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/city`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/city/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists cities with their county, state and country and the number of properties, brands and agencies that have an office there. Filters, ordering and paging come from the query string.

## Query parameters

- `search` string
- `country_id` string
- `state_id` string
- `county_id` string
- `order_by` 'id' | 'name' | 'county_id' | 'county_name' | 'state_id' | 'state_name' | 'country_id' | 'country_name' | 'locations_count'
- `order` 'asc' | 'desc'
- `limit` integer
- `paginate` integer

## Response `200`

A list of cities, or a paginated list when paginate is given

## Other responses

- `401`: Unauthenticated
- `422`: A filter, order or paging value is not valid
- `504`: The database stopped the search because it ran past the execution time cap

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
