Nearest Airports
Find the 5 closest airports to the given latitude and longitude, irrespective of the radius of the reference point. Hence, a radius is not needed for this service. This method could be useful for applications on mobile devices. Some locations are equidistant from several major airports. You can use the distance in the response to decide whether to present the user with more than one option or automatically choose the nearest. Not all languages are available for all airports but these codes are always supported; de, en, fr, es, it.
Request URIs
Code snippet: Call
GET /references/airports/nearest/{latitude},{longitude}
GET /references/airports/nearest/{latitude},{longitude}[?lang={languageCode}]
Variable | Description | Format |
---|---|---|
{latitude} | Decimal latitude. Only the first 3 decimal places are considered. Range: -90 (South Pole) to +90 (North Pole). |
decimal. e.g. 51.540. |
{longitude} | Decimal longitude. Only the first 3 decimal places are considered. Range: -180 (West of Prime Meridian) to +180 (East of Prime Meridian). |
decimal. e.g. 5.935. |
{languageCode} | Optionally return the airport names in only this language. If not specified, all languages will be in the response. | 2-letter ISO 639-1 language code, e.g. “DE”. |
Request Examples
Code snippet: Call
GET /references/airports/nearest/36.562,-115.596
GET /references/airports/nearest/51.540,5.953?lang=DE
Response Structure Definition
Key | Description |
---|---|
AirportResource | Root element of airport response. |
.Airports | Container for airport elements. |
..Airport[] | Array of all available airports or one airport matching the request. |
...AirportCode | 3-letter IATA airport code, e.g. “TXL”. |
...CityCode | 3-letter IATA city code, e.g. “BER”. |
...CountryCode | 2-letter ISO 3166-1 country code, e.g. “DE”. |
...Position | Physical location of the airport. |
....Coordinate | Container for coordinates. |
.....Latitude | Decimal latitude. Range: -90 (South Pole) to +90 (North Pole), e.g. “51.540”. |
.....Longitude | Decimal longitude. Range: -180 (West of Prime Meridian) to +180 (East of Prime Meridian). |
...LocationType | “Airport”, “RailwayStation” or "BusStation". |
...Names | Container for airport names. |
....Name[] | Array: language specific full name of airport. |
@LanguageCode | 2-letter ISO 639-1 language code for the corresponding item. |
...Distance | How close is this airport to the reference point. |
....Value | The distance from the reference point. |
....UOM | The units of measurement for the distance (always kilometers). |
.Meta | Container for meta links. |
..Link[] | Array: links to resource itself and other related resources. |
@Href | Link to actual a resource. |
@Rel | Specifying kind of link such as ‘self’ (link that returned this response), ‘alternate’ (link that points to another resource) or ‘related’ (link that points to related resource). |
Response Example
<?xml version="1.0" encoding="UTF-8"?>
<NearestAirportResource>
<Airports>
<Airport>
<AirportCode>LAS</AirportCode>
<Position>
<Coordinate>
<Latitude>36.07972222</Latitude>
<Longitude>-115.1588889</Longitude>
</Coordinate>
</Position>
<CityCode>LAS</CityCode>
<CountryCode>US</CountryCode>
<LocationType>Airport</LocationType>
<Names>
<Name LanguageCode="xx">Las Vegas - McCarran International</Name>
<Name LanguageCode="en">Las Vegas - McCarran International, NV</Name>
<Name LanguageCode="de">Las Vegas - McCarran International, NV</Name>
<Name LanguageCode="it">Las Vegas - McCarran International, NV</Name>
<Name LanguageCode="fr">Las Vegas - McCarran International, NV</Name>
<Name LanguageCode="es">Las Vegas - McCarran International, NV</Name>
</Names>
<Distance>
<Value>66</Value>
<UOM>KM</UOM>
</Distance>
</Airport>
<Airport>
<AirportCode>SGU</AirportCode>
<Position>
<Coordinate>
<Latitude>37.09305556</Latitude>
<Longitude>-113.5922222</Longitude>
</Coordinate>
</Position>
<CityCode>SGU</CityCode>
<CountryCode>US</CountryCode>
<LocationType>Airport</LocationType>
<Names>
<Name LanguageCode="xx">Saint George</Name>
<Name LanguageCode="de">Saint George</Name>
<Name LanguageCode="en">Saint George</Name>
<Name LanguageCode="it">Saint George</Name>
<Name LanguageCode="fr">Saint George</Name>
<Name LanguageCode="es">Saint George</Name>
</Names>
<Distance>
<Value>187</Value>
<UOM>KM</UOM>
</Distance>
</Airport>
<Airport>
<AirportCode>PSP</AirportCode>
<Position>
<Coordinate>
<Latitude>33.82666667</Latitude>
<Longitude>-116.505</Longitude>
</Coordinate>
</Position>
<CityCode>PSP</CityCode>
<CountryCode>US</CountryCode>
<LocationType>Airport</LocationType>
<Names>
<Name LanguageCode="xx">Palm Springs Municipal</Name>
<Name LanguageCode="en">Palm Springs Municipal, CA</Name>
<Name LanguageCode="de">Palm Springs Municipal, CA</Name>
<Name LanguageCode="it">Palm Springs Municipal, CA</Name>
<Name LanguageCode="fr">Palm Springs Municipal, CA</Name>
<Name LanguageCode="es">Palm Springs Municipal, CA</Name>
</Names>
<Distance>
<Value>315</Value>
<UOM>KM</UOM>
</Distance>
</Airport>
<Airport>
<AirportCode>ONT</AirportCode>
<Position>
<Coordinate>
<Latitude>34.05722222</Latitude>
<Longitude>-117.6080556</Longitude>
</Coordinate>
</Position>
<CityCode>ONT</CityCode>
<CountryCode>US</CountryCode>
<LocationType>Airport</LocationType>
<Names>
<Name LanguageCode="xx">Ontario International</Name>
<Name LanguageCode="de">Ontario International, CA</Name>
<Name LanguageCode="en">Ontario International, CA</Name>
<Name LanguageCode="it">Ontario International, CA</Name>
<Name LanguageCode="fr">Ontario International, CA</Name>
<Name LanguageCode="es">Ontario International, CA</Name>
</Names>
<Distance>
<Value>334</Value>
<UOM>KM</UOM>
</Distance>
</Airport>
<Airport>
<AirportCode>BFL</AirportCode>
<Position>
<Coordinate>
<Latitude>35.43361111</Latitude>
<Longitude>-119.0566667</Longitude>
</Coordinate>
</Position>
<CityCode>BFL</CityCode>
<CountryCode>US</CountryCode>
<LocationType>Airport</LocationType>
<Names>
<Name LanguageCode="xx">Bakersfield</Name>
<Name LanguageCode="de">Bakersfield</Name>
<Name LanguageCode="en">Bakersfield</Name>
<Name LanguageCode="it">Bakersfield</Name>
<Name LanguageCode="fr">Bakersfield</Name>
<Name LanguageCode="es">Bakersfield</Name>
</Names>
<Distance>
<Value>337</Value>
<UOM>KM</UOM>
</Distance>
</Airport>
</Airports>
<Meta Version="1.0.0">
<Link Href="https://api.lufthansa.com/v1/references/airports/nearest/36.562,-115.596" Rel="self"/>
<Link Href="https://api.lufthansa.com/v1/references/cities/{cityCode}" Rel="related"/>
<Link Href="https://api.lufthansa.com/v1/references/countries/{countryCode}" Rel="related"/>
</Meta>
</NearestAirportResource>
Docs Navigation
- Lufthansa Open API
- Getting Started
- Public API Method Details
- Flight Schedules
- Reference Data
- Offers
- Operations
- Flight Schedules
- Flight Status
- Flight Status by Route
- Flight Status at Arrival Airport
- Flight Status at Departure Airport
- Flight Status Response
- Customer Flight Information
- Customer Flight Information at Arrival Airport
- Customer Flight Information by Route
- Customer Flight Information at Departure Airport
- Customer Flight Information Response
- Notifications
- cargo
- Partner API Method Details
- FlightOps/Crew API Method Details