example-data.com
Menu
Browse docs and collections

Overview

flights / #308

Jul
25
Fri

Singapore Airlines SQ3876

3:55 PM – 4:52 AM

ATL → FRA

From AED 456.08

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 308,
  "flightNumber": "SQ3876",
  "airline": "Singapore Airlines",
  "departureAirport": "ATL",
  "arrivalAirport": "FRA",
  "departureAt": "2025-07-25T15:55:20.669Z",
  "arrivalAt": "2025-07-26T04:52:20.669Z",
  "durationMinutes": 777,
  "status": "scheduled",
  "priceFrom": 456.08,
  "currency": "AED",
  "createdAt": "2025-06-23T15:55:20.669Z"
}