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

# Search for closest region

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

## Request

- Base URL: `https://api.lightcast.io/alumni-pathways`
- URL: `https://api.lightcast.io/alumni-pathways/{country}/{version}/{level}/closest`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.emsicloud.com/connect/token` scopes: `alumni-pathways`

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.dev/lightcast/apis/alumni-pathways-2-0.md) - [All operations](https://skmtc.dev/lightcast/apis/alumni-pathways-2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/lightcast/apis/alumni-pathways-2-0/revisions/fc66b9877391?raw)
