example-data.com
Menu
Browse docs and collections

flights

flights

Page 2 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": 25,
      "flightNumber": "SQ2252",
      "airline": "Singapore Airlines",
      "departureAirport": "YYZ",
      "arrivalAirport": "DFW",
      "departureAt": "2026-02-21T06:22:51.031Z",
      "arrivalAt": "2026-02-21T09:10:51.031Z",
      "durationMinutes": 168,
      "status": "in_air",
      "priceFrom": 984.11,
      "currency": "CAD",
      "createdAt": "2026-01-06T06:22:51.031Z"
    },
    {
      "id": 26,
      "flightNumber": "LH5022",
      "airline": "Lufthansa",
      "departureAirport": "LHR",
      "arrivalAirport": "ORD",
      "departureAt": "2026-04-23T15:15:31.779Z",
      "arrivalAt": "2026-04-23T19:01:31.779Z",
      "durationMinutes": 226,
      "status": "delayed",
      "priceFrom": 763.85,
      "currency": "GBP",
      "createdAt": "2026-02-20T15:15:31.779Z"
    },
    {
      "id": 27,
      "flightNumber": "AA5542",
      "airline": "American Airlines",
      "departureAirport": "GRU",
      "arrivalAirport": "ATL",
      "departureAt": "2026-06-16T15:40:27.086Z",
      "arrivalAt": "2026-06-16T17:36:27.086Z",
      "durationMinutes": 116,
      "status": "delayed",
      "priceFrom": 287.16,
      "currency": "CAD",
      "createdAt": "2026-05-20T15:40:27.086Z"
    }
  ],
  "meta": {
    "page": 2,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=2&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=3&limit=24",
    "prev": "/api/v1/flights?page=1&limit=24"
  }
}