example-data.com
Menu
Browse docs and collections

Overview

flights / #354

Aug
20
Wed

Singapore Airlines SQ4656

9:34 AM – 3:01 PM

NRT → BCN

From AUD 1741.32

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 354,
  "flightNumber": "SQ4656",
  "airline": "Singapore Airlines",
  "departureAirport": "NRT",
  "arrivalAirport": "BCN",
  "departureAt": "2025-08-20T09:34:54.205Z",
  "arrivalAt": "2025-08-20T15:01:54.205Z",
  "durationMinutes": 327,
  "status": "boarding",
  "priceFrom": 1741.32,
  "currency": "AUD",
  "createdAt": "2025-05-29T09:34:54.205Z"
}