example-data.com
Menu
Browse docs and collections

Overview

flights / #318

Dec
28
Sun

British Airways BA7932

1:04 PM – 7:31 PM

LAX → NRT

From CAD 2268.80

Component variants

Related

Referenced by

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/flights/318" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/flights/318"
);
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/318"
);
const flight = (await res.json()) as Flight;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/flights/318"
)
flight = res.json()

Response

{
  "id": 318,
  "flightNumber": "BA7932",
  "airline": "British Airways",
  "departureAirport": "LAX",
  "arrivalAirport": "NRT",
  "departureAt": "2025-12-28T13:04:54.953Z",
  "arrivalAt": "2025-12-28T19:31:54.953Z",
  "durationMinutes": 387,
  "status": "landed",
  "priceFrom": 2268.8,
  "currency": "CAD",
  "createdAt": "2025-10-04T13:04:54.953Z"
}