example-data.com
Menu
Browse docs and collections

Overview

flights / #142

Jan
19
Mon

British Airways BA3341

6:55 AM – 8:25 AM

LAX → LHR

From EUR 110.59

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 142,
  "flightNumber": "BA3341",
  "airline": "British Airways",
  "departureAirport": "LAX",
  "arrivalAirport": "LHR",
  "departureAt": "2026-01-19T06:55:00.343Z",
  "arrivalAt": "2026-01-19T08:25:00.343Z",
  "durationMinutes": 90,
  "status": "scheduled",
  "priceFrom": 110.59,
  "currency": "EUR",
  "createdAt": "2025-12-01T06:55:00.343Z"
}