Easy access from R to the QPX Express Airfare API
You can install the package using the devtools package as follows:
devtools::install_github("RossiLorenzo/QPXapi")
There is only one exported function in the package called QPX. Using this function you'll connect to the API and download the JSON data obtained. You can then choose to get the results as they are or reshaped in a R data.frame (only a subset of fields). For example:
res <- QPX(apikey = "yourapikey", origin = "PSA", destination = "LON", date = Sys.Date() + 1)
this call will return the flights from Pisa to London for tomorrow in a R data.frame
In order to use this package you need to obtain an API key. You can find a comprehensive guide on how to do this HERE. The main steps are:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.