example-data.com
Menu
Browse docs and collections

hotels

hotels

Page 6 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": 121,
      "name": "Petty Resort Coon Rapids",
      "slug": "petty-resort-coon-rapids-121",
      "brand": null,
      "countryAlpha2": "CA",
      "city": "Coon Rapids",
      "address": "3127 Brookside",
      "latitude": -28.482851,
      "longitude": -69.053214,
      "starRating": 3,
      "rating": 2.7,
      "ratingCount": 890,
      "priceFromPerNight": 1729.46,
      "currency": "THB",
      "amenities": [
        "concierge",
        "beach-access",
        "business-center",
        "gym",
        "bar",
        "pet-friendly"
      ],
      "createdAt": "2025-05-13T08:44:04.596Z"
    },
    {
      "id": 122,
      "name": "Surprised Palace Port Karenchester",
      "slug": "surprised-palace-port-karenchester-122",
      "brand": "Accor",
      "countryAlpha2": "AR",
      "city": "Port Karenchester",
      "address": "5749 Barn Close",
      "latitude": -21.166604,
      "longitude": -3.954863,
      "starRating": 4,
      "rating": 4.5,
      "ratingCount": 4319,
      "priceFromPerNight": 779.43,
      "currency": "USD",
      "amenities": [
        "room-service",
        "casino"
      ],
      "createdAt": "2025-04-12T19:34:52.844Z"
    },
    {
      "id": 123,
      "name": "True Inn Charleschester",
      "slug": "true-inn-charleschester-123",
      "brand": "IHG",
      "countryAlpha2": "FI",
      "city": "Charleschester",
      "address": "59082 Marilyne Ford",
      "latitude": 45.360578,
      "longitude": -81.298293,
      "starRating": 5,
      "rating": 3.2,
      "ratingCount": 1405,
      "priceFromPerNight": 1522.18,
      "currency": "JPY",
      "amenities": [
        "business-center",
        "parking"
      ],
      "createdAt": "2025-11-20T06:33:23.185Z"
    }
  ],
  "meta": {
    "page": 6,
    "limit": 24,
    "total": 150,
    "totalPages": 7
  },
  "links": {
    "self": "/api/v1/hotels?page=6&limit=24",
    "first": "/api/v1/hotels?page=1&limit=24",
    "last": "/api/v1/hotels?page=7&limit=24",
    "next": "/api/v1/hotels?page=7&limit=24",
    "prev": "/api/v1/hotels?page=5&limit=24"
  }
}