Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
modelscope.cn avatar

Flights Search Plus

  • 1 installs
  • modelscope.cn

Search real-time one-way, round-trip, and price-calendar flights by POSTing to the 51smart flight API, converting city names to IATA codes.

About

Triggers on flight, airfare, or cheapest-date queries and calls the public 51smart flight-search API directly over HTTP POST. A developer uses it to return formatted flight options with prices, durations, stops, and baggage for one-way, round-trip, or multi-date comparisons.

  • Converts Chinese/English city names to IATA airport codes
  • Handles one-way, round-trip, and aggregated price-calendar queries

Flights Search Plus by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,983 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/modelscope.cn --skill flights-search-plus

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Repositorymodelscope.cn

What it does

Search real-time one-way, round-trip, and price-calendar flights by POSTing to the 51smart flight API, converting city names to IATA codes.

Files

SKILL.mdMarkdownGitHub ↗

✈️ Flight Search Skill

Query real-time flights via the 51smart API (skill.flight.51smart.com). Supports one-way, round-trip, and price calendar.

Note: This skill calls the above public API directly via HTTP POST. No local scripts or authentication required. User data (city/date) is used solely for flight search.

---

Workflow

1. Parse Input → Extract origin, destination, dates, passengers, cabin class, trip type 2. Complete Missing Info → Ask the user if any required fields are missing 3. Call API → POST directly to https://skill.flight.51smart.com/api/search 4. Format Output → Display results in a clear, structured format

---

Step 1: Parse User Input

FieldDescriptionDefaultRequired
fromCityIATA airport code of departure city
toCityIATA airport code of destination city
fromDateDeparture date (YYYY-MM-DD)
returnDateReturn date (YYYY-MM-DD)Required for round-trip
adultNumberNumber of adults1
childNumberNumber of children0
cabinClassE / B / F / PE
flightTypeoneWay / roundTriponeWay

Cabin Codes:

  • E = Economy
  • P = Premium Economy
  • B = Business
  • F = First

---

Step 2: City to IATA Code

China

CityCodeCityCode
BeijingPEK/PKXShanghai HongqiaoSHA
Shanghai PudongPVGGuangzhouCAN
ShenzhenSZXChengduCTU
HangzhouHGHNanjingNKG
WuhanWUHXi'anXIY
ChongqingCKGXiamenXMN
KunmingKMGSanyaSYX
HaikouHAKQingdaoTAO
ZhengzhouCGOChangshaCSX
JinanTNAHarbinHRB
ShenyangSHEDalianDLC
TianjinTSNHefeiHFE
GuiyangKWENanningNNG
UrumqiURCLhasaLXA

International

CityCodeCityCode
Hong KongHKGTaipeiTPE
MacauMFMTokyo NaritaNRT
Tokyo HanedaHNDOsakaKIX
SeoulICNBusanPUS
SingaporeSINBangkok SuvarnabhumiBKK
Bangkok Don MueangDMKKuala LumpurKUL
JakartaCGKManilaMNL
SydneySYDMelbourneMEL
DubaiDXBAbu DhabiAUH
London HeathrowLHRLondon GatwickLGW
ParisCDGFrankfurtFRA
AmsterdamAMSRomeFCO
New York JFKJFKNew York NewarkEWR
Los AngelesLAXSan FranciscoSFO
Las VegasLASChicagoORD
VancouverYVRTorontoYYZ
For cities not listed above, infer the IATA code based on common conventions, or ask the user to confirm the full airport name.

---

Step 3: Call API

Send an HTTP POST request directly — no local scripts required.

Endpoint: POST https://skill.flight.51smart.com/api/search Content-Type: application/json Auth: Not required

One-way Request Example

{
  "adultNumber": 1,
  "cabinClass": "E",
  "childNumber": 0,
  "cid": "123456",
  "flightType": "oneWay",
  "flights": [
    {
      "fromCity": "PEK",
      "fromDate": "2026-03-15",
      "toCity": "SHA"
    }
  ]
}

Round-trip Request Example

{
  "adultNumber": 2,
  "cabinClass": "B",
  "childNumber": 1,
  "cid": "123456",
  "flightType": "roundTrip",
  "flights": [
    { "fromCity": "PEK", "fromDate": "2026-03-15", "toCity": "NRT" },
    { "fromCity": "NRT", "fromDate": "2026-03-22", "toCity": "PEK" }
  ]
}

Price Calendar

The price calendar is achieved by sending multiple one-way requests for consecutive dates and aggregating results.

---

Step 4: Format Output

One-way / Round-trip Results

✈️ Beijing (PEK) → Shanghai (SHA)
📅 Mar 15, 2026  |  Economy  |  Adult × 1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 #  Flight      Depart→Arrive       Duration  Stops   Price (USD)  Baggage
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1  UA1597      22:38→00:06(+1)     1h28m     Nonstop $81.86       1PC/23KG
 2  CA1234      09:00→11:20         2h20m     Nonstop $95.00       1PC/23KG
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2 flights found
Lowest: $81.86 (before tax), incl. tax: $116.80

Price Calendar Results

📅 Price Calendar
✈️ Shanghai (SHA) → Los Angeles (LAX)  |  Economy

Date            Lowest          Flights
─────────────────────────────────────
2026-04-01      $520.00 ⭐       8
2026-04-02      $490.00 🏆 Best  6
2026-04-03      $535.00          7
2026-04-04      $510.00          5
2026-04-05      $580.00          6
─────────────────────────────────────
Recommended date: 2026-04-02 ($490.00)

Field Interpretation Rules

  • Total price incl. tax = price + tax (adult fare)
  • Multiple passengers = adult total × adultNumber + child total × childNumber
  • Stops = number of segments - 1; show stopover city when stopQuantity > 0
  • Baggage = baggages[].pieces + baggages[].weight; note "baggage not included" when freeBaggage: false
  • Limited seats = show ⚠️ "Only X seats left" when maxSeatsRemain ≤ 3

---

Key Response Fields

FieldDescription
status0 = success
message"SUCCESS" indicates normal response
routings[]List of flight options
routings[].prices[]Prices by passenger type (ADT = Adult, CHD = Child)
routings[].segments[]Segment details (each stopover is a separate segment)
routings[].rule.baggages[]Free baggage allowance
routings[].rule.freeBaggagefalse = baggage must be purchased separately
routings[].maxSeatsRemainRemaining seats
passengerTypeADT = Adult, CHD = Child

---

Error Handling

ScenarioAction
status != 0 or message != "SUCCESS"Inform the user the query failed; suggest trying a different date
routings is an empty listNotify that no flights are available for this route/date
Network timeoutRetry once; if it fails again, ask the user to try later
Unrecognized city codeAsk the user to confirm the full city or airport name
childNumber > adultNumberPrompt: "Number of children cannot exceed the number of adults"

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.