example-data.com
Menu
Browse docs and collections

Overview

flights / #76

Mar
6
Fri

British Airways BA4073

4:49 PM – 9:40 PM

DFW → LAX

From AUD 1040.05

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 76,
  "flightNumber": "BA4073",
  "airline": "British Airways",
  "departureAirport": "DFW",
  "arrivalAirport": "LAX",
  "departureAt": "2026-03-06T16:49:06.006Z",
  "arrivalAt": "2026-03-06T21:40:06.006Z",
  "durationMinutes": 291,
  "status": "cancelled",
  "priceFrom": 1040.05,
  "currency": "AUD",
  "createdAt": "2026-02-27T16:49:06.006Z"
}