Guides

Using Ryanair Rooms API

Disclaimer:

All API’s are accessible through https://apigateway.ryanair.com

In this guide we are going to explain how to use Ryanair Rooms API for the purpose of searching Ryanair's 1,200,000 + accommodations, retrieving properties listings and getting individual property details.

As per any API integration, you'll require your apikey - instructions on how to get it can be found here.

The base URL for this API is:

  https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/

 

Our Target Method will be: propertyOffers

And a subset of parameters for simple query: 

 

Parameter
Optional
Type
Description
Example
checkinDate no Date The check in date for the filtered results, in the format YYYY-MM-DD &checkindate=2018-08-01
checkoutDate no Date The check out  date for the filtered results, in the format YYYY-MM-DD. Note that the check out date must be less than 28 days after the check in date. &checkindate=2018-08-10
roomAllocations no Integer The number of persons in the room. &roomAllocations=2
place no String URI encoded the requested desintation, for example "Wroclaw" &place=wroclaw
categories no Integer The accommodations Rating (stars, typically 1-5), as a single value, or a series of values &categpries=5
currencyCode no String Currency code per ISO 4217 &currencyCode=EUR
market no String The culture code for the search, locale and language, for example english language, Ireland is en-ie.

&market=en-ie

size Yes Integer The number of results to be returned. &size=30
page Yes Integer Pagination based on the size parameter  &page=0

Lets take a practical example, I'd like to get a list of properties in Wroclaw from August 1st to August 10th. Being a well travelled and funded developer, working on cutting edge technology and attending Hackathons for Ryanair, Europe's Number 1 Airline, I'd like a 4 star hotel. And of course, my "better half will be traveling with me to explore the wonders of Wroclaw, and take in some shopping"
 

The Required Parameters are …

  • checkinDate=2018-08-01
  • checkoutDate=2018-08-10
  • roomAllocations=2
  • place=wroclaw
  • categories=4
  • currencyCode=EUR
  • market=en-ie
  • page=0
  • size=10
     
https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/propertyOffers?checkinDate=2018-08-01&checkoutDate=2018-08-10&roomAllocations=2&place=wroclaw&categories=4&currencyCode=EUR&market=en-ie&page=0&size=10

Lets test it, and don’t forget our {API Key}

​curl "https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/propertyOffers?checkinDate=2018-08-01&checkoutDate=2018-08-10&roomAllocations=2&place=wroclaw&categories=4&currencyCode=EUR&market=en-ie&page=0&size=10&apikey={YOUR API KEY}"

 

And Boom! There's a lot of useful data returned, lets take a look at … the important parts….

The base JSON response is as follows:

{
"results": [
{propertySummary, distance, offers[]},
{propertySummary, distance, offers[]}, 
{propertySummary, distance, offers[]},
…..]
"Total": <the total number of results in the search>
}

Lets look at the some of the fields data within :

propertySummary

  • ProviderID
  • ryanairId
  • Id
  • Name
  • description
  • Address
  • Location
  • countryCode
  • coordinates
  • category
  • Rating
  • Images
  • propertyType

 

distance

  • value: <a metric>,
  • unit: "<the type of metric, example, KM"

 

Offers  [offers consists of a collection of property offers from each provider, each offer includes…]

  • providerId
  • providerPropertyId
  • minPrice
  • facilities
  • freeCancellation

 

Here's a snipped from our call earlier…

 

{
  "results": [{
    "propertySummary": {
      "providerId": "hrs",
      "ryanairId": "c5413c37b8e17eda0726162d297d26e6",
      "id": "698762",
      "name": "Aparthotel Wierzbowa",
      "description": "The Aparthotel Wierzbowa in Wroclaw offers you modern and comfortable apartments in different sizes. You can use a fully equipped kitchen for preparing your own meal.The apartments in Wroclaw are situated only a short walk from the historic market square in the city centre. Due to its convenient location, you can reach many sights, cinemas, theatres and shops on foot, which is perfect for city travellers.All apartments are  newly renovated in stylish modern way, making you feel comfortable and relaxed during your stay.\r\n\r\nRECEPTION IS OPEN 24/7. PLEASE KINDLY CONTACT US EARLIER TO ARRANGE KEY COLLECTION: +48 515202334\r\nAt check-in you are required to pay a deposit in the amount of PLN 500 for incidental charges. The deposit is refundable upon departure after checking the condition of the room, or stopped in the event of breach of house rules.\r\nAparthotel Wierzbowa is a non smoking place.",
      "address": "Ul. Wierzbowa 3, Wrocław",
      "location": {
        "city": "Wrocław"
      },
      "countryCode": "pl",
      "coordinates": {
        "longitude": 17.036948,
        "latitude": 51.106716
      },
      "category": 4,
      "rating": {
        "value": 8.4,
        "code": "VERY_GOOD"
      },
      "images": [
        "https://foto.hrsstatic.com/fotos/0/3/256/256/80/FFFFFF/http%3A%2F%2Ffoto-origin.hrsstatic.com%2Ffoto%2F6%2F9%2F8%2F7%2F%2Fteaser_698762.jpg/mihRXnqudX1ZwRh%2B%2BTrftw%3D%3D/2464%2C1632/6/Aparthotel_Wierzbowa-Wroclaw-Apartment-32-698762.jpg"
      ],
      "propertyType": "HOTEL"
    },
    "distance": {
      "value": 0.17093469293564223,
      "unit": "KM"
    },
    "offers": [{
        "providerId": "hrs",
        "providerPropertyId": "698762",
        "minPrice": {
          "price": {
            "customerPrice": {
              "value": 395.23,
              "currencyCode": "EUR"
            },
            "propertyPrice": {
              "value": 1689,
              "currencyCode": "PLN"
            },
            "travelCredit": {
              "value": 39.52,
              "currencyCode": "EUR"
            }
          },
          "travelCredit": {
            "customerPrice": {
              "value": 39.52,
              "currencyCode": "EUR"
            },
            "propertyPrice": {
              "value": 168.9,
              "currencyCode": "PLN"
            },
            "travelCredit": {
              "value": 3.95,
              "currencyCode": "EUR"
            }
          },
          "originalPrice": {
            "customerPrice": {
              "value": 479.47,
              "currencyCode": "EUR"
            },
            "propertyPrice": {
              "value": 2049,
              "currencyCode": "PLN"
            },
            "travelCredit": {
              "value": 47.94,
              "currencyCode": "EUR"
            }
          },
          "deposit": null,
          "paymentMode": "PAY_LATER",
          "promoType": "REGULAR_PROMOTION",
          "surcharges": [{
            "type": "TAX_AND_FEES",
            "price": {
              "customerPrice": {
                "value": 29.28,
                "currencyCode": "EUR"
              },
              "propertyPrice": null,
              "travelCredit": {
                "value": 2.92,
                "currencyCode": "EUR"
              }
            }
          }],
          "rateDescription": "Standard room",
          "discountPercentage": 18
        },
        "facilities": [{
            "id": "7205",
            "description": "WLAN in room",
            "type": "WIFI",
            "availability": "ROOM"
          },
          {
            "id": null,
            "description": null,
            "type": "INTERNET_ACCESS",
            "availability": "ROOM"
          }
        ],
        "freeCancellation": true,
        "allotment": null
      },
      {
        "providerId": "htc",
        "providerPropertyId": "559274",
        "minPrice": {
          "price": {
            "customerPrice": {
              "value": 432.63,
              "currencyCode": "EUR"
            },
            "propertyPrice": {
              "value": 432.63,
              "currencyCode": "EUR"
            },
            "travelCredit": {
              "value": 43.26,
              "currencyCode": "EUR"
            }
          },
          "travelCredit": {
            "customerPrice": {
              "value": 43.26,
              "currencyCode": "EUR"
            },
            "propertyPrice": {
              "value": 43.26,
              "currencyCode": "EUR"
            },
            "travelCredit": {
              "value": 4.32,
              "currencyCode": "EUR"
            }
          },
          "originalPrice": {
            "customerPrice": {
              "value": 432.63,
              "currencyCode": "EUR"
            },
            "propertyPrice": null,
            "travelCredit": {
              "value": 43.26,
              "currencyCode": "EUR"
            }
          },
          "deposit": null,
          "paymentMode": null,
          "promoType": null,
          "surcharges": [{
            "type": "TAX_AND_FEES",
            "price": {
              "customerPrice": {
                "value": 32.1,
                "currencyCode": "EUR"
              },
              "propertyPrice": null,
              "travelCredit": {
                "value": 3.21,
                "currencyCode": "EUR"
              }
            }
          }],
          "rateDescription": "Standard Studio, 1 King Bed",
          "discountPercentage": 0
        },
        "facilities": [{
            "id": "2192",
            "description": "Free Wireless Internet",
            "type": "FREE_WIFI",
            "availability": "ROOM"
          },
          {
            "id": "2205",
            "description": "Breakfast Buffet",
            "type": "FREE_BREAKFAST",
            "availability": "ROOM"
          }
        ],
        "freeCancellation": false,
        "allotment": null
      }
    ]
  }]
}

 

Super! We now have a lot of info on the properties meeting  our requirement but being I'd like some details on the hotel please. YES, WE HAVE AN API FOR THAT TOO…
 
Given that we already have the room and provider details, lets query that directly, with most of the same  parameters:

https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/propertyOffers/provider/<theprovider from the offers in our result list>/property/<the  propertyProviderID value from the offers>?checkinDate=<the same check in date as in your listing query>&checkoutDate=<the same check out date as in your listing query>&roomAllocations=<the same allocations value as your listings query>&currencyCode=<your ISO currency code>&market=<the same culture code as your listings query>

Don’t forget your API key!

 
So our endpoint would be….  

https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/propertyOffers/provider/htc/property/698762?checkinDate=2018-08-01&checkoutDate=2018-08-10&roomAllocations=2&currencyCode=GBP&market=en-gb&apikey={YOUR API KEY}

Lets test it!

curl "https://apigateway.ryanair.com/pub/v1/rooms/ha/v2/propertyOffers/provider/htc/property/698762?checkinDate=2018-08-01&checkoutDate=2018-08-10&roomAllocations=2&currencyCode=GBP&market=en-gb&apikey={YOUR API KEY}"

Another BOOM ! - We now have the complete property details, again, a lot of useful data in there, lets take a looks at some  key details :
The JSON response primarily consists of the following but based on the provider, some field (for example images of a room) may not be included.

{
  propertyDetails
    propertySummary
      Name
      Description
      Address
      Location
      countryCode
      Coordinates
      Category
      Rating
      Images (URL's)
    checkinTime
    checkoutTime
    Policies (hotel policies)
    Facilities [List of Facilities available.]
    acceptedCreditCards [List of accepted credit cards]
   
   
  roomTypes [List of room types, included in each : ]
    Name
    Description
    Imates [ List of Room Images]
    Facilities [List of Facilities available in the room.]
    Rooms [Individual room details]
      maxOccupancy
      policies
      cancellationPolicies
      bedTypes
      Name
      description
}