May
30
Fri
American Airlines AA5917
4:21 AM – 10:51 AM
DFW → YYZ
From EUR 1566.86
Overview
flights / #125
4:21 AM – 10:51 AM
DFW → YYZ
From EUR 1566.86
Request
curl example
curl -sS \ "https://example-data.com/api/v1/flights/125" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/flights/125" ); const flight = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/flights.d.ts https://example-data.com/types/flights.d.ts
import type { Flight } from "./types/flights";
const res = await fetch(
"https://example-data.com/api/v1/flights/125"
);
const flight = (await res.json()) as Flight; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/flights/125"
)
flight = res.json() Response
{
"id": 125,
"flightNumber": "AA5917",
"airline": "American Airlines",
"departureAirport": "DFW",
"arrivalAirport": "YYZ",
"departureAt": "2025-05-30T04:21:36.282Z",
"arrivalAt": "2025-05-30T10:51:36.282Z",
"durationMinutes": 390,
"status": "landed",
"priceFrom": 1566.86,
"currency": "EUR",
"createdAt": "2025-03-18T04:21:36.282Z"
}