example-data.com
Menu
Browse docs and collections

Overview

flights / #15

Aug
12
Tue

Singapore Airlines SQ1041

2:13 PM – 10:41 PM

DXB → AMS

From GBP 1797.73

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 15,
  "flightNumber": "SQ1041",
  "airline": "Singapore Airlines",
  "departureAirport": "DXB",
  "arrivalAirport": "AMS",
  "departureAt": "2025-08-12T14:13:23.343Z",
  "arrivalAt": "2025-08-12T22:41:23.343Z",
  "durationMinutes": 508,
  "status": "delayed",
  "priceFrom": 1797.73,
  "currency": "GBP",
  "createdAt": "2025-05-24T14:13:23.343Z"
}