---
title: "Airports and cities near a point"
method: GET
path: "/v1/places/nearby"
tags: ["Places"]
---

# Airports and cities near a point

`GET /v1/places/nearby`

The airports (and optionally cities) closest to a place or a coordinate pair, nearest first – for finding an alternative departure airport serving the same trip. Pass either place (a code, resolved to coordinates here) or latitude+longitude, never neither.

## Query parameters

- `place` string
- `latitude` number
- `longitude` number
- `types` string[]
- `locale` string
- `pageSize` integer

## Response `200`

Nearby places, nearest first, plus the origin they were measured from.

- object
  - `results` object[], required — The nearby places found around the origin.
    - `id` union — Stable place identifier; use it to reference this place later.
      - number
      - string
    - `code` string — IATA-style code (airport/city), when the place has one.
    - `name` string, required — Display name of the place.
    - `type` string, required — Place kind: city, airport, state, district or hotel.
    - `cityCode` string — Code of the city this place belongs to.
    - `latitude` number — Latitude in decimal degrees, when known.
    - `longitude` number — Longitude in decimal degrees, when known.
  - `metadata` object, required — Pagination and the resolved origin for this nearby search.
    - `resultCount` integer, required — Number of results on the current page (always <= pageSize).
    - `totalCandidates` integer, required — Rows the upstream returned before this page was sliced. The upstream ignores per_page and answers with roughly ten rows, so pageSize can only narrow this, never reach further.
    - `hasMore` boolean, required — True when pageSize clipped the upstream rows.
    - `origin` object, required — The point the nearby search ran from, and how it was derived.
      - `latitude` number, required — Latitude the upstream was queried with.
      - `longitude` number, required — Longitude the upstream was queried with.
      - `resolvedFrom` 'place' | 'coordinates', required — `place` when a code was resolved to these coordinates, `coordinates` when the caller supplied them.
      - `code` string — The resolved place code, present only when resolvedFrom is place.
      - `name` string — The resolved place name, present only when resolvedFrom is place.

## Other responses

- `400` — Neither a place nor a coordinate pair, an out-of-range coordinate, or a place code that resolves to nothing with coordinates.
- `401` — Missing or invalid bearer token.
- `429` — Rate limit exceeded; retry after the `Retry-After` seconds.
- `502` — The upstream places service returned an invalid response.
- `503` — The places service is temporarily unavailable; retry after the `Retry-After` seconds.

---

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