Airports Data

20260315 · active · verified Sat Apr 11

airportsdata is a Python library providing an extensive database of location and timezone data for nearly every operational airport and landing strip in the world. As of version 20260315, it contains over 28,000 entries with ICAO, IATA, name, city, country, elevation, latitude, longitude, and timezone information. It is actively maintained with frequent data updates, often on a monthly or bi-monthly basis.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to load the airport database and retrieve information by ICAO code, as well as how to filter and iterate through the airport data.

import airportsdata

# Load the entire airports database
airports = airportsdata.load()

# Get an airport by its ICAO code
ksea_airport = airports.get('KSEA')
if ksea_airport:
    print(f"Airport Name: {ksea_airport['name']}")
    print(f"City: {ksea_airport['city']}")
    print(f"Country: {ksea_airport['country']}")
    print(f"Timezone: {ksea_airport['tz']}")
else:
    print("KSEA not found.")

# Iterate through all airports (example: find all airports in Germany)
print('\nAirports in Germany (first 5):')
germany_airports = [a for a in airports.values() if a['country'] == 'DE']
for i, airport in enumerate(germany_airports):
    if i >= 5: break
    print(f"  - {airport['name']} ({airport['iata'] if airport['iata'] else 'N/A'})")

view raw JSON →