example-data.com
Menu
Browse docs and collections

Overview

flights / #312

Aug
27
Wed

Southwest Airlines WN6880

12:38 AM – 9:54 AM

FCO → NRT

From AUD 2453.06

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 312,
  "flightNumber": "WN6880",
  "airline": "Southwest Airlines",
  "departureAirport": "FCO",
  "arrivalAirport": "NRT",
  "departureAt": "2025-08-27T00:38:59.627Z",
  "arrivalAt": "2025-08-27T09:54:59.627Z",
  "durationMinutes": 556,
  "status": "scheduled",
  "priceFrom": 2453.06,
  "currency": "AUD",
  "createdAt": "2025-07-30T00:38:59.627Z"
}