hotels.ctrip.com APIhotels.ctrip.com ↗
Access Ctrip (携程酒店) hotel data via 7 endpoints: search by city or keyword, retrieve room types, pricing, policies, and paginated guest reviews.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/b25cb0e8-6958-4837-9980-1645cec5a4ce/get_city_list' \ -H 'X-API-Key: $PARSE_API_KEY'
Get popular cities list for hotel search. Returns Chinese domestic cities with their IDs for use in other endpoints.
No input parameters required.
{
"type": "object",
"fields": {
"cities": "array of city objects with cityName, cityId, provinceId, countryName"
},
"sample": {
"data": {
"cities": [
{
"cityId": 2,
"cityName": "上海",
"provinceId": 0,
"countryName": "中国"
},
{
"cityId": 1,
"cityName": "北京",
"provinceId": 0,
"countryName": "中国"
},
{
"cityId": 30,
"cityName": "深圳",
"provinceId": 0,
"countryName": "中国"
}
]
},
"status": "success"
}
}About the hotels.ctrip.com API
The Ctrip Hotels API provides 7 endpoints covering hotel search, property details, room availability, and guest reviews from China's Ctrip platform (携程酒店). Use search_hotels to query listings by city ID and date range, or get_hotel_detail to pull policies, facilities, nearby POIs, and reservation tips for a specific property. City IDs are resolved via get_city_list, which returns Chinese domestic cities ready to plug into other endpoints.
Hotel Search and Discovery
The get_city_list endpoint returns an array of Chinese domestic cities, each with cityName, cityId, provinceId, and countryName. These IDs feed directly into search_hotels, which accepts a city_id, checkin/checkout dates in either YYYYMMDD or YYYY-MM-DD format, and pagination controls (page_index, page_size). The response includes a hotelList array with per-property pricing and room details, plus hotelListAddtionInfo for pagination metadata. For name- or landmark-based lookups, search_hotels_by_keyword accepts a free-text keyword and returns mainKeywordList with matched hotels and locations within the target city.
Property Details and Room Inventory
get_hotel_detail returns a data object covering hotelPolicy, hotelReservationTips, hotelFacility, hotelPoiInfo, guest comment summaries, and hotelIntroduction for a given hotel_id. Dates are optional but affect policy and availability context. get_hotel_rooms goes deeper into inventory: it returns physicRoomMap (physical room configurations), saleRoomMap (purchasable room options with prices), roomFilterInfo, calendarInfo, and extraInfo. This endpoint is useful for building date-specific availability checks or rate-comparison tools.
Reviews and Ratings
get_hotel_reviews returns paginated reviews via commentList inside groupList, alongside commentTagList, travelTypeList, commentRating, and totalCount. Both page_index and page_size are supported. get_review_summary covers similar ground — commentTagList, commentRating, travelTypeList, filterDateList, totalCount — and additionally includes aiSummaryEntities, which provides AI-generated highlight tags not present in the paginated review endpoint. Together these two endpoints give both high-level sentiment signals and raw review text.
- Build a hotel price-comparison tool for Chinese cities using
search_hotelswith date and city parameters - Aggregate guest review sentiment across hotel categories by pulling
commentTagListandcommentRatingfromget_review_summary - Populate a travel app with property amenities, policies, and nearby POI data via
get_hotel_detail - Display room type breakdowns and per-night pricing using
physicRoomMapandsaleRoomMapfromget_hotel_rooms - Enable landmark-based hotel discovery by passing location names to
search_hotels_by_keyword - Track review volume trends over time using
totalCountandfilterDateListfromget_review_summary - Resolve city names to Ctrip city IDs programmatically using
get_city_listbefore running batch hotel searches
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Ctrip offer an official developer API?+
What does `get_hotel_rooms` return beyond just prices?+
get_hotel_rooms returns physicRoomMap describing the physical room configurations (bed type, size, floor, etc.), saleRoomMap for purchasable options with rates, roomFilterInfo for available filter dimensions, calendarInfo for date-specific pricing context, and extraInfo for supplementary metadata. All fields are date-sensitive — pass checkin and checkout to get accurate availability and pricing.Does the API cover international hotels outside China?+
get_city_list returns Chinese domestic cities and their IDs; the search and detail endpoints are scoped to those cities. International Ctrip hotel listings are not covered. You can fork this API on Parse and revise it to add an endpoint targeting Ctrip's international hotel coverage.What is the difference between `get_hotel_reviews` and `get_review_summary`?+
get_hotel_reviews is paginated and returns individual review comments inside commentList, making it suitable for reading full review text in batches. get_review_summary does not paginate reviews but adds aiSummaryEntities (AI-generated highlight tags) and filterDateList, which are absent from the paginated endpoint. Use both together if you need both raw reviews and summary-level signals.Can I filter hotel search results by star rating, price range, or amenities?+
search_hotels endpoint accepts city_id, date range, and pagination parameters but does not expose filter parameters for star rating, price band, or facilities in its current form. get_hotel_rooms returns roomFilterInfo at the property level. You can fork this API on Parse and revise it to add filter parameters to the search endpoint.