example-data.com
Menu
Browse docs and collections

Overview

flights / #240

Jul
26
Sat

Singapore Airlines SQ1751

4:39 AM – 11:28 AM

GRU → CDG

From EUR 2018.81

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 240,
  "flightNumber": "SQ1751",
  "airline": "Singapore Airlines",
  "departureAirport": "GRU",
  "arrivalAirport": "CDG",
  "departureAt": "2025-07-26T04:39:09.074Z",
  "arrivalAt": "2025-07-26T11:28:09.074Z",
  "durationMinutes": 409,
  "status": "scheduled",
  "priceFrom": 2018.81,
  "currency": "EUR",
  "createdAt": "2025-07-02T04:39:09.074Z"
}