{"openapi":"3.0.3","info":{"title":"Airports and Local Time API","version":"1.0.0","description":"72,549 airports, heliports and airfields worldwide —\neach with its IANA timezone, current local time, runway length and surface.\n\nThe open dataset almost every airport API is built on has no timezone field.\nSo they can tell you where an airport is, but not what time it is there,\nor what local time you land at. This one resolves the timezone for every\nairport offline and answers both.\n\nIt also knows runway lengths, so you can ask the question that actually\nmatters for charter, cargo and diversion planning: which fields near here\ncan take my aircraft.","contact":{"name":"API support"},"license":{"name":"Commercial"},"termsOfService":"https://airports.maodjinn.com/licenses"},"servers":[{"url":"https://airports.maodjinn.com"}],"paths":{"/v1/airports/{code}":{"get":{"summary":"Look up an airport","description":"Full record by IATA (LHR) or ICAO/ident (EGLL) code, including the current local time at that airport.","parameters":[{"name":"code","in":"path","required":true,"description":"IATA or ICAO/ident code.","example":"LHR","schema":{"type":"string"}}],"responses":{"200":{"description":"The airport, with its current local time.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/search":{"get":{"summary":"Search airports","description":"Ranked search across codes, airport names and city names. Exact code matches rank first, so searching \"LAX\" returns the airport rather than everything containing those letters.","parameters":[{"name":"q","in":"query","required":true,"description":"Search text: a code, an airport name or a city.","example":"heathrow","schema":{"type":"string"}},{"name":"country","in":"query","required":false,"description":"Restrict to an ISO 3166-1 alpha-2 country code.","example":"US","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Restrict to one airport type: small_airport, medium_airport, large_airport, heliport, seaplane_base, balloonport.","example":"large_airport","schema":{"type":"string","enum":["small_airport","medium_airport","large_airport","heliport","seaplane_base","balloonport"]}},{"name":"min_runway_ft","in":"query","required":false,"description":"Only airports whose longest runway is at least this long.","example":"6000","schema":{"type":"integer","minimum":0,"maximum":30000}},{"name":"scheduled_only","in":"query","required":false,"description":"Only airports with scheduled commercial service.","example":"true","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum results (1–100). Defaults to 10.","example":"10","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}}],"responses":{"200":{"description":"Matching airports, best match first.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/nearest":{"get":{"summary":"Find airports near a point","description":"Airports within a radius of any coordinate, nearest first, with distance and bearing. Combine with `min_runway_ft` to answer \"which fields near here can take my aircraft\" — the question charter, cargo and diversion planning actually asks.","parameters":[{"name":"lat","in":"query","required":true,"description":"Latitude in decimal degrees.","example":"51.5074","schema":{"type":"string"}},{"name":"lon","in":"query","required":true,"description":"Longitude in decimal degrees.","example":"-0.1278","schema":{"type":"string"}},{"name":"radius_km","in":"query","required":false,"description":"Search radius in kilometres (1–2000). Defaults to 100.","example":"100","schema":{"type":"integer","minimum":1,"maximum":2000,"default":100}},{"name":"country","in":"query","required":false,"description":"Restrict to an ISO 3166-1 alpha-2 country code.","example":"US","schema":{"type":"string"}},{"name":"type","in":"query","required":false,"description":"Restrict to one airport type: small_airport, medium_airport, large_airport, heliport, seaplane_base, balloonport.","example":"large_airport","schema":{"type":"string","enum":["small_airport","medium_airport","large_airport","heliport","seaplane_base","balloonport"]}},{"name":"min_runway_ft","in":"query","required":false,"description":"Only airports whose longest runway is at least this long.","example":"6000","schema":{"type":"integer","minimum":0,"maximum":30000}},{"name":"scheduled_only","in":"query","required":false,"description":"Only airports with scheduled commercial service.","example":"true","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum results (1–100). Defaults to 10.","example":"10","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}}],"responses":{"200":{"description":"Nearby airports with distance and bearing.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/distance":{"get":{"summary":"Distance between two airports","description":"Great-circle distance in kilometres, miles and nautical miles, plus the initial bearing.","parameters":[{"name":"from","in":"query","required":true,"description":"Origin airport code.","example":"LHR","schema":{"type":"string"}},{"name":"to","in":"query","required":true,"description":"Destination airport code.","example":"JFK","schema":{"type":"string"}}],"responses":{"200":{"description":"Distance in three units and the initial bearing.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/time":{"get":{"summary":"Current local time at an airport","description":"The airport’s IANA timezone, its current local date and time, and its present UTC offset — correct across daylight saving transitions.","parameters":[{"name":"code","in":"query","required":true,"description":"Airport code.","example":"NRT","schema":{"type":"string"}}],"responses":{"200":{"description":"Local date, time and UTC offset.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/arrival":{"get":{"summary":"Local arrival time","description":"Given a departure airport, a local departure time and a flight duration, returns the local arrival time at the destination. This is the calculation people get wrong by hand: it crosses timezone offsets, the date line and daylight saving all at once, and an answer that is a day out looks entirely plausible.","parameters":[{"name":"from","in":"query","required":true,"description":"Departure airport code.","example":"JFK","schema":{"type":"string"}},{"name":"to","in":"query","required":true,"description":"Arrival airport code.","example":"NRT","schema":{"type":"string"}},{"name":"duration_min","in":"query","required":true,"description":"Flight duration in minutes.","example":"840","schema":{"type":"integer","minimum":1,"maximum":1440}},{"name":"date","in":"query","required":false,"description":"Local departure date (YYYY-MM-DD). Defaults to today at the origin.","example":"2026-03-07","schema":{"type":"string"}},{"name":"time","in":"query","required":false,"description":"Local departure time (HH:MM). Defaults to 09:00.","example":"18:30","schema":{"type":"string"}}],"responses":{"200":{"description":"Departure and arrival in both local time and UTC, plus the calendar days crossed.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/types":{"get":{"summary":"List airport types","description":"The airport type values accepted by the `type` filter.","parameters":[],"responses":{"200":{"description":"Supported types.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Unknown airport.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}}},"security":[{"ApiKey":[]}]}