← 返回
数据分析 Key 中文

Air France - KLM

Track Air France flights using the Air France–KLM Open Data APIs (Flight Status). Use when the user gives a flight number/date (e.g., AF007 on 2026-01-29) and wants monitoring, alerts (delay/gate/aircraft changes), or analysis (previous-flight chain, aircraft tail number → cabin recency / Wi‑Fi). Also use when setting up or tuning polling schedules within API rate limits.
使用Air France‑KLM Open Data API(航班状态)追踪法航航班。当用户提供航班号/日期(如AF007,2026‑01‑29)时使用,可用于监控、提醒(延误/登机口/飞机变更)或分析(前一航班链、飞机尾号→客舱翻新时间/Wi‑Fi)。亦用于在API速率限制内设置或调整轮询频率。
iclems
数据分析 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 2
Stars
📥 2,711
下载
💾 1
安装
1
版本
#latest

概述

Air France (AFKL Open Data) flight tracker

Quick start (one-off status)

1) Create an API key (and optional secret)

  • Register on: https://developer.airfranceklm.com
  • Subscribe to the Open Data product(s) you need (at least Flight Status API)
  • Generate credentials (API key; some accounts also provide an API secret)

2) Provide API credentials (do not print them):

  • Preferred: env vars AFKL_API_KEY (and optional AFKL_API_SECRET)
  • Or files in your state dir (CLAWDBOT_STATE_DIR or ./state):
  • afkl_api_key.txt (chmod 600)
  • afkl_api_secret.txt (chmod 600, optional)

2) Query flight status:

  • Run: node skills/airfrance-afkl/scripts/afkl_flightstatus_query.mjs --carrier AF --flight 7 --origin JFK --dep-date 2026-01-29

Notes:

  • Send Accept: / (API returns application/hal+json).
  • Keep within limits: <= 1 request/sec. When making multiple calls, sleep ~1100ms between them.

Start monitoring (watcher)

Use when the user wants proactive updates.

  • Run: node skills/airfrance-afkl/scripts/afkl_watch_flight.mjs --carrier AF --flight 7 --origin JFK --dep-date 2026-01-29

What it does:

  • Fetches the operational flight(s) for the date window.
  • Emits a single message only when something meaningful changes.
  • Also follows the previous-flight chain (flightRelations.previousFlightData.id) up to a configurable depth and alerts if a previous segment is delayed/cancelled.

Polling strategy (default):

  • >36h before departure: at most every 60 min
  • 36h→12h: every 30 min
  • 12h→3h: every 15 min
  • 3h→departure: every 5–10 min (stay under daily quota)
  • After departure: every 30 min until arrival

Implementation detail: run cron every 5–15 min, but the script self-throttles using a state file so it won’t hit the API when it’s not time. The watcher prints no output when nothing changed (so cron jobs can send only when stdout is non-empty).

Input shorthand

Preferred user-facing format:

  • AF7 demain / AF7 jeudi

Interpretation rule:

  • The day always refers to the departure date (not arrival).

Implementation notes:

  • Convert relative day words to a departure date in the user’s timezone unless the origin timezone is explicitly known.
  • When ambiguous (long-haul crossing midnight), prefer the departure local date at the origin if origin is known.

(For scripts, still pass --origin + --dep-date YYYY-MM-DD.)

Interpret “interesting” fields

See references/fields.md for:

  • flightRelations (prev/next)
  • places.* (terminal/gate/check-in zone)
  • times.* (scheduled/estimated/latest/actual)
  • aircraft (type, registration)
  • “parking position” / stand-type hints (when present)
  • Wi‑Fi hints and how to reason about cabin recency

Cabin recency / upgrade heuristics

When aircraft registration is available:

  • Use tail number to infer sub-fleet and likely cabin generation.
  • If data suggests older config (or no Wi‑Fi), upgrading can be more/less worth it.

Be conservative:

  • Open Data often doesn’t expose exact seat model; treat this as best-effort.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 14:07 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 164 📥 59,823
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,987
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 367 📥 140,189