360 Secure SkillHub
360 安全技能中心

Variflight Global Flight Fares

该 Skill 通过随附脚本调用 Variflight 机票接口,按三个字母的出发与到达 IATA 城市代码及出发日期查询单程航班,返回出发/到达机场、起降时间、时长、价格、中转信息与航班标签,支持用参数限制条数或输出原始 JSON。需用 python3 运行,接口返回 code 非 0 视为失败并反馈 msg,无需用户提供 API key。

arisefx
arisefx
热度 90.56
最近更新 2026-05-11 17:35:23
分类:生活依赖:代码执行 / 第三方 API应用场景:旅行

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add variflight-global-flight-fares
Metadata
name
variflight-global-flight-fares
description
Variflight Global Flight Fares searches one-way flight fares from the Variflight ticket API by departure IATA city code, arrival IATA city code, and departure date.
metadata
{"openclaw":{"homepage":"https://ticket.variflight.com/","requires":{"bins":["python3"]}}}

Variflight Global Flight Fares

Overview

Use the bundled script to query the Variflight ticket API and return one-way flight options for a single route and date.

Workflow

  1. Collect dep, arr, and date.
  2. Validate dep and arr as three-letter IATA city codes and date as YYYY-MM-DD.
  3. If the user gives city names instead of codes, infer only when the mapping is unambiguous; otherwise ask for the IATA codes.
  4. Run python3 scripts/query_flights.py --dep BJS --arr SHA --date 2026-04-21.
  5. Summarize the result with departure airport, arrival airport, times, duration, price, transfer info, and the flight tag text.

Output Rules

  • Treat API code != 0 as a failure and surface the returned msg.
  • Treat an empty data.list as a valid "no flights found" result.
  • Use --limit N when the user only wants a subset of results.
  • Use --json only when the user asks for raw payload data.
  • Mention transfer flights separately from direct flights when summarizing.
  • Do not ask the user to provide an API key for this skill.

Script

  • scripts/query_flights.py accepts:
    • --dep
    • --arr
    • --date
    • --limit
    • --json
  • The script sends the fixed request parameter flightNum=10.

Example

Run python3 scripts/query_flights.py --dep BJS --arr SHA --date 2026-04-21 --limit 5 to fetch the first five displayed results for Beijing to Shanghai on April 21, 2026.