example-data.com
Menu
Browse docs and collections

flights

flights

Page 16 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": 361,
      "flightNumber": "AF3420",
      "airline": "Air France",
      "departureAirport": "LAX",
      "arrivalAirport": "CDG",
      "departureAt": "2025-09-15T11:47:49.976Z",
      "arrivalAt": "2025-09-15T20:01:49.976Z",
      "durationMinutes": 494,
      "status": "landed",
      "priceFrom": 1332.23,
      "currency": "AED",
      "createdAt": "2025-08-21T11:47:49.976Z"
    },
    {
      "id": 362,
      "flightNumber": "UA6064",
      "airline": "United Airlines",
      "departureAirport": "LHR",
      "arrivalAirport": "MAD",
      "departureAt": "2025-10-27T05:34:44.276Z",
      "arrivalAt": "2025-10-27T13:27:44.276Z",
      "durationMinutes": 473,
      "status": "in_air",
      "priceFrom": 600.53,
      "currency": "AED",
      "createdAt": "2025-10-22T05:34:44.276Z"
    },
    {
      "id": 363,
      "flightNumber": "LH7106",
      "airline": "Lufthansa",
      "departureAirport": "MAD",
      "arrivalAirport": "ICN",
      "departureAt": "2026-04-04T03:40:27.234Z",
      "arrivalAt": "2026-04-04T18:07:27.234Z",
      "durationMinutes": 867,
      "status": "scheduled",
      "priceFrom": 679.95,
      "currency": "AUD",
      "createdAt": "2026-02-15T03:40:27.234Z"
    }
  ],
  "meta": {
    "page": 16,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=16&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=17&limit=24",
    "prev": "/api/v1/flights?page=15&limit=24"
  }
}