May
24
Sat
British Airways BA2489
3:43 PM – 5:28 PM
BCN → CDG
From JPY 507.75
Overview
flights / #178
3:43 PM – 5:28 PM
BCN → CDG
From JPY 507.75
Request
curl example
curl -sS \ "https://example-data.com/api/v1/flights/178" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/flights/178" ); 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/178"
);
const flight = (await res.json()) as Flight; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/flights/178"
)
flight = res.json() Response
{
"id": 178,
"flightNumber": "BA2489",
"airline": "British Airways",
"departureAirport": "BCN",
"arrivalAirport": "CDG",
"departureAt": "2025-05-24T15:43:14.228Z",
"arrivalAt": "2025-05-24T17:28:14.228Z",
"durationMinutes": 105,
"status": "cancelled",
"priceFrom": 507.75,
"currency": "JPY",
"createdAt": "2025-05-19T15:43:14.228Z"
}