example-data.com
Menu
Browse docs and collections

hotels

hotels

Page 3 of 7.

Overview

Request

curl example

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

JavaScript example

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

TypeScript example

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

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

Python example

import requests

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

Response

{
  "data": [
    {
      "id": 49,
      "name": "Deserted Resort Greensboro",
      "slug": "deserted-resort-greensboro-49",
      "brand": "Four Seasons",
      "countryAlpha2": "SA",
      "city": "Greensboro",
      "address": "3522 Dee Forest",
      "latitude": -4.804296,
      "longitude": 90.253156,
      "starRating": 2,
      "rating": 3,
      "ratingCount": 645,
      "priceFromPerNight": 1150.15,
      "currency": "AUD",
      "amenities": [
        "bar",
        "laundry",
        "casino"
      ],
      "createdAt": "2025-07-14T00:21:35.478Z"
    },
    {
      "id": 50,
      "name": "Worst Palace South Buckberg",
      "slug": "worst-palace-south-buckberg-50",
      "brand": null,
      "countryAlpha2": "MX",
      "city": "South Buckberg",
      "address": "76006 Conroy Land",
      "latitude": -52.736824,
      "longitude": -141.516199,
      "starRating": 3,
      "rating": 3.2,
      "ratingCount": 1842,
      "priceFromPerNight": 1352.98,
      "currency": "AUD",
      "amenities": [
        "pet-friendly",
        "parking",
        "beach-access",
        "gym",
        "laundry",
        "business-center",
        "wifi",
        "spa"
      ],
      "createdAt": "2024-09-24T16:59:07.468Z"
    },
    {
      "id": 51,
      "name": "Immense Hotel Port Antwon",
      "slug": "immense-hotel-port-antwon-51",
      "brand": "Wyndham",
      "countryAlpha2": "CL",
      "city": "Port Antwon",
      "address": "181 Orchard Road",
      "latitude": 41.047822,
      "longitude": -106.395747,
      "starRating": 2,
      "rating": 4,
      "ratingCount": 1694,
      "priceFromPerNight": 1854.66,
      "currency": "USD",
      "amenities": [
        "pet-friendly",
        "business-center",
        "wifi",
        "pool"
      ],
      "createdAt": "2024-10-15T09:03:13.404Z"
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 150,
    "totalPages": 7
  },
  "links": {
    "self": "/api/v1/hotels?page=3&limit=24",
    "first": "/api/v1/hotels?page=1&limit=24",
    "last": "/api/v1/hotels?page=7&limit=24",
    "next": "/api/v1/hotels?page=4&limit=24",
    "prev": "/api/v1/hotels?page=2&limit=24"
  }
}