example-data.com
Menu
Browse docs and collections

Overview

flights / #107

Apr
26
Sun

Singapore Airlines SQ1943

3:56 PM – 3:48 AM

YYZ → FRA

From SGD 872.70

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 107,
  "flightNumber": "SQ1943",
  "airline": "Singapore Airlines",
  "departureAirport": "YYZ",
  "arrivalAirport": "FRA",
  "departureAt": "2026-04-26T15:56:41.443Z",
  "arrivalAt": "2026-04-27T03:48:41.443Z",
  "durationMinutes": 712,
  "status": "cancelled",
  "priceFrom": 872.7,
  "currency": "SGD",
  "createdAt": "2026-01-26T15:56:41.443Z"
}