Free Hotel Prices API

Xotelo is a simple and lightweight API for gettings hotel rates with based on TripAdvisor.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
GET https://data.xotelo.com/api/rates
"rates" : [
    {
        "code": "HotelsCom2",
        "name": "Hotels.com",
        "rate": 5259.00
    },{
        "code": "Expedia",
        "name": "Expedia",
        "rate": 5399.50
    },
    [...]
]

XOTELO

The Xotelo API is capable of delivering real-time hotel or hostel prices data. The API comes with multiple endpoints, each serving a different use case. Endpoint functionalities include getting the latest prices data for all available OTA based with TripAdvisor website.

The reponse data is made available through a powerful RESTful api in a structured JSON format.

We simplify the process of Hotel booking api integration and help power your hotel backend so you can focus on delivering value to your customers.



Getting Started


Available Endpoints

The Xotelo API comes with X API endpoints, each providing a different functionality.

  • Latest rates endpoint (/rates)
    Returns real-time rate data for all available deals.
  • Latest day heatmap endpoint (/heatmap)
    Returns real-time day heatmap (average price days, high price days, cheap price day).

# Get Rate Prices

Definitions
Definition Description Default
Hotel Key (hotel_key)* A unique key assigned to each Hotel used to matching with TripAdvisor. How to get Hotel Key
Currency (currency) Refers to the three-letter currency code of a given currency (USD, GBP, EUR, CAD, CHF, AUD, JPY, CNY, INR, THB, BRL, HKD, RUB, BZD) USD
Check-in Date (chk_in)* Check-In date. (Format YYYY-MM-DD ex. 2019-05-31 for 31 May 2019)
Check-out Date (chk_out)* Check-Out date. (Format YYYY-MM-DD ex. 2019-05-31 for 31 May 2019)
Rooms (rooms) Number of rooms. (maximum value is 8) 1
Adults (adults) Number of adults. (maximum value is 32) 1
Age of children (age_of_children) Age of children, separate by comma (,). Ex: 0,4,7 for 3 children)
- If age is 0-1 years old, should put 0
- Available age is between 0 to 17

Base URL
https://data.xotelo.com/api

Append your Hotel Key: Here is how to define hotel with the Hotel API (How to get Hotel Key)

Endpoint: rates

Method: GET

Example: CLICK TO TEST

https://data.xotelo.com/api/rates
          ? hotel_key = HOTEL_KEY
          & chk_in = CHECK_IN_DATE
          & chk_out = CHECK_OUT_DATE

API Response

OTA rates delivered by the Xotelo API are by default relative to USD. All data is returned in standard JSON format and can be parsed easily using any programming language.

Example Response: Below you will find an example API response carrying a rate of common available deals, all relative time stamped at the exact time they were collected.

{
    "error": null, // Return error message if the request could not be completed
    "timestamp": 1519296206,
    "result": {
        "chk_in": "2019-06-13",
        "chk_out": "2019-06-16",
        "rates" : [
            {
                "code": "HotelsCom2",
                "name": "Hotels.com",
                "rate": 5259.00  // Price per room per night
            },
            {
                "code": "Expedia",
                "name": "Expedia",
                "rate": 5399.50  // Price per room per night
            },
            {
                "code": "BookingCom",
                "name": "Booking.com",
                "rate": 5399.20  // Price per room per night
            },
            {
                "code": "Agoda",
                "name": "Agoda.com",
                "rate": 5250.00  // Price per room per night
            },
            [...]
        ]
    }
}

As illustrated above, the API's response - when queried for real-time rates - always contains a timestamp object containing a standard UNIX time stamp indicating the time the given rate data was collected, a error object containing the error message if the request could not be completed, a result object containing the result data, and a rates object of result object containing the actual rate data for each available deals.


# Get Day Heatmap

Definitions
Definition Description Default
Hotel Key (hotel_key)* A unique key assigned to each Hotel used to matching with TripAdvisor. How to get Hotel Key
Check-out Date (chk_out)* Check-Out date. (Format YYYY-MM-DD ex. 2019-05-31 for 31 May 2019)

Base URL
https://data.xotelo.com/api

Append your Hotel Key: Here is how to define hotel with the Hotel API (How to get Hotel Key)

Endpoint: heatmap

Method: GET

Example: CLICK TO TEST

https://data.xotelo.com/api/heatmap
          ? hotel_key = HOTEL_KEY
          & chk_out = CHECK_OUT_DATE

API Response
{
    "error": null, // Return error message if the request could not be completed
    "timestamp": 1519296206,
    "result": {
        "chk_out": "2019-07-30",
        "heatmap" : {
            "average_price_days": [
              "2019-06-13",
              "2019-06-14",
              "2019-06-15",
              "2019-06-16"
              ...
            ],
            "cheap_price_days": [
              "2019-06-17",
              "2019-06-18",
              "2019-06-19",
              "2019-06-20"
              ...
            ],
            "high_price_days": [...]
        }
    }
}