Skip to content

RossiLorenzo/QPXapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QPXapi

Easy access from R to the QPX Express Airfare API

Installation

You can install the package using the devtools package as follows:

devtools::install_github("RossiLorenzo/QPXapi")

Usage

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

API key

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:

  1. If you don't have one, get a Google account
  2. Go to the Google Developers Console
  3. Create a New Project and give it the name you like the most
  4. On the sidebar menu click on APIs & Auth -> APIs
  5. In the search box digit QPX and then click on the result (QPX Express Airfare API)
  6. Click on the blue button: 'Enable API'
  7. In the sidebar menu select Credentials
  8. Click on Add credentials and then choose API key -> server key
  9. Create the key
  10. You should now have you personal API key. Do not share it with anyone.

About

Access to QPX Express API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages