example-data.com
Menu
Browse docs and collections

Overview

flights / #288

Apr
15
Thu

Lufthansa LH3204

9:21 AM – 1:26 PM

LAX → NRT

From USD 1674.17

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 288,
  "flightNumber": "LH3204",
  "airline": "Lufthansa",
  "departureAirport": "LAX",
  "arrivalAirport": "NRT",
  "departureAt": "2027-04-15T09:21:16.433Z",
  "arrivalAt": "2027-04-15T13:26:16.433Z",
  "durationMinutes": 245,
  "status": "in_air",
  "priceFrom": 1674.17,
  "currency": "USD",
  "createdAt": "2027-02-09T09:21:16.433Z"
}