example-data.com
Menu
Browse docs and collections

Overview

flights / #161

Nov
3
Tue

Lufthansa LH8357

7:08 AM – 4:56 PM

YYZ → SYD

From SGD 1714.80

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 161,
  "flightNumber": "LH8357",
  "airline": "Lufthansa",
  "departureAirport": "YYZ",
  "arrivalAirport": "SYD",
  "departureAt": "2026-11-03T07:08:25.021Z",
  "arrivalAt": "2026-11-03T16:56:25.021Z",
  "durationMinutes": 588,
  "status": "cancelled",
  "priceFrom": 1714.8,
  "currency": "SGD",
  "createdAt": "2026-08-09T07:08:25.021Z"
}