example-data.com
Menu
Browse docs and collections

Overview

flights / #337

Jul
20
Sun

Delta Air Lines DL3284

2:45 PM – 12:42 AM

NRT → CDG

From GBP 2301.18

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 337,
  "flightNumber": "DL3284",
  "airline": "Delta Air Lines",
  "departureAirport": "NRT",
  "arrivalAirport": "CDG",
  "departureAt": "2025-07-20T14:45:43.150Z",
  "arrivalAt": "2025-07-21T00:42:43.150Z",
  "durationMinutes": 597,
  "status": "in_air",
  "priceFrom": 2301.18,
  "currency": "GBP",
  "createdAt": "2025-04-27T14:45:43.150Z"
}