example-data.com
Menu
Browse docs and collections

Overview

flights / #260

Dec
16
Tue

Lufthansa LH578

9:35 PM – 5:25 AM

ICN → ORD

From SGD 697.42

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 260,
  "flightNumber": "LH578",
  "airline": "Lufthansa",
  "departureAirport": "ICN",
  "arrivalAirport": "ORD",
  "departureAt": "2025-12-16T21:35:05.245Z",
  "arrivalAt": "2025-12-17T05:25:05.245Z",
  "durationMinutes": 470,
  "status": "boarding",
  "priceFrom": 697.42,
  "currency": "SGD",
  "createdAt": "2025-09-26T21:35:05.245Z"
}