example-data.com
Menu
Browse docs and collections

Overview

hotels / #89

Our Hotel Laylatown

hotel · Laylatown · $623.88+/night · ★ 4.9 (3465)

4021 Rene Union

gymbeach-accessspa

Component variants

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/hotels/89" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/hotels/89"
);
const hotel = 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 } from "./types/hotels";

const res = await fetch(
  "https://example-data.com/api/v1/hotels/89"
);
const hotel = (await res.json()) as Hotel;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/hotels/89"
)
hotel = res.json()

Response

{
  "id": 89,
  "name": "Our Hotel Laylatown",
  "slug": "our-hotel-laylatown-89",
  "brand": "Best Western",
  "countryAlpha2": "ZA",
  "city": "Laylatown",
  "address": "4021 Rene Union",
  "latitude": 28.909866,
  "longitude": 135.823434,
  "starRating": 3,
  "rating": 4.9,
  "ratingCount": 3465,
  "priceFromPerNight": 623.88,
  "currency": "CAD",
  "amenities": [
    "gym",
    "beach-access",
    "spa"
  ],
  "createdAt": "2025-03-10T19:03:59.072Z"
}