---
title: "Search for closest region"
method: POST
path: "/{country}/{version}/{level}/closest"
tags: ["Regions"]
---

# Search for closest region

`POST /{country}/{version}/{level}/closest`

Search for the closest region to a point.

## Path parameters

- `country` string, required
- `version` string, required
- `level` string, required

## Request body

- object
  - `lat` number, required
  - `lon` number, required
  - `maxDistance` number, double — A max distance of `0` specifies no distance limit.
  - `maxDistanceUnit` 'miles' | 'meters' | 'degrees'
  - `calculationType` 'planar' | 'geodetic' — * `planar` - Calculate distance as if on a flat plane (faster) * `geodetic` - Calculate distance on the surface of the earth (more accurate).

## Response `200`

OK

- object — A list of codes.
  - `codes` union[], required
    - union
      - string
      - integer

## Other responses

- `400` — bad request
- `404` — requested resource not found

---

[API](https://skmtc.net/lightcast/apis/alumni-pathways-2-0.md) · [All operations](https://skmtc.net/lightcast/apis/alumni-pathways-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightcast/alumni-pathways-2-0/revisions/fc66b9877391/schema)
