Search Flights (AI)
Direct flights into the airports that serve a destination -- origin, weekdays, local arrival times, season and air distance
Same in API v1.0 and v1.1
/ai/flightsDirect flights observed landing at the airports that serve a place over the latest season (for one location whose drive times are known, the three with observed flights it reaches fastest by car, otherwise its two nearest airports with observed flights; for a name that covers several locations, the two, and for a sailing region or country the three: first the airport most of its locations reach fastest by car, then those most of its locations have a stored drive to, each location without drive times counting toward its nearest airport), from ADS-B flight logs (MrAirspace, ODbL). One row per origin and destination airport, with every airline on that pair folded together. It names no airline and no price, and it is not a timetable or a booking. Only flights by passenger airlines are counted, and a row shows that their aircraft land there on that pattern, not that a guest can buy a seat.
Authentication
No authentication required. Sending your key is optional -- see the overview. Shares the /api/ai/* rate limit of up to 60 requests per 10 minutes (30 for Custom GPT clients) without a key -- a ceiling to stay under rather than an exact allowance, and a valid API key has its own, larger allowance; see Rate limits.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location | string | No | Destination name, resolved by the same resolver as boat search (marina, city, island, sailing region or country). It is mapped to the airports with observed direct flights that serve it (for one location whose drive times are known, the three it reaches fastest by car, with drive_minutes, drive_km and ferry, otherwise its two nearest; for a name that covers several locations, the two, and for a region or country the three: first the airport most of its locations reach fastest by car, then those most of its locations have a stored drive to, each location without drive times counting toward its nearest airport), and the response says which place that was in location_matched. A name that resolves to nothing returns an empty list with location_unresolved -- never flights somewhere else. |
location_id | integer | No | Exact location ID; mapped to the three airports with observed flights it reaches fastest by car where its drive times are known, otherwise its two nearest. Takes precedence over location. A value that is not a positive integer, or an id that matches no published location, returns an empty list with location_unresolved. |
from | string | No | The guest's departure: one or more origin airport ICAO codes, comma-separated (a word of an origin airport's name also matches, case-insensitive). Only flights from those airports are returned, ordered by the order of airports, then most flown. When none match, flights is empty with the zero-results block -- never flights from another origin. Without it, every origin is listed. |
limit | integer | No | Max flights (default: 5, max: 50) |
One of location or location_id is needed.
Request
Which airport to fly into for a place is in location details (airports); this endpoint is for the flights themselves.
Response
| Field | Meaning |
|---|---|
airports | The airport(s) the place was mapped to. For one location whose drive times are known, each with drive_minutes and drive_km by car from the location's landing, and ferry: true when that drive includes a ferry crossing; the airports are then in order of drive time. For several locations, no drive time, and ferry is true or false by whether most of the locations that store a drive to that airport cross by ferry, absent where none does. |
total_matching | Every flight into those airports (from from, when given); flights holds the first limit, most flown first. |
weekdays | The days it lands, Mo to Su. |
arrivals | Landing times per weekday, local time at the destination airport. |
km | Great-circle distance between the two airports. Absent when an airport's position is unknown. |
year_round | true: flies all year, and no dates are given. |
season_start | First landing of the season. |
season_end | Last landing, when the route had stopped by the end of the data. |
season_end_last_year | When the route is still flying (no season_end): the date it stopped the year before, where known. |
A date that is absent is not known.
When nothing matches, flights is empty and the response carries the shared zero-results block -- no_results (searched, why, try_next) plus a one-line note.