example-data.com
Menu
Browse docs and collections

Overview

flights / #66

Jun
22
Sun

Singapore Airlines SQ2720

11:29 PM – 6:43 AM

LAX → DXB

From USD 2255.20

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 66,
  "flightNumber": "SQ2720",
  "airline": "Singapore Airlines",
  "departureAirport": "LAX",
  "arrivalAirport": "DXB",
  "departureAt": "2025-06-22T23:29:36.112Z",
  "arrivalAt": "2025-06-23T06:43:36.112Z",
  "durationMinutes": 434,
  "status": "landed",
  "priceFrom": 2255.2,
  "currency": "USD",
  "createdAt": "2025-04-05T23:29:36.112Z"
}