example-data.com
Menu
Browse docs and collections

Overview

flights / #95

Feb
2
Tue

Southwest Airlines WN4274

4:39 PM – 9:11 PM

FCO → DFW

From GBP 735.78

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 95,
  "flightNumber": "WN4274",
  "airline": "Southwest Airlines",
  "departureAirport": "FCO",
  "arrivalAirport": "DFW",
  "departureAt": "2027-02-02T16:39:52.730Z",
  "arrivalAt": "2027-02-02T21:11:52.730Z",
  "durationMinutes": 272,
  "status": "scheduled",
  "priceFrom": 735.78,
  "currency": "GBP",
  "createdAt": "2026-11-18T16:39:52.730Z"
}