example-data.com
Menu
Browse docs and collections

Overview

hotels / #149

Knowledgeable Hotel West Gerard

hotel · West Gerard · $1120.77+/night · ★ 3.5 (1297)

99585 Durgan Knolls

room-serviceparking

Component variants

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/hotels/149"
);
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/149"
);
const hotel = (await res.json()) as Hotel;

Python example

import requests

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

Response

{
  "id": 149,
  "name": "Knowledgeable Hotel West Gerard",
  "slug": "knowledgeable-hotel-west-gerard-149",
  "brand": null,
  "countryAlpha2": "NG",
  "city": "West Gerard",
  "address": "99585 Durgan Knolls",
  "latitude": -17.481186,
  "longitude": 100.22275,
  "starRating": 3,
  "rating": 3.5,
  "ratingCount": 1297,
  "priceFromPerNight": 1120.77,
  "currency": "AUD",
  "amenities": [
    "room-service",
    "parking"
  ],
  "createdAt": "2024-12-11T16:49:36.967Z"
}