example-data.com
Menu
Browse docs and collections

Overview

flights / #17

Mar
2
Mon

Lufthansa LH7161

4:25 AM – 2:08 PM

FCO → ATL

From JPY 2464.21

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 17,
  "flightNumber": "LH7161",
  "airline": "Lufthansa",
  "departureAirport": "FCO",
  "arrivalAirport": "ATL",
  "departureAt": "2026-03-02T04:25:23.006Z",
  "arrivalAt": "2026-03-02T14:08:23.006Z",
  "durationMinutes": 583,
  "status": "cancelled",
  "priceFrom": 2464.21,
  "currency": "JPY",
  "createdAt": "2026-01-18T04:25:23.006Z"
}