example-data.com
Menu
Browse docs and collections

Overview

flights / #242

Jun
8
Sun

Emirates EK8888

10:12 AM – 9:56 PM

DFW → GRU

From AUD 1018.21

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 242,
  "flightNumber": "EK8888",
  "airline": "Emirates",
  "departureAirport": "DFW",
  "arrivalAirport": "GRU",
  "departureAt": "2025-06-08T10:12:00.124Z",
  "arrivalAt": "2025-06-08T21:56:00.124Z",
  "durationMinutes": 704,
  "status": "landed",
  "priceFrom": 1018.21,
  "currency": "AUD",
  "createdAt": "2025-06-02T10:12:00.124Z"
}