example-data.com
Menu
Browse docs and collections

flights

flights

Page 12 of 17.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/flights?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/flights?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/flights";

const res = await fetch(
  "https://example-data.com/api/v1/flights?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Flight>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/flights",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 265,
      "flightNumber": "UA663",
      "airline": "United Airlines",
      "departureAirport": "YYZ",
      "arrivalAirport": "FCO",
      "departureAt": "2026-10-10T13:04:55.153Z",
      "arrivalAt": "2026-10-11T03:02:55.153Z",
      "durationMinutes": 838,
      "status": "delayed",
      "priceFrom": 1232.7,
      "currency": "CAD",
      "createdAt": "2026-09-21T13:04:55.153Z"
    },
    {
      "id": 266,
      "flightNumber": "JL2998",
      "airline": "Japan Airlines",
      "departureAirport": "DXB",
      "arrivalAirport": "MEX",
      "departureAt": "2027-04-14T12:13:26.791Z",
      "arrivalAt": "2027-04-14T16:26:26.791Z",
      "durationMinutes": 253,
      "status": "landed",
      "priceFrom": 152.8,
      "currency": "USD",
      "createdAt": "2027-04-07T12:13:26.791Z"
    },
    {
      "id": 267,
      "flightNumber": "SQ7307",
      "airline": "Singapore Airlines",
      "departureAirport": "FCO",
      "arrivalAirport": "FRA",
      "departureAt": "2025-11-24T00:23:38.498Z",
      "arrivalAt": "2025-11-24T14:03:38.498Z",
      "durationMinutes": 820,
      "status": "in_air",
      "priceFrom": 843.22,
      "currency": "CAD",
      "createdAt": "2025-11-20T00:23:38.498Z"
    }
  ],
  "meta": {
    "page": 12,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=12&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=13&limit=24",
    "prev": "/api/v1/flights?page=11&limit=24"
  }
}