request:
…
“sort”: “PRICE_LOW_TO_HIGH”,
“filters”: {
“price”: {
“max”: 300, <----------------- filters max
"min": 200 <----------------- filters min
}
}
}
response:
pinnedDetails:null
price:
__typename:“PropertyPrice”
options:
priceMessaging:null
lead:
__typename:“Money”
amount:2024.69 <==================== Why is that
currencyInfo:
formatted:"$2,025"
Why does it show the price not in the sorting range?
Is this your mistake or mine?
Doe mee aan de discussie - voeg hieronder een opmerking toe
Hello,
Please check the screenshot https://prnt.sc/nfWlqLCdUyBh. I simply search for “priceRange” in the response, and there it is.
In addition, I believe you faked the response with the request OR the response and request are not related to each other. Your information is very useless to prove something.
Regards.
Hello.
url = “https://hotels4.p.rapidapi.com/properties/v2/list”
payload = {
“currency”: “USD”,
“eapid”: 1,
“locale”: “en_US”,
“siteId”: 300000001,
“destination”: { “regionId”: “6054439” },
“checkInDate”: {
“day”: 20,
“month”: 12,
“year”: 2023
},
“checkOutDate”: {
“day”: 20,
“month”: 12,
“year”: 2023
},
“rooms”: [
{
“adults”: 2,
“children”: []
}
],
“resultsStartingIndex”: 0,
“resultsSize”: 200,
“sort”: “PRICE_LOW_TO_HIGH”,
“filters”: { “price”: {
“max”: 300, <----------------- filters max
“min”: 200 <----------------- filters min
} }
}
headers = {
“content-type”: “application/json”,
“X-RapidAPI-Key”: “???”,
“X-RapidAPI-Host”: “hotels4.p.rapidapi.com”
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
data:propertySearch:
__typename:"PropertySearchResults"
filterMetadata:
universalSortAndFilter:
properties:0:
1:
2:
3:
4:
5:
6:
7:
8:
9:
__typename:"Property"
id:"45636831"
featuredMessages:
name:"Casa Blanca Villas"
availability:
propertyImage:
destinationInfo:
legalDisclaimer:null
listingFooter:null
mapMarker:
neighborhood:
offerBadge:
offerSummary:
pinnedDetails:null
price:
__typename:"PropertyPrice"
options:
priceMessaging:null
lead:
__typename:“Money"
amount:2024.69 <==================== value that does not fit the filter . A filter is made using this field?
currencyInfo:
formatted:”$2,025"
strikeOut:
displayMessages:
strikeOutType:"STANDALONE"
priceMessages:
priceAfterLoyaltyPointsApplied:
propertyFees:
reviews:
sponsoredListing:null
star:null
supportingMessages:null
regionId:"6054439"
priceMetadata:
saveTripItem:
propertySearchListings:
summary:
searchCriteria:
shoppingContext:
map:
clickstream
Did you paste the response in a text editor and search for the field? You should always send along with your request so I can reproduce it. Otherwise, I cannot help you.
Regards.
Hello,
I get the answer in json. There is no such key
No “priceRange” field in response from endpoint “properties/v2/list”
Hello,
You need to use the price range returned in the response, custom price range is not supported. You are interested in “priceRange” field returned in the response.
Regards.