example-data.com
Menu
Browse docs and collections

flights

flights

Page 5 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": 97,
      "flightNumber": "JL8956",
      "airline": "Japan Airlines",
      "departureAirport": "LHR",
      "arrivalAirport": "NRT",
      "departureAt": "2025-08-08T18:11:15.003Z",
      "arrivalAt": "2025-08-09T08:22:15.003Z",
      "durationMinutes": 851,
      "status": "scheduled",
      "priceFrom": 2457.59,
      "currency": "GBP",
      "createdAt": "2025-07-08T18:11:15.003Z"
    },
    {
      "id": 98,
      "flightNumber": "DL9502",
      "airline": "Delta Air Lines",
      "departureAirport": "LAX",
      "arrivalAirport": "MAD",
      "departureAt": "2027-05-15T15:25:10.263Z",
      "arrivalAt": "2027-05-16T00:43:10.263Z",
      "durationMinutes": 558,
      "status": "landed",
      "priceFrom": 789.93,
      "currency": "SGD",
      "createdAt": "2027-04-11T15:25:10.263Z"
    },
    {
      "id": 99,
      "flightNumber": "WN1777",
      "airline": "Southwest Airlines",
      "departureAirport": "LAX",
      "arrivalAirport": "MEX",
      "departureAt": "2027-01-05T10:30:42.298Z",
      "arrivalAt": "2027-01-05T21:54:42.298Z",
      "durationMinutes": 684,
      "status": "boarding",
      "priceFrom": 2487.93,
      "currency": "AUD",
      "createdAt": "2026-11-29T10:30:42.298Z"
    }
  ],
  "meta": {
    "page": 5,
    "limit": 24,
    "total": 400,
    "totalPages": 17
  },
  "links": {
    "self": "/api/v1/flights?page=5&limit=24",
    "first": "/api/v1/flights?page=1&limit=24",
    "last": "/api/v1/flights?page=17&limit=24",
    "next": "/api/v1/flights?page=6&limit=24",
    "prev": "/api/v1/flights?page=4&limit=24"
  }
}