example-data.com
Menu
Browse docs and collections

Overview

flights / #290

Nov
21
Fri

Singapore Airlines SQ6422

6:41 PM – 5:49 AM

BCN → ORD

From EUR 1153.87

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 290,
  "flightNumber": "SQ6422",
  "airline": "Singapore Airlines",
  "departureAirport": "BCN",
  "arrivalAirport": "ORD",
  "departureAt": "2025-11-21T18:41:33.826Z",
  "arrivalAt": "2025-11-22T05:49:33.826Z",
  "durationMinutes": 668,
  "status": "landed",
  "priceFrom": 1153.87,
  "currency": "EUR",
  "createdAt": "2025-10-04T18:41:33.826Z"
}