Search flights
search_flightsFind flights for any AENA airport in Spain. Filter arrivals or departures by flight number and local time window, with codeshares merged.
Instructions
List flights for an AENA airport (arrivals or departures). Codeshares of the same physical flight are collapsed into one entry by default. Filter by flight number and/or a local-time window (e.g. afternoon = fromLocal 12:00, toLocal 20:00). Times in the output are local Madrid time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Only flights on this local date (YYYY-MM-DD). Defaults to today when fromLocal/toLocal is set. | |
| source | No | auto | |
| airport | Yes | Airport IATA code, e.g. MAD, BCN, SCQ | |
| toLocal | No | Only flights scheduled at or before this local time (HH:MM), e.g. 20:00 for afternoon | |
| direction | Yes | ||
| fromLocal | No | Only flights scheduled at or after this local time (HH:MM), e.g. 12:00 for afternoon | |
| hoursBack | No | REST window: hours into the past | |
| flightNumber | No | Filter client-side, e.g. IB0459 or UX7235 | |
| hoursForward | No | REST window: hours into the future | |
| collapseCodeshares | No | Collapse codeshares of the same flight into one entry (default true) |