# Hotels Ctrip — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and explore hotels on Ctrip (携程), one of China's largest travel platforms. Retrieve hotel listings by city or keyword, access full property details and room options, and read paginated guest reviews — all in real-time.

**Category:** Travel | **Website:** [hotels.ctrip.com/](https://hotels.ctrip.com/) | **Docs:** [parse.bot/marketplace/99f87c80-d747-4fd7-aa52-29101b7ee706/hotels-ctrip-com-api](https://parse.bot/marketplace/99f87c80-d747-4fd7-aa52-29101b7ee706/hotels-ctrip-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get city list

Get popular Chinese domestic cities for hotel search. Returns city names, IDs, province IDs, and country names. Use city IDs as input to search_hotels and other endpoints.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/get-city-list \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get hotel detail

Retrieve full details for a specific hotel including policies (check-in/check-out times, children policy), facilities (entertainment, transportation, family amenities), reservation tips, nearby POIs (transit, attractions, restaurants), user comments, and hotel introduction with photos.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `checkin` | string | No | Check-in date in YYYYMMDD or YYYY-MM-DD format. Defaults to today (CST). |
| `checkout` | string | No | Check-out date in YYYYMMDD or YYYY-MM-DD format. Defaults to tomorrow (CST). |
| `city_id` | string | No | City ID where the hotel is located. |
| `hotel_id` | string | Yes | Hotel ID (e.g., '445563') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/get-hotel-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"checkin":"<string>","checkout":"<string>","city_id":"<string>","hotel_id":"<string>"}'
```

### Get hotel reviews

Retrieve paginated user reviews for a hotel. Returns review tags (e.g., '前台热情', '早餐很棒'), travel types, rating breakdown (overall, environment, facility, service, hygiene), and individual review comments with user info, images, and hotel responses. Pagination via page_index.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `hotel_id` | string | Yes | Hotel ID (e.g., '445563') |
| `page_index` | integer | No | Page number starting from 1. |
| `page_size` | integer | No | Number of reviews per page. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/get-hotel-reviews \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"hotel_id":"<string>","page_index":"<integer>","page_size":"<integer>"}'
```

### Get hotel rooms

Retrieve available room types, prices, and filters for a hotel. Returns physical room details (bed type, area, floor, view), sale room options with pricing, filter info (room type, breakfast, packages), and calendar data for date-based pricing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `checkin` | string | No | Check-in date in YYYYMMDD or YYYY-MM-DD format. Defaults to today (CST). |
| `checkout` | string | No | Check-out date in YYYYMMDD or YYYY-MM-DD format. Defaults to tomorrow (CST). |
| `city_id` | string | No | City ID where the hotel is located. |
| `hotel_id` | string | Yes | Hotel ID (e.g., '445563') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/get-hotel-rooms \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"checkin":"<string>","checkout":"<string>","city_id":"<string>","hotel_id":"<string>"}'
```

### Get review summary

Retrieve review summary and highlight tags for a hotel. Returns AI-generated review summary, comment rating breakdown, comment tags with counts, travel type distribution, filter dates for seasonal reviews, and overall statistics. Provides a quick overview without paginating through individual reviews.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `hotel_id` | string | Yes | Hotel ID (e.g., '445563') |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/get-review-summary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"hotel_id":"<string>"}'
```

### Search hotels

Search for hotels by city and dates. Returns paginated hotel list with basic info, pricing, room details, and comments. Pagination via page_index; response includes hotelListAddtionInfo with hotelTotalCount and isLastPage.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `checkin` | string | No | Check-in date in YYYYMMDD or YYYY-MM-DD format. Defaults to today (CST). |
| `checkout` | string | No | Check-out date in YYYYMMDD or YYYY-MM-DD format. Defaults to tomorrow (CST). |
| `city_id` | string | Yes | City ID from get_city_list (e.g., '2' for Shanghai, '1' for Beijing) |
| `page_index` | integer | No | Page number starting from 1. |
| `page_size` | integer | No | Number of results per page. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/search-hotels \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"checkin":"<string>","checkout":"<string>","city_id":"<string>","page_index":"<integer>","page_size":"<integer>"}'
```

### Search hotels by keyword

Search hotels by keyword (hotel name, brand, location, or landmark). Returns matching hotels and locations within the specified city.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `checkin` | string | No | Check-in date in YYYYMMDD or YYYY-MM-DD format. Defaults to today (CST). |
| `checkout` | string | No | Check-out date in YYYYMMDD or YYYY-MM-DD format. Defaults to tomorrow (CST). |
| `city_id` | string | No | City ID to search within. Defaults to '2' (Shanghai). |
| `keyword` | string | Yes | Search keyword (hotel name, brand, location, or landmark) |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/hotels-ctrip/search-hotels-by-keyword \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"checkin":"<string>","checkout":"<string>","city_id":"<string>","keyword":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.