example-data.com
Menu
Browse docs and collections

Overview

flights / #393

Feb
18
Wed

British Airways BA9971

6:36 AM – 5:47 PM

GRU → BCN

From AED 2382.81

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 393,
  "flightNumber": "BA9971",
  "airline": "British Airways",
  "departureAirport": "GRU",
  "arrivalAirport": "BCN",
  "departureAt": "2026-02-18T06:36:44.069Z",
  "arrivalAt": "2026-02-18T17:47:44.069Z",
  "durationMinutes": 671,
  "status": "cancelled",
  "priceFrom": 2382.81,
  "currency": "AED",
  "createdAt": "2025-11-24T06:36:44.069Z"
}