example-data.com
Menu
Browse docs and collections

Overview

flights / #106

Mar
12
Fri

Emirates EK4469

6:45 PM – 9:16 AM

LHR → MEX

From CAD 1442.63

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 106,
  "flightNumber": "EK4469",
  "airline": "Emirates",
  "departureAirport": "LHR",
  "arrivalAirport": "MEX",
  "departureAt": "2027-03-12T18:45:02.919Z",
  "arrivalAt": "2027-03-13T09:16:02.919Z",
  "durationMinutes": 871,
  "status": "scheduled",
  "priceFrom": 1442.63,
  "currency": "CAD",
  "createdAt": "2027-01-12T18:45:02.919Z"
}