example-data.com
Menu
Browse docs and collections

Overview

flights / #171

Nov
27
Thu

British Airways BA8148

5:55 PM – 12:48 AM

DFW → ICN

From GBP 1136.51

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 171,
  "flightNumber": "BA8148",
  "airline": "British Airways",
  "departureAirport": "DFW",
  "arrivalAirport": "ICN",
  "departureAt": "2025-11-27T17:55:58.938Z",
  "arrivalAt": "2025-11-28T00:48:58.938Z",
  "durationMinutes": 413,
  "status": "boarding",
  "priceFrom": 1136.51,
  "currency": "GBP",
  "createdAt": "2025-10-23T17:55:58.938Z"
}