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.
pip install airportsdataVerified import paths — ran on the pinned version, not inferred.
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.
Verify elevation data with official Aeronautical Information Publications (AIP) if precision is critical.
If historical airport data is required, a different data source will be necessary.
Use `airportsdata.load_iata_macs()` if you need to work with airports that are part of a Multi Airport City.
For comprehensive data on seaplane bases, heliports, or transportation stations, consult specialized databases.
Install the package using pip: 'pip install airportsdata'.
Use the correct function provided by 'airportsdata', such as 'airportsdata.load()'.
Ensure that you are accessing data correctly, e.g., 'airports['JFK']' instead of 'airports('JFK')'.Verify that the key exists in the dataset and is used correctly, e.g., 'airports.get('JFK')' to avoid exceptions.Refer to the module's documentation to use the correct functions, such as 'airportsdata.load()'.