example-data.com
Menu
Browse docs and collections

Overview

flights / #12

Mar
14
Sat

Lufthansa LH8590

10:34 PM – 11:38 PM

BCN → AMS

From JPY 2152.44

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 12,
  "flightNumber": "LH8590",
  "airline": "Lufthansa",
  "departureAirport": "BCN",
  "arrivalAirport": "AMS",
  "departureAt": "2026-03-14T22:34:47.654Z",
  "arrivalAt": "2026-03-14T23:38:47.654Z",
  "durationMinutes": 64,
  "status": "cancelled",
  "priceFrom": 2152.44,
  "currency": "JPY",
  "createdAt": "2026-02-17T22:34:47.654Z"
}