Quickstart
This guide will get you all set up and ready to use the HotelRank API. We'll cover how to start with an API client and send your first request against our core resources. We'll also point you to the right places to learn more about Hotels and Hotel Analysis Results.
Before you can make requests to the HotelRank API, grab your API key from your dashboard under Settings » API.
Choose your client
Before making your first API request, pick which API client you will use. In addition to good ol' cURL HTTP requests, HotelRank will offer clients for JavaScript, Python, and PHP. In the following example, you can see how to install each client.
# cURL is most likely already installed on your machine
curl --version
Making your first API request
After picking your preferred client, you are ready to make your first call to the HotelRank API. Below, you can see how to send a GET request to the Hotels endpoint to get a list of the properties in your workspace. In the cURL example, results are limited to ten hotels, the default page length for each client.
curl -G https://api.hotelrank.ai/v1/hotels \
-H "Authorization: Bearer {token}" \
-d limit=10 \
-d city=Lisbon
What's next?
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the HotelRank API: