example-data.com
Menu
Browse docs and collections

Overview

flights / #201

Jan
31
Sun

Delta Air Lines DL5184

10:56 AM – 7:08 PM

AMS → YYZ

From JPY 1657.95

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 201,
  "flightNumber": "DL5184",
  "airline": "Delta Air Lines",
  "departureAirport": "AMS",
  "arrivalAirport": "YYZ",
  "departureAt": "2027-01-31T10:56:23.231Z",
  "arrivalAt": "2027-01-31T19:08:23.231Z",
  "durationMinutes": 492,
  "status": "delayed",
  "priceFrom": 1657.95,
  "currency": "JPY",
  "createdAt": "2026-12-08T10:56:23.231Z"
}