Airlines on Route
curl --request GET \
--url https://app.airrating.io/api/airlinesimport requests
url = "https://app.airrating.io/api/airlines"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.airrating.io/api/airlines', 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/airlines",
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/airlines"
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/airlines")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.airrating.io/api/airlines")
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{
"origin": "<string>",
"dest": "<string>",
"airlines": [
{
"airline": "<string>",
"airline_name": "<string>",
"score": 123,
"label": "<string>",
"delay_rate": 123,
"total_flights": 123,
"confidence": 123
}
]
}API Reference
Airlines on Route
Get all airlines operating a route with their individual risk scores.
GET
/
api
/
airlines
Airlines on Route
curl --request GET \
--url https://app.airrating.io/api/airlinesimport requests
url = "https://app.airrating.io/api/airlines"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.airrating.io/api/airlines', 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/airlines",
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/airlines"
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/airlines")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.airrating.io/api/airlines")
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{
"origin": "<string>",
"dest": "<string>",
"airlines": [
{
"airline": "<string>",
"airline_name": "<string>",
"score": 123,
"label": "<string>",
"delay_rate": 123,
"total_flights": 123,
"confidence": 123
}
]
}Overview
Returns a list of all airlines that operate a given route, each with their own Risk Score and historical delay statistics. Useful for comparing carriers before booking.Request
string
required
IATA code of the departure airport (e.g.
FCO, LHR, JFK).string
required
IATA code of the arrival airport.
string
required
Your API key.
Response
string
IATA code of the departure airport.
string
IATA code of the arrival airport.
array
List of airlines operating the route, sorted by
score ascending (lowest risk first).Show Airline object
Show Airline object
string
IATA airline code.
string
Full airline name.
integer
Risk Score 0–100 for this airline on this route.
string
Risk label:
Low, Moderate, High, or Very High.float
Historical delay rate (> 30 min) for this airline on this route.
integer
Number of historical flights for this airline on this route.
float
Confidence in the score (0.0–1.0).
Example
curl "https://app.airrating.io/api/airlines?origin=FCO&dest=LHR&api_key=YOUR_API_KEY"
import httpx
response = httpx.get(
"https://app.airrating.io/api/airlines",
params={"origin": "FCO", "dest": "LHR", "api_key": "YOUR_API_KEY"}
)
airlines = response.json()["airlines"]
for a in airlines:
print(f"{a['airline_name']}: {a['score']} ({a['label']})")
const res = await fetch(
"https://app.airrating.io/api/airlines?origin=FCO&dest=LHR&api_key=YOUR_API_KEY"
);
const { airlines } = await res.json();
airlines.forEach(a => console.log(`${a.airline_name}: ${a.score}`));
Response
{
"origin": "FCO",
"dest": "LHR",
"airlines": [
{
"airline": "FR",
"airline_name": "Ryanair",
"score": 28,
"label": "Low",
"delay_rate": 0.14,
"total_flights": 543,
"confidence": 0.91
},
{
"airline": "BA",
"airline_name": "British Airways",
"score": 45,
"label": "Moderate",
"delay_rate": 0.22,
"total_flights": 198,
"confidence": 0.72
},
{
"airline": "AZ",
"airline_name": "ITA Airways",
"score": 62,
"label": "High",
"delay_rate": 0.31,
"total_flights": 312,
"confidence": 0.84
}
]
}
Airlines are sorted by
score ascending — the lowest-risk carrier appears first. Use this endpoint to power a “best airline” recommendation feature.⌘I
