example-data.com
Menu
Browse docs and collections

destinations

destinations

Page 3 of 4.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/destinations?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/destinations?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/destinations.d.ts https://example-data.com/types/destinations.d.ts
import type { Destination, ListEnvelope } from "./types/destinations";

const res = await fetch(
  "https://example-data.com/api/v1/destinations?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Destination>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/destinations",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 49,
      "name": "Sayreville",
      "slug": "sayreville-49",
      "countryAlpha2": "SA",
      "description": "Explore breathtaking landscapes, ancient history, and warm hospitality.",
      "imageUrl": "https://picsum.photos/seed/dest-49/800/600",
      "popularity": 85
    },
    {
      "id": 50,
      "name": "Hicksville",
      "slug": "hicksville-50",
      "countryAlpha2": "PL",
      "description": "Where history meets modernity, offering travelers an unparalleled urban adventure.",
      "imageUrl": "https://picsum.photos/seed/dest-50/800/600",
      "popularity": 31
    },
    {
      "id": 51,
      "name": "Ladariusburgh",
      "slug": "ladariusburgh-51",
      "countryAlpha2": "CA",
      "description": "Discover sun-drenched beaches, lush scenery, and unforgettable experiences.",
      "imageUrl": "https://picsum.photos/seed/dest-51/800/600",
      "popularity": 21
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 80,
    "totalPages": 4
  },
  "links": {
    "self": "/api/v1/destinations?page=3&limit=24",
    "first": "/api/v1/destinations?page=1&limit=24",
    "last": "/api/v1/destinations?page=4&limit=24",
    "next": "/api/v1/destinations?page=4&limit=24",
    "prev": "/api/v1/destinations?page=2&limit=24"
  }
}