example-data.com
Menu
Browse docs and collections

Overview

flights / #157

Jul
23
Thu

Lufthansa LH2982

7:55 AM – 8:28 PM

ATL → JFK

From EUR 1741.33

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 157,
  "flightNumber": "LH2982",
  "airline": "Lufthansa",
  "departureAirport": "ATL",
  "arrivalAirport": "JFK",
  "departureAt": "2026-07-23T07:55:06.654Z",
  "arrivalAt": "2026-07-23T20:28:06.654Z",
  "durationMinutes": 753,
  "status": "in_air",
  "priceFrom": 1741.33,
  "currency": "EUR",
  "createdAt": "2026-04-28T07:55:06.654Z"
}