example-data.com
Menu
Browse docs and collections

Overview

flights / #20

Jul
16
Wed

Singapore Airlines SQ9250

10:11 PM – 12:28 AM

LHR → DFW

From EUR 335.03

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 20,
  "flightNumber": "SQ9250",
  "airline": "Singapore Airlines",
  "departureAirport": "LHR",
  "arrivalAirport": "DFW",
  "departureAt": "2025-07-16T22:11:20.035Z",
  "arrivalAt": "2025-07-17T00:28:20.035Z",
  "durationMinutes": 137,
  "status": "boarding",
  "priceFrom": 335.03,
  "currency": "EUR",
  "createdAt": "2025-07-02T22:11:20.035Z"
}