← 返回
未分类 Key 中文

Aviasales Flight Search

Search for cheap flights and airfare via Travelpayouts/Aviasales API. Supports date-specific search, price calendar, round-trip, cheapest-price monitoring, p...
通过Travelpayouts/Aviasales API搜索廉价机票,支持按日期查询、价格日历、往返航班及最低价监控等功能。
aspalagin
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 337
下载
💾 0
安装
1
版本
#latest

概述

Flights — Airfare Search via Travelpayouts/Aviasales

Prerequisites

Environment variable TRAVELPAYOUTS_TOKEN must be set with a valid Travelpayouts API token.

Quick Reference

TaskCommand
---------------
Search flights on a date--from MOW --to LED --date 2026-04-15 [--return 2026-04-20] [--direct] [--limit 10]
Price calendar for a month--from MOW --to LED --month 2026-04
Lookup IATA code--lookup "Istanbul"
Latest found prices--from MOW --to AER --latest [--one-way]
Popular destinations--from MOW --directions

Usage

1. Resolve IATA codes

If the user provides a city name instead of an IATA code, resolve it first:

python3 scripts/search_flights.py --lookup "Istanbul"

Pick the most relevant result's code field.

2. Search flights on a specific date

python3 scripts/search_flights.py --from MOW --to LED --date 2026-04-15 --return 2026-04-20

Add --direct for non-stop only. Add --limit N to cap results (default 10).

3. Price calendar (cheapest days in a month)

python3 scripts/search_flights.py --from MOW --to LED --month 2026-04

Returns results sorted by price. Use to recommend the cheapest travel dates.

4. Latest found prices (price monitoring)

python3 scripts/search_flights.py --from MOW --latest

Shows recently found prices from the origin to any destination. Add --to AER to filter. Add --one-way for one-way only.

5. Popular destinations from a city

python3 scripts/search_flights.py --from MOW --directions

Returns destinations sorted by price — useful for "where can I fly cheaply from X?" queries.

Output Format

All commands output JSON to stdout:

{
  "query": {"from": "MOW", "to": "LED", "date": "2026-04-15"},
  "results": [
    {
      "price": 2454,
      "airline": "Pobeda",
      "airline_code": "DP",
      "flight": "DP 209",
      "from_airport": "VKO",
      "to_airport": "LED",
      "departure": "2026-04-07T07:50:00+03:00",
      "duration_min": 90,
      "duration_str": "1h 30min",
      "transfers": 0,
      "transfers_str": "non-stop",
      "link": "https://aviasales.ru/search/..."
    }
  ],
  "cheapest": 2454,
  "count": 5
}

Presenting Results to the User

  1. Highlight the cheapest option first.
  2. For each result show: price, airline, flight number, departure time, duration, stop type.
  3. Format the link field as a clickable URL for booking.
  4. For calendar queries, recommend the cheapest dates.

API Endpoints

MethodURLPurpose
----------------------
GEThttps://api.travelpayouts.com/aviasales/v3/prices_for_datesPrices for specific dates
GEThttps://api.travelpayouts.com/aviasales/v3/get_latest_pricesLatest found prices
GEThttps://api.travelpayouts.com/aviasales/v3/grouped_pricesMin prices by month/day
GEThttps://api.travelpayouts.com/v1/city-directionsPopular destinations
GEThttps://autocomplete.travelpayouts.com/places2IATA code autocomplete

Common IATA Codes

CityCode
------------
Moscow (all airports)MOW
Moscow SheremetyevoSVO
Moscow DomodedovoDME
Moscow VnukovoVKO
Saint PetersburgLED
SochiAER
KazanKZN
MinskMSQ
IstanbulIST
DubaiDXB
YerevanEVN
TbilisiTBS
BishkekFRU
TashkentTAS

References

  • Airline codes: See references/airlines.md for a reference mapping of IATA airline codes to names. The script auto-fetches the latest mapping from the Travelpayouts API with a 24-hour cache; this file serves as a fallback.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 09:57 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,215 📥 266,533
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 324,156
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 712 📥 243,826