Hostelworld property
One property in full: rating and category scores, address and coordinates, description, directions, things to note, policies, check-in and check-out times, deposit, payment methods, cancellation policy, taxes, price range, facilities by category, images, times booked today, and for the given dates every dorm and private room with capacity, beds left and each rate plan's price per night, total and discount, plus the latest reviews.
Every response includes credits_used: the credits this call cost.
Parameters
| name | type | description |
|---|---|---|
idrequired | string | Hostelworld property id (the number at the end of its page URL). Example: 72963 |
checkin | string | Check-in date (YYYY-MM-DD). Default 14 days from today. |
nights | integer | Nights, 1-30. Example: 2 |
guests | integer | Guests, 1-20. Example: 1 |
currency | string | Price currency (EUR, USD, GBP...). Example: EUR |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/hostelworld/v1/property?id=72963" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/hostelworld/v1/property",
params={"id": "72963"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/hostelworld/v1/property");
url.searchParams.set("id", "72963");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).