example-data.com
Menu
Browse docs and collections

Overview

flights / #384

Jan
10
Sun

Lufthansa LH7347

11:48 AM – 9:33 PM

BCN → GRU

From EUR 340.05

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 384,
  "flightNumber": "LH7347",
  "airline": "Lufthansa",
  "departureAirport": "BCN",
  "arrivalAirport": "GRU",
  "departureAt": "2027-01-10T11:48:55.651Z",
  "arrivalAt": "2027-01-10T21:33:55.651Z",
  "durationMinutes": 585,
  "status": "in_air",
  "priceFrom": 340.05,
  "currency": "EUR",
  "createdAt": "2026-11-18T11:48:55.651Z"
}