Closed pakair closed 2 years ago
Hello,
The API will reply with a JSON string. It's divided in 3 sections ("request" - provides information about your account and your request quota, "response" - contains flight information and "terms" - what you can and cannot do with the service. Here's a sample with the request section truncated:
{"request":{"lang":"en",...}},
"response:[{"airline_iata":"QT","airline_icao":"TPA","flight_iata":"QT4211","flight_icao":"TPA4211","flight_number":"4211","dep_iata":"MIA","dep_icao":"KMIA","dep_terminal":null,"dep_gate":null,"dep_time":"2022-07-23 00:45","dep_time_utc":"2022-07-23 04:45","arr_iata":"BOG","arr_icao":"SKBO","arr_terminal":null,"arr_gate":null,"arr_baggage":null,"arr_time":"2022-07-23 03:25","arr_time_utc":"2022-07-23 08:25","cs_airline_iata":null,"cs_flight_number":null,"cs_flight_iata":null,"status":"landed","duration":220,"delayed":null,"aircraft_icao":"A332","arr_time_ts":1658564700,"dep_time_ts":1658551500}],
"terms":"Unauthorized access is prohibited and punishable by law. \nReselling data 'As Is' without AirLabs.Co permission is strictly prohibited. \nFull terms on https://airlabs.co/. \nContact us info@airlabs.co"}
I discard the "request" and "terms" sections and only process the "response" data.
you can see more here on the schedules endpoint of the API: https://airlabs.co/docs/schedules
Thank you so much!
can you provide 5 lines of sample data so I can test that the code works, then I can request an api key from airlabs.co ?
(not sure how I label this as enhancement)