PHP - Flight price sniffer
What is this about?
I decided to track the airline prices fluctuations and tried to build a model to predict when to buy and when to wait.
What tools are used?
Written in PHP, the class calls the Kayak.com API.
Feel free to download the class and improve it (it needs lots of improvements!)
Also, I would appreciate it if you could email me any modifications you bring to the class
Send your tweaks to
We also use a MySQL database to store all information gathered from querying the kayak.com API.
Graphs are drawn using a modified version of the pChart class.
Coding is done using a simple text editor.
We query the kayak website several times aday and only keep the cheapest price for a given trip
This study will be conducted in two waves:
- First we will focus on simple non-stop round trip flights
- Second, we will gather data from single flights (a non-stop round trip flight is composed of two flights)
- Then we plan on matching the fluctuation with the price of gas, and the exchange rate USD / EUR
- Finally, we plan on studying multiple stop, international flights
Do you have some examples?
Below are some examples for illustration purposes only. Data is updated several times everyday.
- Click here to see the graph for Paris to St Louis