SuperAPI AI Directory

ctrip-flight-search

General & other

View repository

Updated 10-16 06:18

About this skill

Ctrip Flight Query Skill

Feature Overview

This skill provides complete Ctrip flight query automation capabilities, based on a practically verified browser operation process, and supports the following features:

  • One-way flight query: Query flights from the departure location to the destination on a specified date
  • Round-trip flight query: Query flights for specified round-trip dates (verified as supported)
  • Multi-city support: Supports Chinese city names and airport code input
  • Multi-city versatility: Verified to support any city combination (such as Guangzhou -> Chengdu, Beijing -> Shanghai, etc.)
  • International flight query: Supports international route queries (such as Shanghai -> Tokyo, Beijing -> Seoul, etc.)
  • Date range: Supports date input in YYYY-MM-DD format
  • Error handling: Includes handling mechanisms for abnormal situations such as elements being invisible and page changes

Use cases

When the user needs to:

  • Query flight information for a specific date
  • Obtain flight prices and schedules
  • Automate the flight query process
  • Extract flight data from the Ctrip website
  • Verify the feasibility of flight queries between different cities

Core Operation SOP Process

Basic query process

  1. Navigate to the Ctrip homepage: navigate → https://www.ctrip.com
  2. Enter the flight query page: backbone -> Locate the flight ticket button -> click
  3. Enter departure location: type -> City name -> search -> Select a specific airport -> click
  4. Enter destination: search -> Target city -> click
  5. Set date: Confirm that the date input box has been set correctly
  6. Execute query: press → Enter(preferred option) or click the search button

Key operational points

Departure/destination input

  • First usetypeEnter the city name in the input box (such as "Beijing", "Shanghai", "Guangzhou", "Chengdu", etc.)
  • The system will automatically display a dropdown selection list
  • UsesearchFind the specific airport option (such as "Beijing (Daxing International Airport)(PKX)", "Chengdu (Shuangliu International Airport)(CTU)", etc.)
  • UseclickSelect the target airport
  • Multi-city versatility: The skill has been verified to support any combination of Chinese city names, including first-, second-, and third-tier cities

Query execution strategy

  • Preferred option: Usepress + EnterSubmit the form (avoiding overlay blocking issues, verified as effective in multi-city scenarios)
  • Alternative option: If the Enter key is ineffective, usesearchFind the search button andclick

Error handling mechanism

  • Element invisible: Try using keyboard operations instead of mouse clicks (keyboard operations performed more stably in multi-city testing)
  • Page structure changes: After each interaction, re-usebackboneorsearchGet latest element reference
  • Input failed: Retry input or use an alternative city name format
  • Dynamic element reference invalid: This issue was found to be common in multi-city tests; it is recommended to relocate the element before each operation

Supported parameter formats

Departure/Destination

  • Chinese city name: "Beijing", "Shanghai", "Guangzhou", "Chengdu", "Shenzhen", "Hangzhou", etc. (supports major cities nationwide)
  • International city name: "Tokyo", "Seoul", "Singapore", "Bangkok", "Paris", "London", etc. (supports major international cities)
  • Airport code: "PEK", "SHA", "CAN", "CTU", "HND", "ICN", etc. (three-letter codes)
  • Full airport name: "Beijing Capital International Airport", "Shanghai Hongqiao International Airport", "Guangzhou Baiyun International Airport", "Chengdu Shuangliu International Airport", "Tokyo Haneda Airport", "Seoul Incheon International Airport", etc.

Date format

  • Standard format: YYYY-MM-DD (e.g., 2026-03-20)
  • Supported range: Current date and future dates

Flight type

  • One-way: Supported by default
  • Round-trip: Supports return date parameter (verified)
  • Multi-city: Complex query scenarios (to be extended)

Verified operation scope

✅ Visit the Ctrip official website and navigate to the flight search page
✅ Enter the departure city name and select a specific airport
✅ Enter the destination city name and select a specific airport
✅ Set the search date
✅ Execute the flight search and successfully jump to the results page
✅ Handle dynamic page changes and element reference updates
✅ Multi-city generalizability verification: Successfully tested multiple city combinations such as Guangzhou (CAN) → Chengdu (CTU), Beijing (PEK) → Shanghai (SHA) ✅ Keyboard operation stability: Verified the reliability of the Enter key submission strategy in multi-city tests ✅ International flight search verification: Successfully tested the international route Shanghai (SHA) → Tokyo (HND), verifying the generalizability of international city recognition and the search process

Reference documents

For detailed operation guides and SOP processes, please refer to:references/User Guide.md

Notes

  1. Page loading time: Ctrip pages may take some time to load; appropriate waiting is required between operations
  2. Network environment: Ensure the network connection is normal; Ctrip access is stable domestically
  3. Browser compatibility: Automation tools based on modern browsers; ensure tool version compatibility
  4. CAPTCHA handling: If a CAPTCHA or login requirement is encountered, manual intervention is required
  5. Multi-city test conclusion: The skill performs consistently across different city combinations, and the core operation process requires no adjustment

Extension directions

  • Add round-trip flight search support
  • Support cabin class selection (economy class, business class, first class)
  • Add price filtering and sorting functions
  • Support data extraction from flight details pages
  • Add batch query function