example-data.com
Menu
Browse docs and collections

Overview

flights / #141

Jul
29
Wed

Singapore Airlines SQ1140

8:02 PM – 5:42 AM

JFK → ATL

From SGD 763.81

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 141,
  "flightNumber": "SQ1140",
  "airline": "Singapore Airlines",
  "departureAirport": "JFK",
  "arrivalAirport": "ATL",
  "departureAt": "2026-07-29T20:02:04.794Z",
  "arrivalAt": "2026-07-30T05:42:04.794Z",
  "durationMinutes": 580,
  "status": "cancelled",
  "priceFrom": 763.81,
  "currency": "SGD",
  "createdAt": "2026-05-06T20:02:04.794Z"
}