I’m working with the booking.com API through RapidAPI and need to fetch customer feedback for a specific property. The issue is that I can’t figure out how to obtain the required property_id parameter for any given accommodation.
You’ve got to search for hotels first before you can get reviews. The booking.com RapidAPI has a hotels search endpoint - just throw in your location (city name or coordinates work fine). The search response gives you property details including the unique ID you need. I’ve used this API before and the property ID usually shows up as ‘hotel_id’ in the JSON results. Be specific with your location parameters - exact city names or lat/long coordinates work best in my experience. Grab that hotel_id from the search response and use it as your property_id when calling the reviews endpoint.
just grab the property ID from the booking.com URL - it’s right there in the address bar when ur on the hotel page. you’ll see it after /hotel/ in the URL. way simpler than dealing with API calls when u already know which hotel u want.
To retrieve the property ID from Booking.com using the RapidAPI integration, it’s essential to first utilize the search endpoints. Initiate a request to the locations search endpoint with your desired criteria. Once you’ve executed the search, you’ll find the property details, including the ID, in the response. Look specifically for the ‘hotel_id’ field, as that will provide the property_id you need for your reviews call. Ensure your search parameters are accurate, including location and check-in details, to avoid inaccurate results.