example-data.com
Menu
Browse docs and collections

Overview

flights / #208

Nov
9
Sun

Singapore Airlines SQ1057

9:49 PM – 5:03 AM

JFK → BCN

From EUR 2113.87

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 208,
  "flightNumber": "SQ1057",
  "airline": "Singapore Airlines",
  "departureAirport": "JFK",
  "arrivalAirport": "BCN",
  "departureAt": "2025-11-09T21:49:18.133Z",
  "arrivalAt": "2025-11-10T05:03:18.133Z",
  "durationMinutes": 434,
  "status": "boarding",
  "priceFrom": 2113.87,
  "currency": "EUR",
  "createdAt": "2025-08-19T21:49:18.133Z"
}