携程酒店查询API
1) 请求地址
https://hotels.ctrip.com/Domestic/Tool/AjaxHotelList.aspx
2) 调用方式:HTTP post
3) 接口描述:
4) 请求参数:
POST参数:
字段名称 |
字段说明 |
类型 |
必填 |
备注 |
__VIEWSTATEGENERATOR |
|
string |
Y |
- |
cityName |
|
string |
Y |
- |
StartTime |
|
string |
Y |
- |
DepTime |
|
string |
Y |
- |
cityId |
|
string |
Y |
- |
cityPY |
|
string |
Y |
- |
cityCode |
|
string |
Y |
- |
cityLat |
|
string |
Y |
- |
cityLng |
|
string |
Y |
- |
positionArea |
|
string |
Y |
- |
positionId |
|
string |
Y |
- |
hotelposition |
|
string |
Y |
- |
keyword |
|
string |
Y |
- |
hotelId |
|
string |
Y |
- |
htlPageView |
|
string |
Y |
- |
hotelType |
|
string |
Y |
- |
hasPKGHotel |
|
string |
Y |
- |
requestTravelMoney |
|
string |
Y |
- |
isusergiftcard |
|
string |
Y |
- |
useFG |
|
string |
Y |
- |
HotelEquipment |
|
string |
Y |
- |
priceRange |
|
string |
Y |
- |
hotelBrandId |
|
string |
Y |
- |
promotion |
|
string |
Y |
- |
prepay |
|
string |
Y |
- |
IsCanReserve |
|
string |
Y |
- |
OrderBy |
|
string |
Y |
- |
OrderType |
|
string |
Y |
- |
k1 |
|
string |
Y |
- |
k2 |
|
string |
Y |
- |
CorpPayType |
|
string |
Y |
- |
viewType |
|
string |
Y |
- |
checkIn |
|
string |
Y |
- |
checkOut |
|
string |
Y |
- |
DealSale |
|
string |
Y |
- |
ulogin |
|
string |
Y |
- |
hidTestLat |
|
string |
Y |
- |
AllHotelIds |
|
string |
Y |
- |
5) 请求返回结果:
{
"totalMsg": "<b id=\"lblAmount\">0</b> 家酒店",
"hotelAmount": 0,
"sortHeader": "",
"notice": "<div id=\"no_tips\"><div id=\"divNoresult\" class=\"search_noresult\"><span class=\"ico_alert\"> </span><div id=\"textNoresult\"></div><strong>很抱歉,暂时无法找到符合您要求的酒店。</strong></div></div>",
"hotelList": "",
"attachDistance": "",
"paging": "<div id=\"page_info\" class=\"c_page\"><a id=\"upHerf\" class=\"c_up_nocurrent\" href=\"javascript:;\" ></a><div class=\"c_page_list layoutfix\"><a href=\"javascript:;\" class=\"current\">1</a></div><a id=\"downHerf\" class=\"c_down_nocurrent\" href=\"javascript:;\" >下一页</a><div class=\"c_pagevalue\">到<input class=\"c_page_num\" id=\"txtpage\" type=\"text\" value=\"1\"data-pagecount=1 name=\"\" />页<input class=\"c_page_submit\" type=\"button\" name=\"\" value=\"确定\" data-dopost=\"T\"/></div><input class=\"hidden\" id=\"submitbug\" type=\"text\" value=\"\" name=\"\" /></div>",
"hotelIds": "",
"landmarks": [],
"tuan": {
"mandatory": "F",
"url": "star=&city=0&startdate=0001-01-01&enddate=0001-01-01&zone=&location=0&pageindex=0"
},
"hotelMapStreetJSON": {},
"hotelPositionJSON": [],
"biRecord": {
"htl_search_result_hotellist": ""
},
"HotelMaiDianData": {
"key": "hotel_inland_list_basic_online",
"value": {
"key": "val"
}
},
"NeedLogin": "T",
"NeedVerify": "T"
}
6) 请求返回结果参数说明:
字段名称 |
字段说明 |
类型 |
必填 |
备注 |
totalMsg |
|
string |
Y |
- |
hotelAmount |
|
string |
Y |
- |
sortHeader |
|
string |
Y |
- |
notice |
|
string |
Y |
- |
hotelList |
|
string |
Y |
- |
attachDistance |
|
string |
Y |
- |
paging |
|
string |
Y |
- |
hotelIds |
|
string |
Y |
- |
landmarks |
|
string |
Y |
- |
tuan |
|
string |
Y |
- |
mandatory |
|
string |
Y |
- |
url |
|
string |
Y |
- |
hotelMapStreetJSON |
|
string |
Y |
- |
hotelPositionJSON |
|
string |
Y |
- |
biRecord |
|
string |
Y |
- |
htl_search_result_hotellist |
|
string |
Y |
- |
HotelMaiDianData |
|
string |
Y |
- |
key |
|
string |
Y |
- |
value |
|
string |
Y |
- |
NeedLogin |
|
string |
Y |
- |
NeedVerify |
|
string |
Y |
- |