example-data.com
Menu
Browse docs and collections

Overview

flights / #365

May
12
Tue

Air France AF9924

8:57 PM – 12:09 AM

JFK → DXB

From AED 1299.41

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 365,
  "flightNumber": "AF9924",
  "airline": "Air France",
  "departureAirport": "JFK",
  "arrivalAirport": "DXB",
  "departureAt": "2026-05-12T20:57:20.582Z",
  "arrivalAt": "2026-05-13T00:09:20.582Z",
  "durationMinutes": 192,
  "status": "boarding",
  "priceFrom": 1299.41,
  "currency": "AED",
  "createdAt": "2026-04-04T20:57:20.582Z"
}