example-data.com
Menu
Browse docs and collections

Overview

flights / #261

Sep
5
Fri

Lufthansa LH8320

3:25 PM – 11:03 PM

GRU → YYZ

From EUR 2156.11

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 261,
  "flightNumber": "LH8320",
  "airline": "Lufthansa",
  "departureAirport": "GRU",
  "arrivalAirport": "YYZ",
  "departureAt": "2025-09-05T15:25:07.983Z",
  "arrivalAt": "2025-09-05T23:03:07.983Z",
  "durationMinutes": 458,
  "status": "scheduled",
  "priceFrom": 2156.11,
  "currency": "EUR",
  "createdAt": "2025-08-13T15:25:07.983Z"
}