example-data.com
Menu
Browse docs and collections

Overview

flights / #21

Jul
8
Wed

Southwest Airlines WN4971

2:33 AM – 7:45 AM

BCN → JFK

From SGD 2475.33

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 21,
  "flightNumber": "WN4971",
  "airline": "Southwest Airlines",
  "departureAirport": "BCN",
  "arrivalAirport": "JFK",
  "departureAt": "2026-07-08T02:33:12.870Z",
  "arrivalAt": "2026-07-08T07:45:12.870Z",
  "durationMinutes": 312,
  "status": "delayed",
  "priceFrom": 2475.33,
  "currency": "SGD",
  "createdAt": "2026-06-17T02:33:12.870Z"
}