example-data.com
Menu
Browse docs and collections

Overview

flights / #177

Feb
22
Sun

Singapore Airlines SQ2243

1:32 AM – 9:13 AM

BCN → YYZ

From USD 431.04

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 177,
  "flightNumber": "SQ2243",
  "airline": "Singapore Airlines",
  "departureAirport": "BCN",
  "arrivalAirport": "YYZ",
  "departureAt": "2026-02-22T01:32:35.775Z",
  "arrivalAt": "2026-02-22T09:13:35.775Z",
  "durationMinutes": 461,
  "status": "boarding",
  "priceFrom": 431.04,
  "currency": "USD",
  "createdAt": "2025-12-07T01:32:35.775Z"
}