{"openapi":"3.1.0","info":{"title":"Flight Information API","description":"\nFlight status and schedule by flight number and local departure date, plus a\nfree airport catalogue with IANA time zones.\n\n**Authorisation:** send your key in the `X-API-Key` header. Paid calls return\nthe remaining balance in the `X-Usage-Left` response header.\n\n**Errors** are JSON: `{\"detail\": \"...\", \"code\": \"...\"}` — branch on `code`.\n\nFlight data by [AeroDataBox](https://aerodatabox.com). Airport data:\n[OurAirports](https://ourairports.com), public domain.\n","version":"1.0.0"},"servers":[{"url":"https://flightinfo-api.siltrium.com"}],"paths":{"/flights/{flight_number}":{"get":{"tags":["flights"],"summary":"Flight status by flight number or aircraft registration and local departure date","description":"Flights that depart on `date` (local time of the departure airport) under a flight number\n(`LH400`, `DLH400`) or flown by an aircraft (`N740JS`, `D-AIXC`). Uses `FLIGHT_PRICE`\nrequests from your key; a cached answer costs the same. `404 flight_not_found` is charged —\nthe provider bills the lookup.","operationId":"get_flight_flights__flight_number__get","parameters":[{"name":"flight_number","in":"path","required":true,"schema":{"type":"string","title":"Flight Number"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Local departure date, YYYY-MM-DD","title":"Date"},"description":"Local departure date, YYYY-MM-DD"},{"name":"by","in":"query","required":false,"schema":{"type":"string","description":"What `flight_number` is: auto (flight number, else aircraft registration), number, reg, callsign or icao24","default":"auto","title":"By"},"description":"What `flight_number` is: auto (flight number, else aircraft registration), number, reg, callsign or icao24"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/airports":{"get":{"tags":["airports"],"summary":"Search airports","operationId":"search_airports_airports_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":64,"description":"IATA / ICAO code, name or city","title":"Q"},"description":"IATA / ICAO code, name or city"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AirportSearch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/airports/{code}":{"get":{"tags":["airports"],"summary":"Airport by IATA or ICAO code","operationId":"get_airport_airports__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AirportOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/airports/{from_code}/{to_code}/time-difference":{"get":{"tags":["airports"],"summary":"Time difference between two airports","operationId":"time_difference_airports__from_code___to_code__time_difference_get","parameters":[{"name":"from_code","in":"path","required":true,"schema":{"type":"string","title":"From Code"}},{"name":"to_code","in":"path","required":true,"schema":{"type":"string","title":"To Code"}},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO date-time (UTC if no offset) or YYYY-MM-DD (12:00 UTC); default now","title":"At"},"description":"ISO date-time (UTC if no offset) or YYYY-MM-DD (12:00 UTC); default now"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeDifference"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage":{"get":{"tags":["account"],"summary":"Status of your key","operationId":"usage_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyStatus"}}}}}}},"/health":{"get":{"tags":["service"],"summary":"Service health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"Aircraft":{"properties":{"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"reg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reg"}},"type":"object","required":["model","reg"],"title":"Aircraft"},"Airline":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"iata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iata"},"icao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icao"}},"type":"object","required":["name","iata","icao"],"title":"Airline"},"AirportOut":{"properties":{"id":{"type":"integer","title":"Id"},"iata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iata"},"icao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icao"},"name":{"type":"string","title":"Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country_code":{"type":"string","title":"Country Code"},"lat":{"type":"number","title":"Lat"},"lon":{"type":"number","title":"Lon"},"time_zone":{"type":"string","title":"Time Zone"},"type":{"type":"string","title":"Type"},"local_time":{"type":"string","title":"Local Time","description":"Current local time at the airport"},"utc_offset":{"type":"string","title":"Utc Offset"}},"type":"object","required":["id","iata","icao","name","city","country_code","lat","lon","time_zone","type","local_time","utc_offset"],"title":"AirportOut"},"AirportRef":{"properties":{"iata":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iata"},"icao":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icao"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"time_zone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Time Zone","description":"IANA time-zone name, e.g. Europe/Amsterdam"}},"type":"object","required":["iata","icao","name","city","country_code","time_zone"],"title":"AirportRef"},"AirportSearch":{"properties":{"query":{"type":"string","title":"Query"},"count":{"type":"integer","title":"Count"},"airports":{"items":{"$ref":"#/components/schemas/AirportOut"},"type":"array","title":"Airports"}},"type":"object","required":["query","count","airports"],"title":"AirportSearch"},"Flight":{"properties":{"flight_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flight Number"},"airline":{"anyOf":[{"$ref":"#/components/schemas/Airline"},{"type":"null"}]},"status":{"type":"string","title":"Status"},"codeshare_status":{"type":"string","title":"Codeshare Status"},"is_cargo":{"type":"boolean","title":"Is Cargo"},"departure":{"anyOf":[{"$ref":"#/components/schemas/Movement"},{"type":"null"}]},"arrival":{"anyOf":[{"$ref":"#/components/schemas/Movement"},{"type":"null"}]},"scheduled_duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scheduled Duration Minutes"},"time_difference_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Difference Minutes","description":"Arrival UTC offset at arrival minus departure UTC offset at departure"},"aircraft":{"anyOf":[{"$ref":"#/components/schemas/Aircraft"},{"type":"null"}]},"last_updated_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated Utc"}},"type":"object","required":["flight_number","airline","status","codeshare_status","is_cargo","departure","arrival","scheduled_duration_minutes","time_difference_minutes","aircraft","last_updated_utc"],"title":"Flight"},"FlightsResponse":{"properties":{"flight_number":{"type":"string","title":"Flight Number","description":"The searched value, normalised (flight number or registration)"},"search_by":{"type":"string","title":"Search By","description":"number, reg, callsign or icao24"},"date":{"type":"string","title":"Date"},"flights":{"items":{"$ref":"#/components/schemas/Flight"},"type":"array","title":"Flights"},"source":{"additionalProperties":true,"type":"object","title":"Source"},"cached":{"type":"boolean","title":"Cached"},"fetched_at":{"type":"string","title":"Fetched At"}},"type":"object","required":["flight_number","search_by","date","flights","source","cached","fetched_at"],"title":"FlightsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"KeyStatus":{"properties":{"usage_left":{"type":"integer","title":"Usage Left"},"is_demo":{"type":"boolean","title":"Is Demo"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"expired":{"type":"boolean","title":"Expired"}},"type":"object","required":["usage_left","is_demo","created_at","expires_at","expired"],"title":"KeyStatus"},"Movement":{"properties":{"airport":{"anyOf":[{"$ref":"#/components/schemas/AirportRef"},{"type":"null"}]},"scheduled":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled","description":"Scheduled time, ISO 8601 in the airport's local time with offset"},"scheduled_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled Utc"},"revised":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revised","description":"Actual or estimated time, local with offset"},"runway":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runway"},"delay_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay Minutes","description":"revised − scheduled; null when unknown; negative when early"},"terminal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terminal"},"gate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gate"},"check_in_desk":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Check In Desk"},"baggage_belt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baggage Belt"},"quality":{"items":{"type":"string"},"type":"array","title":"Quality","description":"Basic / Live / Approximate — how reliable the times are"}},"type":"object","required":["airport","scheduled","scheduled_utc","revised","runway","delay_minutes","terminal","gate","check_in_desk","baggage_belt","quality"],"title":"Movement"},"TimeDifference":{"properties":{"from_airport":{"$ref":"#/components/schemas/AirportOut"},"to_airport":{"$ref":"#/components/schemas/AirportOut"},"at":{"type":"string","title":"At"},"from_offset_minutes":{"type":"integer","title":"From Offset Minutes"},"to_offset_minutes":{"type":"integer","title":"To Offset Minutes"},"difference_minutes":{"type":"integer","title":"Difference Minutes","description":"to − from; positive when the destination is ahead"}},"type":"object","required":["from_airport","to_airport","at","from_offset_minutes","to_offset_minutes","difference_minutes"],"title":"TimeDifference"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"flights","description":"Flight status and schedule (uses requests from your key)."},{"name":"airports","description":"Airport catalogue and time zones (free)."},{"name":"account","description":"Key status."},{"name":"service","description":"Service health."}]}