简介
连接300+航司的航班搜索与预订API,支持比价、选座、出票全流程管理,适合差旅自动化与OTA场景。
原始描述
Search, book, and manage flights via the Duffel Flights API. Covers 300+ airlines (NDC, GDS, LCC). Use when: (1) searching for flights between cities, (2) co...
通过你的 Agent 添加
安装目录:duffel/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: duffel description: "Search, book, and manage flights via the Duffel Flights API. Covers 300+ airlines (NDC, GDS, LCC). Use when: (1) searching for flights between cities, (2) comparing prices and fare classes, (3) booking flights, (4) checking booking status, (5) cancelling bookings, (6) viewing seat maps, (7) looking up airport/city IATA codes. Supports one-way, round-trip, multi-passenger, cabin class filtering, and nonstop preferences."
Duffel Flights
Search, book, and manage flights across 300+ airlines via the Duffel API.
Setup
Set DUFFEL_TOKEN env var with your Duffel API access token.
Get one at https://app.duffel.com → Developers → Access Tokens.
Test tokens (prefix duffel_test_) use sandbox data with unlimited balance.
Commands
Search flights
python scripts/duffel.py search --from MIA --to LHR --date 2026-04-15
python scripts/duffel.py search --from MIA --to CDG --date 2026-03-15 --return-date 2026-03-22 --cabin business
python scripts/duffel.py search --from JFK --to LAX --date 2026-05-01 --nonstop --adults 2
Options: --cabin economy|premium_economy|business|first, --nonstop, --adults N, --children N, --infants N, --sort price|duration, --max-results N, --json
Results are numbered. Use the number with other commands.
View offer details
python scripts/duffel.py offer 3
Shows segments, baggage, fare conditions (refund/change), available extras.
Book a flight
python scripts/duffel.py book 3 --pax "RIBEIRO/FABIO MR 1977-01-31 fabio@ribei.ro +13059159687 BR m"
Pax format: LAST/FIRST TITLE DOB EMAIL PHONE NATIONALITY GENDER
- TITLE: MR, MRS, MS, MISS, DR
- GENDER: m or f
- Multiple passengers: repeat
--pax "..."for each
Payment uses Duffel account balance. Top up at https://app.duffel.com.
Check order status
python scripts/duffel.py order ord_0000XXXXX
Cancel order
python scripts/duffel.py cancel ord_0000XXXXX # Quote (shows refund amount)
python scripts/duffel.py cancel ord_0000XXXXX --confirm # Execute cancellation
Seat map
python scripts/duffel.py seatmap 3
Airport/city lookup
python scripts/duffel.py places "new york"
Typical workflow
search→ browse numbered resultsoffer N→ check details, baggage, conditionsbook N --pax "..."→ get PNRorder <id>→ verify bookingcancel <id>→ if needed
Notes
- Offers expire (usually ~20 min). Re-search if expired.
- Test mode: unlimited balance, bookings on "Duffel Airways" (fake airline).
- Production: real airlines, real tickets. Balance must be funded.
- All commands support
--jsonfor raw API output. - Last search saved to
/tmp/duffel-last-search.jsonfor index reference. - For API details, see
references/api-guide.mdandreferences/booking-flow.md.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。