{"id":3394,"library":"airportsdata","title":"Airports Data","description":"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.","status":"active","version":"20260315","language":"en","source_language":"en","source_url":"https://github.com/mborsetti/airportsdata/","tags":["airport","aerodrome","ICAO","IATA","location","timezone","data","aviation"],"install":[{"cmd":"pip install airportsdata","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false}],"imports":[{"symbol":"load","correct":"import airportsdata\nairports = airportsdata.load()"},{"symbol":"load_iata_macs","correct":"import airportsdata\niata_macs = airportsdata.load_iata_macs()"}],"quickstart":{"code":"import airportsdata\n\n# Load the entire airports database\nairports = airportsdata.load()\n\n# Get an airport by its ICAO code\nksea_airport = airports.get('KSEA')\nif ksea_airport:\n    print(f\"Airport Name: {ksea_airport['name']}\")\n    print(f\"City: {ksea_airport['city']}\")\n    print(f\"Country: {ksea_airport['country']}\")\n    print(f\"Timezone: {ksea_airport['tz']}\")\nelse:\n    print(\"KSEA not found.\")\n\n# Iterate through all airports (example: find all airports in Germany)\nprint('\\nAirports in Germany (first 5):')\ngermany_airports = [a for a in airports.values() if a['country'] == 'DE']\nfor i, airport in enumerate(germany_airports):\n    if i >= 5: break\n    print(f\"  - {airport['name']} ({airport['iata'] if airport['iata'] else 'N/A'})\")\n","lang":"python","description":"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."},"warnings":[{"fix":"Verify elevation data with official Aeronautical Information Publications (AIP) if precision is critical.","message":"The 'elevation' data for airports, representing the MSL elevation of the highest point of the landing area, is often inaccurate or approximate and should be used with caution.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If historical airport data is required, a different data source will be necessary.","message":"The database contains no historical data; closed airports are removed from the dataset. It only includes currently operational airports.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use `airportsdata.load_iata_macs()` if you need to work with airports that are part of a Multi Airport City.","message":"IATA Multi Airport Cities (MACs) are not treated as individual airports within the main `airportsdata.load()` dataset. A separate function, `airportsdata.load_iata_macs()`, is provided to access data for airports belonging to IATA MACs.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For comprehensive data on seaplane bases, heliports, or transportation stations, consult specialized databases.","message":"The database generally does not include seaplane bases or heliports unless they have an assigned IATA code. Similarly, surface transportation stations are not included, even if they possess an official IATA code.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}