example-data.com
Menu
Browse docs and collections

Overview

flights / #324

Jun
9
Mon

Delta Air Lines DL7856

4:39 AM – 11:44 AM

ATL → CDG

From GBP 631.62

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 324,
  "flightNumber": "DL7856",
  "airline": "Delta Air Lines",
  "departureAirport": "ATL",
  "arrivalAirport": "CDG",
  "departureAt": "2025-06-09T04:39:46.108Z",
  "arrivalAt": "2025-06-09T11:44:46.108Z",
  "durationMinutes": 425,
  "status": "scheduled",
  "priceFrom": 631.62,
  "currency": "GBP",
  "createdAt": "2025-03-21T04:39:46.108Z"
}