example-data.com
Menu
Browse docs and collections

Overview

hotels / #2

Fussy Inn South Marion

hotel · South Marion · $678.87+/night · ★ 2.5 (4604)

400 W Broadway Street

laundrybusiness-centerrestaurantpet-friendlygympoolspa

Component variants

Related

Referenced by

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 2,
  "name": "Fussy Inn South Marion",
  "slug": "fussy-inn-south-marion-2",
  "brand": "Marriott",
  "countryAlpha2": "AR",
  "city": "South Marion",
  "address": "400 W Broadway Street",
  "latitude": -7.766618,
  "longitude": 39.331868,
  "starRating": 2,
  "rating": 2.5,
  "ratingCount": 4604,
  "priceFromPerNight": 678.87,
  "currency": "AUD",
  "amenities": [
    "laundry",
    "business-center",
    "restaurant",
    "pet-friendly",
    "gym",
    "pool",
    "spa"
  ],
  "createdAt": "2024-06-08T13:20:33.592Z"
}