---
title: "GET /v2/locations/cities"
method: GET
path: "/v2/locations/cities"
tags: ["locations"]
---

# GET /v2/locations/cities

`GET /v2/locations/cities`

## Request

- Base URL: `https://api.thecompaniesapi.com`
- URL: `https://api.thecompaniesapi.com/v2/locations/cities`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/thecompaniesapi/apis/the-companies-api/docs/v2/locations/cities/get.ts> (a function with typed inputs; its response is checked against the schema)

Search cities.

## Query parameters

- `filters` string
- `page` number
- `search` string
- `size` number
- `sortKey` 'counts.companies'
- `sortOrder` 'asc' | 'desc'

## Response `200`

Search cities.

- object
  - `cities` NominatimCity[], required
    - `code` string, required
    - `companiesCount` number, nullable, required
    - `id` number, required
    - `latitude` string, nullable, required
    - `linkedinHeadline` string, nullable
    - `linkedinId` string, nullable
    - `linkedinQuery` string, nullable
    - `longitude` string, nullable, required
    - `name` string, required
    - `nominatimCountryId` number, nullable
    - `nominatimCountyId` number, nullable
    - `nominatimStateId` number, nullable
    - `postcode` string, nullable, required
    - `usageCount` number, nullable, required
  - `meta` PaginationMeta, required: Metadata about a paginated or billed response.
    - `cost` number, required
    - `credits` number, required
    - `currentPage` number, required
    - `firstPage` number, required
    - `freeRequest` boolean, required
    - `lastPage` number, required
    - `maxScrollResultsReached` boolean
    - `perPage` number, required
    - `total` number, required

## Other responses

- `401`: The error message

---

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