example-data.com
Menu
Browse docs and collections

Overview

flights / #183

May
31
Sun

Air France AF2497

6:59 PM – 2:46 AM

LAX → YYZ

From EUR 2051.05

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 183,
  "flightNumber": "AF2497",
  "airline": "Air France",
  "departureAirport": "LAX",
  "arrivalAirport": "YYZ",
  "departureAt": "2026-05-31T18:59:57.488Z",
  "arrivalAt": "2026-06-01T02:46:57.488Z",
  "durationMinutes": 467,
  "status": "scheduled",
  "priceFrom": 2051.05,
  "currency": "EUR",
  "createdAt": "2026-03-17T18:59:57.488Z"
}