POST
/hotelsGet Hotels
List Hotels
Implementation Notes:
This API call retrieves a list of all hotels available in the ReviewsAPI database for review retrieval. If a hotel you wish to retrieve reviews for is not listed, please send the request using POST /hotelmaprequest endpoint. We will make efforts to add the hotel to our database within 24 to 48 business hours.
- hotelName: The name of the hotel.
- city: The name of the city where the hotel is located.
- state: The name of the state where the hotel is located.
- country: The name of the country where the hotel is located.
- zip: The postal code of the hotel.
- geoLocationFilter: The geographical location parameters.
- latitude: The latitude of the area.
- longitude: The longitude of the area.
- radius: The radius (in kilometers) around the specified latitude and longitude.
Mandatory Fields:
- country or geoLocationFilter
Note: Either the country or geoLocationFilter are mandatory parameters. When using geoLocationFilter, all three sub-parameters (latitude, longitude, and radius) are required. All other parameters are optional.
POST
/hotelsParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
hotelsPerPage | query | integer | Optional | The number of items to display in a page |
pageNumber | query | integer | Optional | Indicates the current page number |
body | body | object | Optional | none |
» hotelName | body | string | Optional | none |
» city | body | string | Optional | Match the hotel in this city. |
» state | body | string | Optional | Match the hotels in this state. |
» country | body | string | Optional | Match the hotels in this country. |
» zip | body | string | Optional | Match the hotels in this zip code (highest priority). |
» geoLocationFilter | body | object | Optional | Filter matched hotels by geolocation. |
»» latitude | body | string | Optional | Latitude of the location. |
»» longitude | body | string | Optional | Longitude of the location. |
»» radius | body | string | Optional | Radius from the location. |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Ok | |
| 400 | Bad Request | Bad Request | None |
| 401 | Unauthorized | Authorization Failed | None |
| 429 | Too Many Requests | Too Many Requests | None |
| 500 | Internal Server Error | Internal Server Error | None |
Example Request
# You can also use wget
curl -X POST http://localhost:3000/hotels \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: API_KEY'
Body parameter
{
"hotelName": "Ocean Lodge Santa Monica Beach Hotel",
"city": "Los Angeles",
"state": "California",
"country": "United States of America",
"zip": "90401",
"geoLocationFilter": {
"latitude": "34.01",
"longitude": "-118.49",
"radius": "50km"
}
}
Example responses
200 Response
{
"totalRecords": 10000,
"fetchedRecords": 10,
"totalPages": 1000,
"currentPage": 1,
"pageSize": 10,
"hotels": [
{
"hotelCode": 1362151,
"hotelName": "Ocean Lodge Santa Monica Beach Hotel",
"address": "1667 Ocean Avenue",
"city": "Los Angeles",
"state": "California",
"country": "United States of America",
"location": {
"latitude": "34.01012891",
"longitude": "-118.49312648"
},
"zip": "90401",
"matchScore": 72.228226,
"reviewsCount": 0
}
]
}
Need Support?
Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.