example-data.com
Menu
Browse docs and collections

flights

flights

Page 10 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": 217,
      "flightNumber": "BA5021",
      "airline": "British Airways",
      "departureAirport": "ATL",
      "arrivalAirport": "LHR",
      "departureAt": "2027-05-02T03:41:54.165Z",
      "arrivalAt": "2027-05-02T14:55:54.165Z",
      "durationMinutes": 674,
      "status": "cancelled",
      "priceFrom": 55.33,
      "currency": "SGD",
      "createdAt": "2027-04-29T03:41:54.165Z"
    },
    {
      "id": 218,
      "flightNumber": "JL8998",
      "airline": "Japan Airlines",
      "departureAirport": "FRA",
      "arrivalAirport": "CDG",
      "departureAt": "2025-06-12T05:57:22.052Z",
      "arrivalAt": "2025-06-12T19:19:22.052Z",
      "durationMinutes": 802,
      "status": "scheduled",
      "priceFrom": 2322.28,
      "currency": "JPY",
      "createdAt": "2025-03-24T05:57:22.052Z"
    },
    {
      "id": 219,
      "flightNumber": "BA3389",
      "airline": "British Airways",
      "departureAirport": "FRA",
      "arrivalAirport": "LHR",
      "departureAt": "2027-02-11T17:11:18.331Z",
      "arrivalAt": "2027-02-11T23:05:18.331Z",
      "durationMinutes": 354,
      "status": "delayed",
      "priceFrom": 1073.66,
      "currency": "CAD",
      "createdAt": "2026-12-24T17:11:18.331Z"
    }
  ],
  "meta": {
    "page": 10,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=10&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=11&limit=24",
    "prev": "/api/v1/flights?page=9&limit=24"
  }
}