Free Hotel Prices API

Xotelo is a simple and lightweight API for gettings hotel rates / list of hotels / rate heatmap 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 3 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).
  • Latest list endpoint (/list)
    Returns real-time list of hotel data based on location.

# 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": [...]
        }
    }
}

# Get Hotel List

Definitions
Definition Description Default
Location Key (location_key)* A unique key assigned to each Location used to matching with TripAdvisor. How to get Location Key
Limit (limit) Limit of hotel list. (maximum value is 100) 30
Offset (offset) The number of rows to skip from the beginning of the returned data before presenting the results (minimum value is 0) 0
Sort By (sort) Value to sort by. (available values are: best_value, popularity, distance) best_value

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

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

Endpoint: list

Method: GET

Example: CLICK TO TEST

https://data.xotelo.com/api/list
          ? location_key = LOCATION_KEY
          & offset = OFFSET_NUMBER
          & limit = LIMIT_NUMBER

API Response
{
    "error": null, // Return error message if the request could not be completed
    "timestamp": 1519296206,
    "result": {
        "total_count": 4049,
        "limit": 30,
        "offset": 0,
        "list" : [
            {
              "name": "FooBar and Resort",
              "key": "g1234567-d12345678",
              "accommodation_type": "Hotel",
              "url": "https://.....html",  
              "review_summary": {
                "rating": 4,
                "count": 1
              },
              "price_ranges": { // Currency: USD
                "maximum": 17,
                "minimum": 16
              },
              "geo": {
                "latitude": 6.8545,
                "longitude": 101.21789
              },
              "highlighted_amenities": [
                {
                  "name": "Free Wifi"
                },
                {
                  "name": "Free parking"
                },
                {
                  "name": "Restaurant"
                },
                {
                  "name": "Airport transportation"
                }
              ]
            }
            [...]
        ]
    }
}

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 list 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 list object of result object containing the actual list data for each available location.