example-data.com
Menu
Browse docs and collections

Overview

flights / #197

Nov
8
Sat

Lufthansa LH1827

5:20 AM – 4:38 PM

SYD → SIN

From SGD 1151.64

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 197,
  "flightNumber": "LH1827",
  "airline": "Lufthansa",
  "departureAirport": "SYD",
  "arrivalAirport": "SIN",
  "departureAt": "2025-11-08T05:20:47.745Z",
  "arrivalAt": "2025-11-08T16:38:47.745Z",
  "durationMinutes": 678,
  "status": "in_air",
  "priceFrom": 1151.64,
  "currency": "SGD",
  "createdAt": "2025-08-31T05:20:47.745Z"
}