In this article, we’ll learn how to import hotels information to Google Sheets–information such as room availability, prices, facilities, policities, and so on from around the world.
We’ll use an extension in Google Sheets–Amigo Data–to pull the data into Google Sheets. Whether you’re a travel agent or just an individual looking for information looking for the best hotel deals, Amigo Data is the ideal tool.
With it you can easily check prices and compare them, get reviews for a hotel, get alerted for offers and search for hotels and properties in any city or locality. And you get alerted instantly so that you can grap the best deals.
Read on to know how to import hotels information to Google Sheets. Following are the steps to import hotels information to Google Sheets.
How to import hotels information to Google Sheets
Install the Amigo Data extension in Google Sheets
Install the Amigo Data Google Sheets add-on from the Google Workspace Marketplace.
Click here to install.
Alternatively, you can get it from Google Sheets.
- Open a new sheet
- Go to Extensions→Add-ons→Get add-ons
- Search for Amigo Data and install
Get the endpoint URL
Sign up or log in to RapidAPI.
Once you’re logged in, go to the Hotels API Documentation page in RapidAPI.
Click on the Subscribe to Test button and subscribe to a plan that’s right for you.
On subscribing to a plan (the free one included), an API key will be generated, which is used to authenticate API calls to RapidAPI.
Click Endpoints to go back to the API documentation. On the left is the list of the available endpoints. Select any one, for example /locations/v3/search. This endpoint will return the available hotels in a particular region.
The key and the header are filled automatically and the query parameters are also filled with default values. We can change these with values of our choice.
The default parameters will return list of available hotels in New York from Hotels.com.
For demonstration purposes, we’ll modify the parameters. We’ll change to London from New York. The optional parameters will also have to be modified accordingly. They may be either left blank or filled with valid values. The values can be got from the v2/get-meta-data endpoint.
Click the Test Endpoint button to check if the parameter values are valid. If it is, the success code will be displayed. Under the Code snippet is the endpoint for the specified parameters along with the headers we’ll need to import the data.
Change the language to (Shell) cURL from Node.js and copy the endpoint URL. Note also the headers. These will be used to retrieve the data.
Import the data to Google Sheets
Open Google Sheets and launch Amigo Data from the sheet into which you want to fill the data. To connect to Amigo Data, click Extensions→Amigo Data→Connect.
You’ll be presented with a list of sources to connect to. Choose Custom API.
Paste the endpoint URL in the API URL field. Do not include the apostrophes. (Likewise for the headers.)
Then expand the Details tab and enter the headers.
Then add the queries by clicking the “+QUERY” button and then entering the query names and the values. Eg. Name: q, Value: London
Click the PREVIEW button. Flatten and expand the nested datasets and delete the columns that are not required. Then click IMPORT.
The data will be imported into Google Sheets in a moment. Below is a snippet of the imported data.
You can also get offers information for a specific hotel and other information by following the same procedure as described here. For POST request, change the method from GET to POST and enter the body in the Body(JSON) tab.
Once the data have been imported into Google Sheets, they can be updated automatically at regular intervals–hourly, daily, weekly or on custom days–should you so wish, and get these data sent to your inbox. Click here to learn how set a refresh schedule and set up alerts in Amigo Data.
Visit our blog for to find out about the kinds of data that you can import to Google Sheets and how you can track stock and other financial data from Google Sheets.
Some recommended articles: