example-data.com
Menu
Browse docs and collections

Overview

flights / #310

May
8
Fri

Japan Airlines JL5281

2:30 PM – 12:42 AM

LAX → JFK

From JPY 1221.32

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 310,
  "flightNumber": "JL5281",
  "airline": "Japan Airlines",
  "departureAirport": "LAX",
  "arrivalAirport": "JFK",
  "departureAt": "2026-05-08T14:30:26.925Z",
  "arrivalAt": "2026-05-09T00:42:26.925Z",
  "durationMinutes": 612,
  "status": "landed",
  "priceFrom": 1221.32,
  "currency": "JPY",
  "createdAt": "2026-04-09T14:30:26.925Z"
}