example-data.com
Menu
Browse docs and collections

Overview

flights / #120

Jul
31
Thu

Singapore Airlines SQ9779

5:19 PM – 1:57 AM

FCO → SIN

From SGD 1039.41

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 120,
  "flightNumber": "SQ9779",
  "airline": "Singapore Airlines",
  "departureAirport": "FCO",
  "arrivalAirport": "SIN",
  "departureAt": "2025-07-31T17:19:28.854Z",
  "arrivalAt": "2025-08-01T01:57:28.854Z",
  "durationMinutes": 518,
  "status": "boarding",
  "priceFrom": 1039.41,
  "currency": "SGD",
  "createdAt": "2025-06-27T17:19:28.854Z"
}