example-data.com
Menu
Browse docs and collections

Overview

flights / #397

May
23
Sat

Delta Air Lines DL4008

2:05 AM – 4:35 PM

ORD → SYD

From GBP 2005.63

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 397,
  "flightNumber": "DL4008",
  "airline": "Delta Air Lines",
  "departureAirport": "ORD",
  "arrivalAirport": "SYD",
  "departureAt": "2026-05-23T02:05:14.940Z",
  "arrivalAt": "2026-05-23T16:35:14.940Z",
  "durationMinutes": 870,
  "status": "landed",
  "priceFrom": 2005.63,
  "currency": "GBP",
  "createdAt": "2026-04-07T02:05:14.940Z"
}