Airline routes
curl --request GET \
--url https://data.flightportrait.com/v1/airlines/{icao}/routesimport requests
url = "https://data.flightportrait.com/v1/airlines/{icao}/routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.flightportrait.com/v1/airlines/{icao}/routes', 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://data.flightportrait.com/v1/airlines/{icao}/routes",
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://data.flightportrait.com/v1/airlines/{icao}/routes"
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://data.flightportrait.com/v1/airlines/{icao}/routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.flightportrait.com/v1/airlines/{icao}/routes")
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{
"icao": "SIA",
"source": "flightlog",
"airports": {
"SIN": {
"lat": 1.35019,
"lon": 103.994,
"name": "Singapore Changi",
"iso_country": "SG",
"tz": "Asia/Singapore"
}
},
"legs": [
{
"org": "SIN",
"dst": "SYD",
"n": 7,
"days": 7,
"per_week": 7,
"avg_min": 472,
"aircraft": [
{
"type": "A388",
"name": "Airbus A380-800",
"n": 4
}
]
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "rate_limited",
"detail": "slow down"
}Reference
Airline routes
Observed legs and the airports they touch, undirected (org/dst in canonical alphabetical order). Prefers flight-log frequencies; falls back to route chains when the log has no rows. n is the evidence count, a lower bound. Rate: 300 per 600 s (bucket refdata). Cache: 1 h edge.
GET
/
v1
/
airlines
/
{icao}
/
routes
Airline routes
curl --request GET \
--url https://data.flightportrait.com/v1/airlines/{icao}/routesimport requests
url = "https://data.flightportrait.com/v1/airlines/{icao}/routes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://data.flightportrait.com/v1/airlines/{icao}/routes', 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://data.flightportrait.com/v1/airlines/{icao}/routes",
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://data.flightportrait.com/v1/airlines/{icao}/routes"
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://data.flightportrait.com/v1/airlines/{icao}/routes")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.flightportrait.com/v1/airlines/{icao}/routes")
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{
"icao": "SIA",
"source": "flightlog",
"airports": {
"SIN": {
"lat": 1.35019,
"lon": 103.994,
"name": "Singapore Changi",
"iso_country": "SG",
"tz": "Asia/Singapore"
}
},
"legs": [
{
"org": "SIN",
"dst": "SYD",
"n": 7,
"days": 7,
"per_week": 7,
"avg_min": 472,
"aircraft": [
{
"type": "A388",
"name": "Airbus A380-800",
"n": 4
}
]
}
]
}{
"error": "<string>",
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": "rate_limited",
"detail": "slow down"
}Path Parameters
Airline ICAO code.
Response
OK