Hotels

有料
Verified
よって Api Dojo | 更新済み hace un mes | Travel
人気

9.8 / 10

レイテンシー

2,184ms

サービスレベル

100%

Health Check

N/A

すべてのディスカッションに戻る

hotel size not always fetched

Rapid account: Yassin L Xv U Tiq 5 D
yassin-LXvUTiq5d
hace un mes

Hello thank you so much for this API.
I am using this API to collect number of rooms in hotels in a certain area/city.
in the webpages, you can find this info in the section :
At a glance -> Hotel Size

in the “get_content” request, we can find that attribute within the response. but it is not always there.

Here are 2 examples where ‘hotel size’ attributes are returned, and 2 others where it isn’t:

Info Returned:

  • name1: Aloft Riyadh
    -propertyId: 15873305
    -name2: MARIN SUIT EL SWEDI
    -propertyId:101888776

Info Not Returned:

  • name1: Reef Al Malaz Hotel International
    -propertyId: 68219170
    -name2: Comfort Inn Al Yarmouk
    -propertyId:69847130

in all 4 cases, the information about hotel size is publicly displayed in the webpage. Can you please advise?

Rapid account: Apidojo
apidojo Commented hace un mes

Hello,
I am just guessing, Hotels,Expedia, and Booking are merging the data together, the same propery may have different IDs so it may cause the issue.
May you share with me the body request sent to …/properties/v2/list to fetch those IDs (68219170, 69847130)?

Regards.

Rapid account: Yassin L Xv U Tiq 5 D
yassin-LXvUTiq5d Commented hace un mes

You are right, when i use your ids, now i got the correct response with the actual hotel size attributes.
I used the “…/properties/v2/list” endpoint to get those ids i mentioned earlier.

this is what an example response looks like, if you check the data[‘propertySearch’][‘properties’]:
{’__typename’: ‘Property’,
‘id’: ‘69847130’, <- property id
’featuredMessages’: [],
‘name’: ‘Comfort Inn Al Yarmouk’, <- property name
’availability’: {’__typename’: ‘PropertyAvailability’,
‘available’: False,
‘minRoomsLeft’: 0},
‘propertyImage’: {’__typename’: ‘PropertyImage’,
‘alt’: ‘’,
‘fallbackImage’: None,
‘image’: {’__typename’: ‘Image’,
‘description’: ‘Exterior’,
‘url’: ‘https://images.trvl-media.com/lodging/70000000/69850000/69847200/69847130/4e1b02f5.jpg?impolicy=resizecrop&rw=455&ra=fit’},
‘subjectId’: 91024},
etc…

from now on, i will use the “…/locations/v3/search” endpoint as you advised.
Thank you very much for your quick reply, very much appreciated!

Rapid account: Apidojo
apidojo Commented hace un mes

Well, the property 68219170, and 69847130 are not correct for those hotels. How did you get them? Now, check these screenshots :
https://prnt.sc/KuUpxTPbBMde
https://prnt.sc/q1K6ZP5hbm52

Use the following to get the correct hotel IDs :
…/locations/v3/search?q=Comfort Inn Al Yarmouk&locale=en_US&regiontype=511&langid=1033&siteid=300000001
…/locations/v3/search?q=Reef Al Malaz Hotel International&locale=en_US&regiontype=511&langid=1033&siteid=300000001

Regards.

ディスカッションに参加しましょう-以下にコメントを追加してください:

ログイン/サインアップして新しいコメントを投稿