Aug
26
Tue
American Airlines AA842
5:54 PM – 1:16 AM
LHR → BCN
From AUD 55.71
Overview
flights / #306
5:54 PM – 1:16 AM
LHR → BCN
From AUD 55.71
Request
curl example
curl -sS \ "https://example-data.com/api/v1/flights/306" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/flights/306" ); 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/306"
);
const flight = (await res.json()) as Flight; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/flights/306"
)
flight = res.json() Response
{
"id": 306,
"flightNumber": "AA842",
"airline": "American Airlines",
"departureAirport": "LHR",
"arrivalAirport": "BCN",
"departureAt": "2025-08-26T17:54:19.245Z",
"arrivalAt": "2025-08-27T01:16:19.245Z",
"durationMinutes": 442,
"status": "boarding",
"priceFrom": 55.71,
"currency": "AUD",
"createdAt": "2025-07-02T17:54:19.245Z"
}