example-data.com
Menu
Browse docs and collections

Overview

flights / #203

Jan
3
Sun

Southwest Airlines WN1081

10:40 PM – 5:50 AM

SIN → LAX

From USD 1306.55

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 203,
  "flightNumber": "WN1081",
  "airline": "Southwest Airlines",
  "departureAirport": "SIN",
  "arrivalAirport": "LAX",
  "departureAt": "2027-01-03T22:40:04.667Z",
  "arrivalAt": "2027-01-04T05:50:04.667Z",
  "durationMinutes": 430,
  "status": "cancelled",
  "priceFrom": 1306.55,
  "currency": "USD",
  "createdAt": "2026-12-22T22:40:04.667Z"
}