example-data.com
Menu
Browse docs and collections

Overview

flights / #280

Mar
2
Tue

British Airways BA1676

7:43 AM – 10:11 PM

LAX → FCO

From CAD 1136.94

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 280,
  "flightNumber": "BA1676",
  "airline": "British Airways",
  "departureAirport": "LAX",
  "arrivalAirport": "FCO",
  "departureAt": "2027-03-02T07:43:40.388Z",
  "arrivalAt": "2027-03-02T22:11:40.388Z",
  "durationMinutes": 868,
  "status": "in_air",
  "priceFrom": 1136.94,
  "currency": "CAD",
  "createdAt": "2026-12-22T07:43:40.388Z"
}