-
Notifications
You must be signed in to change notification settings - Fork 4
Flightdata API
The flightdata API offers several parameters to allow a granular filtering on specific flight attributes.
Base URL https://mobility.api.opendatahub.com/v2/flat%2Cnode/Flight
Default limit is 200 records, so with the following parameters it is possible to retrieve all data without limit.
limit=-1
offset=0
shownull=false
distinct=true
In order to filter on all active flights (not in the past), on "departure_timestamp" and on "arrival_timestamp" a where
parameter can be added.
The following example combines all those parameters and looks like:
In particular the request parameters where=and(smetadata.departure_timestamp.gt.1676647946,smetadata.departure_timestamp.lt.1676734346)
list all active flights between 18/02/2023 and 19/02/2023.
lt
means "less than" and gt
means "greater than.
By default the API answers with all fares attached to a specific flight. When setting the attribute parameters to "smetadata.fares", the API only shows the fares attributes. This is particulary useful when retriving only prices without all the rest, i.e. querying the lowest fare for a flight could be done by filtering on the name of an according fare: SKY GO = SKY_GO. So the following combinations are possible:
-
Only SKY_GO prices
-
Only SKY_PLUS price
-
Only the price for an adult in the "SKY_GO" fare:
This wiki contains additional information about the Open Data Hub alongside the Open Data Hub - Official Documentation 🔗 .