Risk Score
curl --request GET \
--url https://app.airrating.io/api/scoreimport requests
url = "https://app.airrating.io/api/score"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.airrating.io/api/score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.airrating.io/api/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.airrating.io/api/score"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.airrating.io/api/score")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.airrating.io/api/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": [
{}
]
}API Reference
Risk Score
Calculate the delay risk score for a specific flight.
GET
/
api
/
score
Risk Score
curl --request GET \
--url https://app.airrating.io/api/scoreimport requests
url = "https://app.airrating.io/api/score"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.airrating.io/api/score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.airrating.io/api/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.airrating.io/api/score"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.airrating.io/api/score")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.airrating.io/api/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": [
{}
]
}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
string
required
IATA code of the departure airport (e.g.
FCO, LHR, JFK).string
required
IATA code of the arrival airport.
string
required
IATA airline code (e.g.
AZ for ITA Airways, BA for British Airways).string
required
Departure date in
YYYY-MM-DD format.boolean
default:"false"
If
true, includes a live news feed of disruption reports for the route in the response.string
required
Your API key.
Response
integer
Risk Score from 0 (lowest risk) to 100 (highest risk).
integer
Statistical-only score before ML blending.
integer
ML model prediction (0–100).
null if model unavailable.boolean
Whether the ML model contributed to this score.
string
Human-readable risk label:
Low, Moderate, High, or Very High.string
One-sentence actionable recommendation based on the risk level and top driver.
object
Echo of the query parameters:
origin, destination, airline, flight_date.object
Historical statistics for this route/airline combination.
Show stats fields
Show stats fields
float
Historical percentage of flights delayed > 30 min.
float
Historical cancellation rate percentage.
float
Average delay in minutes for delayed flights (> 30 min).
integer
Number of historical flights used to compute the score.
integer
Confidence in the score (0–100), based on historical data volume.
float
Congestion score for the departure airport (0.0–1.0).
float
Congestion score for the arrival airport (0.0–1.0).
float
ML-estimated probability of delay > 30 min, as a percentage.
null if unavailable.array
Sorted list of risk factor contributions (highest first).
object
Weather risk at the departure airport for the requested date.
object
Weather risk at the arrival airport. Same structure as
weather_dep.string
Which data tier was used:
exact (origin+dest+airline match), route_any_airline (fallback — any airline on the route), or no_data.object
Airline metadata:
name (full name), country.object
Airport metadata for origin:
name, city, country.object
Airport metadata for destination:
name, city, country.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"
import httpx
response = httpx.get(
"https://app.airrating.io/api/score",
params={
"origin": "FCO",
"dest": "LHR",
"airline": "AZ",
"date": "2026-04-10",
"api_key": "YOUR_API_KEY",
}
)
data = response.json()
print(f"Score: {data['score']} — {data['label']}")
print(f"Delay rate: {data['stats']['delay_rate_pct']}%")
const params = new URLSearchParams({
origin: "FCO",
dest: "LHR",
airline: "AZ",
date: "2026-04-10",
api_key: "YOUR_API_KEY",
});
const res = await fetch(`https://app.airrating.io/api/score?${params}`);
const data = await res.json();
console.log(`Score: ${data.score} — ${data.label}`);
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
| Score | Label | Recommendation |
|---|---|---|
| 0–30 | Low | Safe to book, low historical delay rate |
| 31–55 | Moderate | Some risk — consider flexible fare and monitor closer to departure |
| 56–74 | High | Elevated risk — check alternatives or add buffer time |
| 75–100 | Very High | High disruption probability — evaluate alternatives |
Scoring formula
score = 70% × statistical_score + 30% × ml_probability × min(1.0, confidence × 2)
confidence_pct < 50), keeping the score grounded in observed outcomes.