example-data.com
Menu
Browse docs and collections

Overview

flights / #25

Feb
21
Sat

Singapore Airlines SQ2252

6:22 AM – 9:10 AM

YYZ → DFW

From CAD 984.11

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 25,
  "flightNumber": "SQ2252",
  "airline": "Singapore Airlines",
  "departureAirport": "YYZ",
  "arrivalAirport": "DFW",
  "departureAt": "2026-02-21T06:22:51.031Z",
  "arrivalAt": "2026-02-21T09:10:51.031Z",
  "durationMinutes": 168,
  "status": "in_air",
  "priceFrom": 984.11,
  "currency": "CAD",
  "createdAt": "2026-01-06T06:22:51.031Z"
}