Skip to main content
GET
/
api
/
score
Risk Score
curl --request GET \
  --url https://app.airrating.io/api/score
{
  "origin": "<string>",
  "destination": "<string>",
  "airline": "<string>",
  "date": "<string>",
  "score": 123,
  "confidence": 123,
  "delay_rate": 123,
  "avg_delay_min": 123,
  "total_flights": 123,
  "label": "<string>",
  "explanation": "<string>",
  "news_items": [
    {}
  ]
}

Overview

The core endpoint. Returns a Risk Score (0–100) for a given route, airline, and date, along with historical stats, a confidence indicator, and an optional AI-generated explanation.

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 Alitalia/ITA Airways, BA for British Airways).
date
string
required
Departure date in YYYY-MM-DD format. Must be a future date.
news
boolean
default:"false"
If true, includes recent news and disruption reports for the route in the response.
api_key
string
required
Your API key.

Response

origin
string
IATA code of the departure airport.
destination
string
IATA code of the arrival airport.
airline
string
IATA airline code.
date
string
Requested departure date.
score
integer
Risk Score from 0 (lowest risk) to 100 (highest risk).
confidence
float
Confidence in the score from 0.0 to 1.0, based on volume of historical data for this route/airline.
delay_rate
float
Historical proportion of flights on this route delayed by more than 30 minutes.
avg_delay_min
float
Average delay in minutes for flights that were delayed (> 30 min threshold).
total_flights
integer
Number of historical flights used to compute the score.
label
string
Human-readable risk label: Low risk, Medium risk, High risk, or Very high risk.
explanation
string
AI-generated plain-language explanation of the main risk drivers.
news_items
array
Present only when news=true. Array of recent disruption reports for the route.

Example

curl "https://app.airrating.io/api/score?origin=FCO&dest=LHR&airline=AZ&date=2026-04-10&api_key=YOUR_API_KEY"
Response
{
  "origin": "FCO",
  "destination": "LHR",
  "airline": "AZ",
  "date": "2026-04-10",
  "score": 62,
  "confidence": 0.84,
  "delay_rate": 0.31,
  "avg_delay_min": 28.4,
  "total_flights": 312,
  "label": "Medium risk",
  "explanation": "This route has a historical delay rate of 31%. Weather at Heathrow is a recurring factor in the April window. Confidence is high based on 312 recorded flights on this route and airline combination."
}

Score interpretation

ScoreLabelRecommendation
0–30Low riskSafe to book, low historical delay rate
31–60Medium riskBook with awareness, monitor closer to departure
61–80High riskConsider alternatives or build in buffer time
81–100Very high riskHigh disruption probability — evaluate alternatives

Scoring formula

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