Allow you query flight fares from command line
-
Get an api key from
https://developers.google.com/qpx-express/v1/prereqs -
Replace
__API_KEY__inqueryUtil.apiwith your api key -
run
query.py --from <origin1, origin2...> -to <dest1, dest2...> --startDate <YYYY-MM-DD> --startDateRange <int> --returnDate <YYYY-MM-DD> --returnDateRange <int> --alliance <STAR, SKYTEAM, ONEWORLD> -
The results will be stored in a html file under
data/html -
The results table is sortable by clicking on the table header
from: an array of departing airportsto: an array of destination airportsstartDate: the startDate of the trip, in the format of YYYY-MM-DDstartDateRange: an indicator of flexibility, for example, if your startDate is 2014-09-29, startDateRange is 2, this will query departing flights on 2014-09-29 and 2014-09-30returnDate(optional): the return date of the tripreturnDateRange(optional):an indicator of flexibility, for example, if your returnDate is 2014-09-29, returnDateRange is 2, this will query returning flights on 2014-09-29 and 2014-09-30alliance(optional): preferred alliance. "STAR" or "SKYTEAM" or "ONEWORLD"
./query.py --from "pek, hkg" --to "sfo" --startDate "2015-01-03" --startDateRange 2 --alliance "STAR"
- Output table is not sortable in Chrome (works in Firefox and Safari)
