Skip to main content
GET
/
api
/
score
Risk Score
curl --request GET \
  --url https://app.airrating.io/api/score
{
  "score": 123,
  "score_linear": 123,
  "score_ml": 123,
  "ml_available": true,
  "label": "<string>",
  "recommendation": "<string>",
  "input": {},
  "stats": {
    "delay_rate_pct": 123,
    "cancel_rate_pct": 123,
    "avg_delay_min": 123,
    "n_flights": 123,
    "confidence_pct": 123,
    "congestion_dep": 123,
    "congestion_arr": 123,
    "ml_probability": 123
  },
  "components": [
    {
      "key": "<string>",
      "name": "<string>",
      "value": 123,
      "label": "<string>",
      "contribution": 123
    }
  ],
  "weather_dep": {
    "score": 123,
    "condition": "<string>",
    "temp": 123,
    "wind": 123,
    "precip": 123
  },
  "weather_arr": {},
  "data_source": "<string>",
  "airline_info": {},
  "origin_info": {},
  "dest_info": {},
  "news": [
    {}
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.airrating.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The core endpoint. Returns a Risk Score (0–100) for a given route, airline, and date, along with historical statistics, weather data, risk drivers, and an optional news feed.

Request

origin
string
required
IATA code of the departure airport (e.g. FCO, LHR, JFK).
dest
string
required
IATA code of the arrival airport.
airline
string
required
IATA airline code (e.g. AZ for ITA Airways, BA for British Airways).
date
string
required
Departure date in YYYY-MM-DD format.
news
boolean
default:"false"
If true, includes a live news feed of disruption reports for the route in the response.
api_key
string
required
Your API key.

Response

score
integer
Risk Score from 0 (lowest risk) to 100 (highest risk).
score_linear
integer
Statistical-only score before ML blending.
score_ml
integer
ML model prediction (0–100). null if model unavailable.
ml_available
boolean
Whether the ML model contributed to this score.
label
string
Human-readable risk label: Low, Moderate, High, or Very High.
recommendation
string
One-sentence actionable recommendation based on the risk level and top driver.
input
object
Echo of the query parameters: origin, destination, airline, flight_date.
stats
object
Historical statistics for this route/airline combination.
components
array
Sorted list of risk factor contributions (highest first).
weather_dep
object
Weather risk at the departure airport for the requested date.
weather_arr
object
Weather risk at the arrival airport. Same structure as weather_dep.
data_source
string
Which data tier was used: exact (origin+dest+airline match), route_any_airline (fallback — any airline on the route), or no_data.
airline_info
object
Airline metadata: name (full name), country.
origin_info
object
Airport metadata for origin: name, city, country.
dest_info
object
Airport metadata for destination: name, city, country.
news
array
Present only when news=true. Array of disruption reports — see Route News for the item schema.

Example

curl "https://app.airrating.io/api/score?origin=FCO&dest=LHR&airline=AZ&date=2026-04-10&api_key=YOUR_API_KEY"
Response
{
  "score": 62,
  "score_linear": 65,
  "score_ml": 52,
  "ml_available": true,
  "label": "High",
  "recommendation": "Elevated risk — check alternatives. Main driver: Historical Delay Rate.",
  "input": {
    "origin": "FCO",
    "destination": "LHR",
    "airline": "AZ",
    "flight_date": "2026-04-10"
  },
  "stats": {
    "delay_rate_pct": 31.0,
    "cancel_rate_pct": 4.2,
    "avg_delay_min": 28.4,
    "n_flights": 312,
    "confidence_pct": 84,
    "congestion_dep": 0.52,
    "congestion_arr": 0.78,
    "ml_probability": 38.0
  },
  "components": [
    { "key": "delay_rate", "name": "Historical Delay Rate", "value": 0.31, "label": "High", "contribution": 18.6 },
    { "key": "congestion", "name": "Airport Congestion", "value": 0.65, "label": "Moderate", "contribution": 9.75 },
    { "key": "weather", "name": "Weather", "value": 0.22, "label": "Low", "contribution": 4.4 },
    { "key": "seasonality", "name": "Seasonality", "value": 0.3, "label": "Low", "contribution": 3.0 }
  ],
  "weather_dep": { "score": 0.18, "condition": "Partly cloudy", "temp": 14.0, "wind": 22.0, "precip": 0.0 },
  "weather_arr": { "score": 0.27, "condition": "Rain", "temp": 10.0, "wind": 35.0, "precip": 2.1 },
  "data_source": "exact",
  "data_provider": "aviation_edge",
  "airline_info": { "name": "ITA Airways", "country": "Italy" },
  "origin_info": { "name": "Leonardo da Vinci–Fiumicino Airport", "city": "Rome", "country": "Italy" },
  "dest_info": { "name": "Heathrow Airport", "city": "London", "country": "United Kingdom" }
}

Score interpretation

ScoreLabelRecommendation
0–30LowSafe to book, low historical delay rate
31–55ModerateSome risk — consider flexible fare and monitor closer to departure
56–74HighElevated risk — check alternatives or add buffer time
75–100Very HighHigh disruption probability — evaluate alternatives

Scoring formula

score = 70% × statistical_score + 30% × ml_probability × min(1.0, confidence × 2)
The ML weight reduces automatically when historical data volume is low (confidence_pct < 50), keeping the score grounded in observed outcomes.