example-data.com
Menu
Browse docs and collections

flights

flights

Page 8 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": 169,
      "flightNumber": "AF5684",
      "airline": "Air France",
      "departureAirport": "FRA",
      "arrivalAirport": "MAD",
      "departureAt": "2025-12-30T18:50:40.204Z",
      "arrivalAt": "2025-12-31T03:29:40.204Z",
      "durationMinutes": 519,
      "status": "cancelled",
      "priceFrom": 634.34,
      "currency": "CAD",
      "createdAt": "2025-11-27T18:50:40.204Z"
    },
    {
      "id": 170,
      "flightNumber": "LH6594",
      "airline": "Lufthansa",
      "departureAirport": "FRA",
      "arrivalAirport": "FCO",
      "departureAt": "2025-10-25T08:11:41.693Z",
      "arrivalAt": "2025-10-25T11:09:41.693Z",
      "durationMinutes": 178,
      "status": "boarding",
      "priceFrom": 933.3,
      "currency": "JPY",
      "createdAt": "2025-09-22T08:11:41.693Z"
    },
    {
      "id": 171,
      "flightNumber": "BA8148",
      "airline": "British Airways",
      "departureAirport": "DFW",
      "arrivalAirport": "ICN",
      "departureAt": "2025-11-27T17:55:58.938Z",
      "arrivalAt": "2025-11-28T00:48:58.938Z",
      "durationMinutes": 413,
      "status": "boarding",
      "priceFrom": 1136.51,
      "currency": "GBP",
      "createdAt": "2025-10-23T17:55:58.938Z"
    }
  ],
  "meta": {
    "page": 8,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=8&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=9&limit=24",
    "prev": "/api/v1/flights?page=7&limit=24"
  }
}