Mar
8
Mon
Lufthansa LH2866
4:33 PM – 4:34 AM
BCN → LHR
From AUD 2335.28
Overview
flights / #166
4:33 PM – 4:34 AM
BCN → LHR
From AUD 2335.28
Request
curl example
curl -sS \ "https://example-data.com/api/v1/flights/166" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/flights/166" ); 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/166"
);
const flight = (await res.json()) as Flight; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/flights/166"
)
flight = res.json() Response
{
"id": 166,
"flightNumber": "LH2866",
"airline": "Lufthansa",
"departureAirport": "BCN",
"arrivalAirport": "LHR",
"departureAt": "2027-03-08T16:33:42.483Z",
"arrivalAt": "2027-03-09T04:34:42.483Z",
"durationMinutes": 721,
"status": "delayed",
"priceFrom": 2335.28,
"currency": "AUD",
"createdAt": "2027-01-23T16:33:42.483Z"
}