example-data.com
Menu
Browse docs and collections

Overview

flights / #112

Feb
10
Wed

Air France AF5037

1:46 AM – 1:41 PM

FCO → FRA

From AUD 1234.78

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 112,
  "flightNumber": "AF5037",
  "airline": "Air France",
  "departureAirport": "FCO",
  "arrivalAirport": "FRA",
  "departureAt": "2027-02-10T01:46:01.417Z",
  "arrivalAt": "2027-02-10T13:41:01.417Z",
  "durationMinutes": 715,
  "status": "boarding",
  "priceFrom": 1234.78,
  "currency": "AUD",
  "createdAt": "2026-12-16T01:46:01.417Z"
}