example-data.com
Menu
Browse docs and collections

Overview

flights / #368

Jan
18
Mon

Southwest Airlines WN2516

4:53 AM – 4:01 PM

ICN → YYZ

From AED 2282.68

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 368,
  "flightNumber": "WN2516",
  "airline": "Southwest Airlines",
  "departureAirport": "ICN",
  "arrivalAirport": "YYZ",
  "departureAt": "2027-01-18T04:53:13.310Z",
  "arrivalAt": "2027-01-18T16:01:13.310Z",
  "durationMinutes": 668,
  "status": "landed",
  "priceFrom": 2282.68,
  "currency": "AED",
  "createdAt": "2026-11-22T04:53:13.310Z"
}