Look up aircraft type, equipment changes, and confidence scoring for any flight by querying multiple aviation data sources (OpenSky, AeroDataBox, AirLabs) and merging results with weighted confidence scoring.
bash
node {baseDir}/scripts/search_flight.js --flight=CI101 [--date=2026-03-22]
Required env: RAPIDAPI_KEY Optional env: AIRLABS_KEY (adds another data source for higher confidence)
bash
node {baseDir}/scripts/health_check.js
Verifies all API keys are set and reachable. Shows which data sources are available.
search_flight.js outputs JSON to stdout:
json
{
"flightNumber": "CI101",
"date": "2026-03-22",
"airline": "China Airlines",
"origin": "NRT",
"destination": "TPE",
"aircraftType": "A333",
"registration": "B-18311",
"confidence": 0.6,
"equipmentChange": null,
"typeDistribution": { "A333": 1 },
"sources": ["aerodatabox"]
}
When presenting results to the user, follow these rules:
FieldHow to Interpretconfidence ≥ 0.8High confidence — present the aircraft type directlyconfidence 0.5–0.8Medium — mention "likely" or "most probable"confidence < 0.5Low — warn that data is uncertain, show typeDistribution``equipmentChange not null⚠️ Important — Highlight this! The actual aircraft differs from the scheduled one. Show from, to, and changeType (upgrade/downgrade/lateral)typeDistributionShows agreement across sources. Multiple entries = sources disagreesources emptyNo data found — suggest trying a different date
Note on aircraft type codes: The script automatically normalizes model names (e.g. "Airbus A330-300" → "A333") and filters invalid typecodes. In rare cases, an unrecognized model name may pass through as-is.
ErrorCauseFixRAPIDAPI_KEY not setMissing env varexport RAPIDAPI_KEY=your_key or set in ~/.openclaw/openclaw.json``403 from AeroDataBoxInvalid or expired keyCheck your RapidAPI subscriptionNo flight data foundFlight not in any databaseTry with a different date or a major airline flight