example-data.com
Menu
Browse docs and collections

Overview

flights / #74

Mar
10
Tue

Singapore Airlines SQ2013

3:14 PM – 9:28 PM

JFK → YYZ

From AED 2227.62

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 74,
  "flightNumber": "SQ2013",
  "airline": "Singapore Airlines",
  "departureAirport": "JFK",
  "arrivalAirport": "YYZ",
  "departureAt": "2026-03-10T15:14:47.182Z",
  "arrivalAt": "2026-03-10T21:28:47.182Z",
  "durationMinutes": 374,
  "status": "landed",
  "priceFrom": 2227.62,
  "currency": "AED",
  "createdAt": "2026-03-09T15:14:47.182Z"
}