---
title: "Nearest Airport"
method: GET
path: "/api/nearest-airport"
tags: ["Reference Data"]
---

# Nearest Airport

`GET /api/nearest-airport`

## Request

- Base URL: `https://www.freightutils.com`
- URL: `https://www.freightutils.com/api/nearest-airport`
- Auth: none declared

Find the airports nearest to a caller-provided latitude/longitude, sorted by great-circle (haversine) distance with distance_km on each result. Coordinates are input only — never stored or logged. Optional radius_km, max_results (1-50, default 10) and type filter.

## Query parameters

- `lat` number, required
- `lon` number, required
- `radius_km` number
- `max_results` integer
- `type` 'large_airport' | 'medium_airport' | 'small_airport' | 'heliport' | 'closed' | 'seaplane_base'

## Response `200`

Nearest airports, ascending by distance_km.

- NearestAirportResponse
  - `count` integer, required
  - `results` AirportWithDistance[], required
    - `ident` string, required: ICAO / OurAirports ident
    - `iata_code` string, nullable, required: IATA 3-letter code (null if none)
    - `name` string, required
    - `type` 'large_airport' | 'medium_airport' | 'small_airport' | 'heliport' | 'closed' | 'seaplane_base', required
    - `municipality` string, nullable
    - `region` string, nullable: Region / subdivision (readable)
    - `country` string, required: ISO 3166-1 alpha-2 country code
    - `country_name` string, nullable
    - `latitude` number, required
    - `longitude` number, required
    - `elevation_ft` integer, nullable
    - `distance_km` number, required: Great-circle distance from the query point, km
  - `disclaimer` string
  - `meta` object: Echo of the query (latitude, longitude, radius_km, max_results, type) + source.
  - `_source` SourceEnvelope: Additive provenance citation for the dataset or method behind this response, from FreightUtils' single provenance source of truth. Shapes: reference, methodology (calculators), or reference with provenance_status:'pending-verification'. Fields appear only when a real value exists.
    - `type` 'reference' | 'methodology', required
    - `authority` string
    - `dataset` string
    - `source_url` string
    - `data_vintage` string
    - `licence` string
    - `retrieved_via` string
    - `standard` string
    - `reference` string
    - `computed_by` string
    - `provenance_status` 'pending-verification'
    - `dataset_edition` string: Edition this response is served from (editioned reference datasets only), e.g. 'UN/LOCODE 2025-1'.
    - `authority_current_edition` string: The authority's current in-force edition at the last check. Differs from dataset_edition only when the served data lags the authority.
    - `checked_at` string: YYYY-MM-DD of the last served-vs-authority edition comparison (on-demand checker, staleness-guarded).

## Other responses

- `400`: Invalid or missing parameters.

---

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