example-data.com
Menu
Browse docs and collections

Overview

flights / #227

Sep
11
Thu

Lufthansa LH7043

6:42 PM – 4:16 AM

DXB → ICN

From SGD 164.04

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 227,
  "flightNumber": "LH7043",
  "airline": "Lufthansa",
  "departureAirport": "DXB",
  "arrivalAirport": "ICN",
  "departureAt": "2025-09-11T18:42:16.642Z",
  "arrivalAt": "2025-09-12T04:16:16.642Z",
  "durationMinutes": 574,
  "status": "landed",
  "priceFrom": 164.04,
  "currency": "SGD",
  "createdAt": "2025-09-04T18:42:16.642Z"
}