example-data.com
Menu
Browse docs and collections

Overview

flights / #45

Dec
8
Mon

Singapore Airlines SQ7398

1:29 PM – 2:25 AM

LAX → ORD

From JPY 1742.80

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 45,
  "flightNumber": "SQ7398",
  "airline": "Singapore Airlines",
  "departureAirport": "LAX",
  "arrivalAirport": "ORD",
  "departureAt": "2025-12-08T13:29:15.190Z",
  "arrivalAt": "2025-12-09T02:25:15.190Z",
  "durationMinutes": 776,
  "status": "in_air",
  "priceFrom": 1742.8,
  "currency": "JPY",
  "createdAt": "2025-10-31T13:29:15.190Z"
}