我正在为 booking.com 使用 RapidAPI 的 API。我想获得酒店的评论,但我不知道如何找到特定酒店的 hotel_id(必需参数)?
import requests
url = "https://booking-com.p.rapidapi.com/v1/hotels/reviews"
querystring = {"hotel_id":"1676161","locale":"en-gb","sort_type":"SORT_MOST_RELEVANT","customer_type":"solo_traveller,review_category_group_of_friends","language_filter":"en-gb,de,fr"}
headers = {
'x-rapidapi-host': "booking-com.p.rapidapi.com",
'x-rapidapi-key': "1bed4aac31mshcd4d969233d7d7dp129f0bjsn58eea903e6c2"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)