example-data.com
Menu
Browse docs and collections

Overview

flights / #1

May
22
Thu

Air France AF1294

11:23 AM – 3:37 PM

MAD → ICN

From USD 772.03

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 1,
  "flightNumber": "AF1294",
  "airline": "Air France",
  "departureAirport": "MAD",
  "arrivalAirport": "ICN",
  "departureAt": "2025-05-22T11:23:57.954Z",
  "arrivalAt": "2025-05-22T15:37:57.954Z",
  "durationMinutes": 254,
  "status": "in_air",
  "priceFrom": 772.03,
  "currency": "USD",
  "createdAt": "2025-02-23T11:23:57.954Z"
}