example-data.com
Menu
Browse docs and collections

Overview

flights / #271

Jun
13
Sat

Southwest Airlines WN8906

5:56 PM – 7:40 PM

LHR → JFK

From AUD 2417.36

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 271,
  "flightNumber": "WN8906",
  "airline": "Southwest Airlines",
  "departureAirport": "LHR",
  "arrivalAirport": "JFK",
  "departureAt": "2026-06-13T17:56:03.255Z",
  "arrivalAt": "2026-06-13T19:40:03.255Z",
  "durationMinutes": 104,
  "status": "cancelled",
  "priceFrom": 2417.36,
  "currency": "AUD",
  "createdAt": "2026-05-15T17:56:03.255Z"
}