example-data.com
Menu
Browse docs and collections

Overview

flights / #37

May
5
Tue

Southwest Airlines WN7238

10:49 AM – 6:21 PM

YYZ → ICN

From SGD 1808.78

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 37,
  "flightNumber": "WN7238",
  "airline": "Southwest Airlines",
  "departureAirport": "YYZ",
  "arrivalAirport": "ICN",
  "departureAt": "2026-05-05T10:49:50.801Z",
  "arrivalAt": "2026-05-05T18:21:50.801Z",
  "durationMinutes": 452,
  "status": "boarding",
  "priceFrom": 1808.78,
  "currency": "SGD",
  "createdAt": "2026-03-16T10:49:50.801Z"
}