Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Skyscanner API guide - LauzHack'16

Skyscanner API guide - LauzHack'16

Skyscanner Flights & Hotels API guide. Presented at Lauzhack'16
Blog post at https://esaezgil.com/events/

Enrique Saez Gil

November 19, 2016
Tweet

More Decks by Enrique Saez Gil

Other Decks in Technology

Transcript

  1. View Slide

  2. Flights Hotels Car Hire

    View Slide

  3. View Slide

  4. View Slide

  5. Resources
    https://github.com/Skyscanner/skyscanner-python-sdk https://duckduckgo.com/?q=skyscanner+api+cheatsheet&t=h_&i
    a=cheatsheet
    https://github.com/search?o=desc&q=partners.api.skyscanner.ne
    t&ref=searchresults&s=indexed&type=Code&utf8=%E2%9C%93
    Docs:
    https://support.business.skyscanner.net/hc/en-
    us/categories/201253249-Documentation

    View Slide

  6. Postman collection (Flights & Hotel queries):
    https://drive.google.com/open?id=0B8qoMCJeZpJATG92Z01na1cyNDA
    http://www.getpostman.com/

    View Slide

  7. Challenge: Hotels & Fights APIs

    View Slide

  8. Flights
    1. Get API Key
    2. Query Autosuggest for city/country/airport identifiers (SkyscannerID)
    3. Query Browse Cache with SkyscannerID
    4. Create the referral

    View Slide

  9. Get API Key
    http://en.business.skyscanner.net/

    View Slide

  10. Location Autosuggest
    From Paris To London
    For a list of places
    http://partners.api.skyscanner.net/apiservices/autosuggest/v1.0/UK/GBP/GB-EN/?query=london&apiKey={APIKey}

    View Slide

  11. Cheapest prices from London to Spain
    http://partners.api.skyscanner.net/apiservices/browseroutes/v1.0/UK/GBP/en-GB/LOND-sky/ES-
    sky/anytime/anytime?apiKey=sk854555384432693416428070885899&application=json

    View Slide

  12. Cheapest prices from London to Spain

    View Slide

  13. Cheapest prices London-Paris by Date
    http://partners.api.skyscanner.net/apiservices/browsedates/v1.0/UK/GBP/en-GB/LOND-sky/PARI-sky/2016-
    12/2016-12?apiKey=sk854555384432693416428070885899&application=json

    View Slide

  14. Cheapest prices London-Paris by Date

    View Slide

  15. Grid of prices: London-Paris in January

    View Slide

  16. Create the referral
    http://partners.api.skyscanner.net/apiservices/referra
    l/v1.0/GB/GBP/en-GB/LOND-sky/PARI-sky/2016-12-
    12/2016-12-20?apiKey=prtl674938798674
    Same as for the Browse Cache Service

    View Slide

  17. Hotels
    1. Query Autosuggest for city/country/airport identifiers (SkyscannerID)
    2. Create Hotel Session
    3. Create Hotels Polling
    4. Create Hotel Details (with booking link)

    View Slide

  18. Hotel Autosuggest
    For a list of places
    http://partners.api.skyscanner.net/apiservices/hotels/autosuggest/v2/UK/EUR/en-
    GB/paris?apikey=prtl6749387986743898559646983194&application=json

    View Slide

  19. Create Hotel Session
    http://partners.api.skyscanner.net/apiservices/hotels/liveprices/v2/UK/EUR/en-
    GB/27539733/2016-12-04/2016-12-
    10/2/1?apiKey=prtl6749387986743898559646983194
    Check Skyscanner Docs/ Postman Collection

    View Slide

  20. Hotel Prices (Polling)
    Check Skyscanner Docs/ Postman Collection

    View Slide

  21. Hotel Details (with booking link)
    Check Skyscanner Docs/ Postman Collection

    View Slide

  22. Extra: Flights Live Pricing service

    View Slide

  23. Questions/Help?
    We came from Barcelona to help you J
    • Slack #skyscanner
    • Come by our stand (cool merchandise included)
    Enrique Saez Gil
    @esaezgil
    @eqirn
    Software Engineer @
    Manuel Miranda de Cid
    @argaen
    @blckdt
    Software Engineer @

    View Slide