example-data.com
Menu
Browse docs and collections

Overview

flights / #135

Sep
23
Tue

Singapore Airlines SQ7186

6:42 PM – 6:59 AM

DFW → ICN

From SGD 1413.29

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 135,
  "flightNumber": "SQ7186",
  "airline": "Singapore Airlines",
  "departureAirport": "DFW",
  "arrivalAirport": "ICN",
  "departureAt": "2025-09-23T18:42:06.029Z",
  "arrivalAt": "2025-09-24T06:59:06.029Z",
  "durationMinutes": 737,
  "status": "scheduled",
  "priceFrom": 1413.29,
  "currency": "SGD",
  "createdAt": "2025-09-17T18:42:06.029Z"
}