example-data.com
Menu
Browse docs and collections

Overview

flights / #232

Jun
4
Thu

Southwest Airlines WN8724

7:52 PM – 6:59 AM

JFK → AMS

From GBP 1319.04

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 232,
  "flightNumber": "WN8724",
  "airline": "Southwest Airlines",
  "departureAirport": "JFK",
  "arrivalAirport": "AMS",
  "departureAt": "2026-06-04T19:52:14.462Z",
  "arrivalAt": "2026-06-05T06:59:14.462Z",
  "durationMinutes": 667,
  "status": "cancelled",
  "priceFrom": 1319.04,
  "currency": "GBP",
  "createdAt": "2026-04-05T19:52:14.462Z"
}