example-data.com
Menu
Browse docs and collections

Overview

flights / #158

Aug
16
Sun

Lufthansa LH7799

10:26 AM – 7:48 PM

FRA → YYZ

From SGD 935.76

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 158,
  "flightNumber": "LH7799",
  "airline": "Lufthansa",
  "departureAirport": "FRA",
  "arrivalAirport": "YYZ",
  "departureAt": "2026-08-16T10:26:25.358Z",
  "arrivalAt": "2026-08-16T19:48:25.358Z",
  "durationMinutes": 562,
  "status": "in_air",
  "priceFrom": 935.76,
  "currency": "SGD",
  "createdAt": "2026-06-20T10:26:25.358Z"
}