example-data.com
Menu
Browse docs and collections

Overview

flights / #41

Jul
26
Sat

Southwest Airlines WN7157

8:12 AM – 8:42 PM

ICN → YYZ

From SGD 1763.72

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 41,
  "flightNumber": "WN7157",
  "airline": "Southwest Airlines",
  "departureAirport": "ICN",
  "arrivalAirport": "YYZ",
  "departureAt": "2025-07-26T08:12:10.197Z",
  "arrivalAt": "2025-07-26T20:42:10.197Z",
  "durationMinutes": 750,
  "status": "landed",
  "priceFrom": 1763.72,
  "currency": "SGD",
  "createdAt": "2025-07-09T08:12:10.197Z"
}