# Ctrip

> Trip.com / Ctrip

- Skill: `spike-faye-lei/ctrip` (Agent Skill, multi-file: 15 files)
- Install (CLI): `npx skillmds@latest add spike-faye-lei/ctrip`
- Raw SKILL.md: https://api.skillmd.com/api/skills/spike-faye-lei/ctrip/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: spike-faye-lei (https://skillmd.com/u/spike-faye-lei)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/spike-faye-lei/ctrip

---

# Trip.com / Ctrip

## Overview
China's largest travel platform (Ctrip International). Flights, trains, attractions, and destination guides via Trip.com's internal POST-only REST APIs. Travel archetype.

## Workflows

### Search and compare flights
1. `searchPOI(key)` → `code` (city/airport IATA code), `districtId`
2. `searchFlights(departCode, arriveCode, departDate)` → `flightItineraryList[]` with `flightNo`, prices; `token`
3. `getFlightCalendarPrices(dCity, aCity, dDate)` → cheapest fare per day across a month
4. `getFlightComfort(flightNo, dCity, aCity, dDate)` → seat pitch, WiFi, entertainment for a specific flight
5. `getFlightFilters(token)` → available filter options (airline, stops, cabin) for refining results

### Plan a train journey
1. `getTrainStations()` → `stationCode`, `stationName`, `cityName`
2. `searchTrains(departStation, arriveStation, departDate)` → `trainList[]` with `trainNumber`, `seatList[]{seatType, price, available}`
3. `getTrainCalendar(departStation, arriveStation, month)` → `calendarList[]{date, available, lowestPrice}`

### Explore a destination
1. `getHotDestinations()` → `id` (districtId), `word` (destination name)
2. `getCityList(countryId)` → `districtId`, `cityName`
3. `getDestinationInfo(districtId)` → sights, hotels, restaurants, comments; also `toursAndTickets[]{productId}`
4. `searchAttractions(sceneCode)` → `productId`, `productName`, rating, price
5. `getAttractionDetail(productId)` → description, tickets, opening hours, reviews

## Operations

| Operation | Intent | Key Input | Key Output | Notes |
|-----------|--------|-----------|------------|-------|
| searchPOI | find city/airport codes | key (keyword) | results[]{name, code, districtId} | entry point for flights/trains |
| searchFlights | search flights | departCode ← searchPOI.code, arriveCode ← searchPOI.code, departDate | flightItineraryList[]{flightNo, airline, times, price}, token | requires Head object |
| getFlightCalendarPrices | cheapest fares per day | dCity ← searchPOI.code, aCity ← searchPOI.code, dDate | lowPriceInCalenderDtoInfoList[]{date, price} | calendar view |
| getFlightComfort | aircraft comfort info | flightNo ← searchFlights, dCity ← searchPOI.code, aCity ← searchPOI.code, dDate | flightComfortList[]{seatPitch, wifi, entertainment} | |
| getFlightFilters | flight filter options | token ← searchFlights | filterList[]{filterType, options[]{label, value, count}} | refine search results |
| getTrainStations | list train stations | — | stationList[]{stationName, stationCode, cityName} | entry point for trains |
| searchTrains | search trains | departStation ← getTrainStations.stationCode, arriveStation ← getTrainStations.stationCode, departDate | trainList[]{trainNumber, times, seatList with prices} | |
| getTrainCalendar | train availability calendar | departStation ← getTrainStations.stationCode, arriveStation ← getTrainStations.stationCode, month | calendarList[]{date, available, lowestPrice} | |
| getHotDestinations | trending destinations | — | data[]{id, word, url} | entry point; id = districtId |
| getCityList | cities in a country | countryId | cityList[]{districtId, cityName, imageUrl} | entry point for exploration |
| getDestinationInfo | destination travel guide | districtId ← getHotDestinations.id / getCityList.districtId | hotDistrict, classicRecommendSight[]{poiName, rating}, classicRecommendHotel[]{hotelName, price}, hotComment[]{content, rating} | www.trip.com |
| searchAttractions | things to do | sceneCode (e.g., city_sight_list) | list[]{productId, productName, rating, price}, sortRuleList[]{sortType, sortName} | www.trip.com |
| getAttractionDetail | attraction detail | productId ← searchAttractions.productId | description, rating, reviewCount, tickets, hours | www.trip.com |
| getGeneralInfo | site info/announcements | — | savedTips, travelTipsList[]{title, content}, promotionList[]{title, linkUrl}, noticeList[]{title, content} | utility |

## Quick Start

```bash
# Search for city codes
openweb ctrip exec searchPOI '{"key":"Tokyo","mode":"0","tripType":"OW"}'

# Search flights NYC → Shanghai
openweb ctrip exec searchFlights '{"searchCriteria":{"tripType":1,"journeyNo":1,"passengerInfoType":{"adultCount":1,"childCount":0,"infantCount":0},"journeyInfoTypes":[{"journeyNo":1,"departDate":"2026-05-01","departCode":"NYC","arriveCode":"SHA"}]},"Head":{"Locale":"en-US","Currency":"USD","Group":"Trip","Source":"ONLINE","Version":"3"}}'

# Get cheapest fares for a month
openweb ctrip exec getFlightCalendarPrices '{"dCity":"NYC","aCity":"SHA","dDate":"2026-05-01","flightWayType":"OW","cabinClass":"Economy"}'

# Browse trending destinations
openweb ctrip exec getHotDestinations '{"lang":"en","locale":"en-US","currency":"USD","dataType":"destinations","head":{"syscode":"999","locale":"en-US"}}'

# Get destination guide for Shanghai (districtId=2)
openweb ctrip exec getDestinationInfo '{"districtId":"2","moduleList":["classicRecommendSight"]}'

# Search attractions
openweb ctrip exec searchAttractions '{"baseInfo":{"channelId":24,"locale":"en-US","currency":"USD"},"sceneParams":[{"sceneCode":"city_sight_list"}]}'
```

