example-data.com
Menu
Browse docs and collections

Overview

flights / #377

Mar
16
Mon

Emirates EK8477

9:09 PM – 5:48 AM

ORD → BCN

From AUD 548.82

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 377,
  "flightNumber": "EK8477",
  "airline": "Emirates",
  "departureAirport": "ORD",
  "arrivalAirport": "BCN",
  "departureAt": "2026-03-16T21:09:11.979Z",
  "arrivalAt": "2026-03-17T05:48:11.979Z",
  "durationMinutes": 519,
  "status": "cancelled",
  "priceFrom": 548.82,
  "currency": "AUD",
  "createdAt": "2026-03-05T21:09:11.979Z"
}