example-data.com
Menu
Browse docs and collections

Overview

hotels / #112

Unripe Palace Moenshire

hotel · Moenshire · $1973.33+/night · ★ 3.5 (3602)

7196 Carter Fall

restaurantbar

Component variants

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 112,
  "name": "Unripe Palace Moenshire",
  "slug": "unripe-palace-moenshire-112",
  "brand": null,
  "countryAlpha2": "DK",
  "city": "Moenshire",
  "address": "7196 Carter Fall",
  "latitude": 33.566458,
  "longitude": 109.110809,
  "starRating": 3,
  "rating": 3.5,
  "ratingCount": 3602,
  "priceFromPerNight": 1973.33,
  "currency": "THB",
  "amenities": [
    "restaurant",
    "bar"
  ],
  "createdAt": "2024-08-20T06:53:46.568Z"
}