# Hostelworld API

> Hostelworld returns hostel availability, prices, ratings, and facilities, available as a workflow and API.

Hostelworld searches available hostels, hotels, and guesthouses by city and travel dates. Optional inputs include guest count, currency, room type, result order, and maximum results.

- Page: https://fous.com/workflows/hostelworld
- Handle: `@hostelworld`
- Category: [Travel](https://fous.com/workflows/category/travel)
- Source website: https://hostelworld.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Hostelworld.

## Methods

### Search hostels

Operation `search_hostels`, version 1. 1 credit per call.

Find available hostels, hotels and guesthouses in a city for your dates, with per-night room prices, ratings, facilities and booking links. Apartments are not included; prices and availability can change.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `city` | string | yes | `"Berlin"` | City to search, for example Berlin or Berlin, Germany. |
| `sort` | string | no | `"price_low_to_high"` | Order results, for example price_low_to_high. |
| `guests` | integer | no | `2` | Number of travellers, for example 2. |
| `check_in` | string | yes | `"2026-10-20"` | Arrival date, for example 2026-10-20. |
| `currency` | string | no | `"EUR"` | Three-letter price currency, for example EUR. |
| `check_out` | string | yes | `"2026-10-22"` | Departure date, for example 2026-10-22. |
| `room_type` | string | no | `"dorm"` | Only include properties with this room type available, for example dorm. |
| `max_results` | integer | no | `5` | Maximum number of properties to return, for example 20. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "city",
    "check_in",
    "check_out"
  ],
  "properties": {
    "city": {
      "type": "string",
      "minLength": 1,
      "description": "City to search, for example Berlin or Berlin, Germany.",
      "examples": [
        "Berlin",
        "Rome"
      ]
    },
    "sort": {
      "enum": [
        "recommended",
        "price_low_to_high",
        "rating"
      ],
      "type": "string",
      "default": "recommended",
      "description": "Order results, for example price_low_to_high.",
      "examples": [
        "price_low_to_high"
      ]
    },
    "guests": {
      "type": "integer",
      "default": 1,
      "maximum": 8,
      "minimum": 1,
      "description": "Number of travellers, for example 2.",
      "examples": [
        2
      ]
    },
    "check_in": {
      "type": "string",
      "format": "date",
      "description": "Arrival date, for example 2026-10-20.",
      "examples": [
        "2026-10-20",
        "2026-11-05"
      ]
    },
    "currency": {
      "type": "string",
      "default": "USD",
      "pattern": "^[A-Za-z]{3}$",
      "description": "Three-letter price currency, for example EUR.",
      "examples": [
        "EUR"
      ]
    },
    "check_out": {
      "type": "string",
      "format": "date",
      "description": "Departure date, for example 2026-10-22.",
      "examples": [
        "2026-10-22",
        "2026-11-07"
      ]
    },
    "room_type": {
      "enum": [
        "any",
        "dorm",
        "private"
      ],
      "type": "string",
      "default": "any",
      "description": "Only include properties with this room type available, for example dorm.",
      "examples": [
        "dorm"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum number of properties to return, for example 20.",
      "x-fous-developer": true,
      "examples": [
        5
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "city": "Berlin",
      "check_in": "2026-10-20",
      "check_out": "2026-10-22"
    },
    {
      "city": "Rome",
      "sort": "price_low_to_high",
      "guests": 2,
      "check_in": "2026-11-05",
      "currency": "EUR",
      "check_out": "2026-11-07",
      "room_type": "dorm",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `hostels` | array |  |  |
| `hostels[].link` | string | `"https://www.hostelworld.com/pwa/hosteldetails.php/Legend-R-G/Rome/46450?from=2026-11-05&to=2026-11-07&guests=2"` |  |
| `hostels[].name` | string | `"Legend R.G"` |  |
| `hostels[].type` | string | `"hostel"` |  |
| `hostels[].rating` | number or null | `7.1` | Overall rating out of 10. |
| `hostels[].property_id` | integer | `46450` |  |
| `hostels[].rating_label` | string or null | `"Very Good"` |  |
| `hostels[].review_count` | integer | `3165` |  |
| `hostels[].main_facilities` | array |  |  |
| `hostels[].free_cancellation` | boolean | `true` |  |
| `hostels[].distance_from_city_centre_km` | number or null | `1.51` |  |
| `hostels[].lowest_dorm_bed_price_per_night` | object or null |  |  |
| `hostels[].lowest_private_room_price_per_night` | object or null |  |  |

**Example input**

```json
{
  "city": "Rome",
  "sort": "price_low_to_high",
  "guests": 2,
  "check_in": "2026-11-05",
  "currency": "EUR",
  "check_out": "2026-11-07",
  "room_type": "dorm",
  "max_results": 5
}
```

**Example output**

```json
{
  "hostels": [
    {
      "link": "https://www.hostelworld.com/pwa/hosteldetails.php/Legend-R-G/Rome/46450?from=2026-11-05&to=2026-11-07&guests=2",
      "name": "Legend R.G",
      "type": "hostel",
      "rating": 7.1,
      "property_id": 46450,
      "rating_label": "Very Good",
      "review_count": 3165,
      "main_facilities": [
        "Free WiFi",
        "Wi-Fi"
      ],
      "free_cancellation": true,
      "distance_from_city_centre_km": 1.51,
      "lowest_dorm_bed_price_per_night": {
        "amount": 23.85,
        "currency": "EUR"
      },
      "lowest_private_room_price_per_night": {
        "amount": 95.1,
        "currency": "EUR"
      }
    },
    {
      "link": "https://www.hostelworld.com/pwa/hosteldetails.php/Villa-Luzzatti-Hostel/Rome/304386?from=2026-11-05&to=2026-11-07&guests=2",
      "name": "Villa Luzzatti Hostel",
      "type": "hostel",
      "rating": 5.9,
      "property_id": 304386,
      "rating_label": "Rating",
      "review_count": 286,
      "main_facilities": [
        "Free WiFi",
        "Wi-Fi"
      ],
      "free_cancellation": true,
      "distance_from_city_centre_km": 2.44,
      "lowest_dorm_bed_price_per_night": {
        "amount": 24,
        "currency": "EUR"
      },
      "lowest_private_room_price_per_night": null
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@hostelworld",
  "visibility": "public",
  "operation": "search_hostels",
  "version": 1,
  "input": {
    "city": "Berlin",
    "check_in": "2026-10-20",
    "check_out": "2026-10-22"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@hostelworld\",\n  \"visibility\": \"public\",\n  \"operation\": \"search_hostels\",\n  \"version\": 1,\n  \"input\": {\n    \"city\": \"Berlin\",\n    \"check_in\": \"2026-10-20\",\n    \"check_out\": \"2026-10-22\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@hostelworld",
  "visibility": "public",
  "operation": "search_hostels",
  "version": 1,
  "input": {
    "city": "Berlin",
    "check_in": "2026-10-20",
    "check_out": "2026-10-22"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@hostelworld","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Compare nightly dorm-bed and private-room prices
- Find properties with a chosen room type
- Filter stays by travel dates and guest count
- Review property ratings, facilities, and cancellation details
- Sort property listings by price

## FAQ

### Is Fous affiliated with Hostelworld?

No. Fous is not affiliated with Hostelworld. This workflow reads the public hostelworld.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Hostelworld account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from hostelworld.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### What hostels are available in a city for my dates?

Search hostels returns available hostels, hotels, and guesthouses for a city, check-in date, and check-out date.

### What are the nightly prices for dorm beds and private rooms?

Search hostels returns the lowest nightly dorm-bed and private-room prices, with their currencies.

### Which properties have the room type I need?

Search hostels can filter properties by an available room type, such as a dorm.

## Related

- [Booking.com API](https://fous.com/workflows/booking-com.md): Booking.com helps find stays, property details and public guest reviews; prices and cancellation terms depend on selected dates, and displayed prices may exclude taxes and fees.
- [Airbnb API](https://fous.com/workflows/airbnb.md): Airbnb returns public stays, listing details, dated trip prices, and night availability, which depend on dates and may be limited, unavailable, or change.
- [Agoda API](https://fous.com/workflows/agoda.md): Agoda finds stays and room prices for selected dates; displayed prices exclude taxes and fees, and availability, prices, and cancellation terms may change before booking.
- [Expedia API](https://fous.com/workflows/expedia.md): Expedia helps travelers find hotels, vacation stays, and travel deals, with hotel prices and flight options for selected destinations and dates; flight listings may be limited.
- [Trip.com API](https://fous.com/workflows/trip-com.md): Trip.com offers hotel and flight bookings, with hotel listings limited to initial public results and prices and fares subject to change.
- [Tripadvisor API](https://fous.com/workflows/tripadvisor.md): Tripadvisor provides traveler-ranked first-page city listings of attractions, restaurants and hotels, plus latest reviews; hotel prices and booking sites depend on supplied stay dates and availability.
- [Google Hotels API](https://fous.com/workflows/google-hotels.md): Google Hotels finds stays, guest details and reviews, and compares booking-site totals, cancellation and links for up to six adults; prices and availability can change, and some prices or topic ratings may be unavailable.
- [Priceline API](https://fous.com/workflows/priceline.md): Priceline finds travel deals and returns publicly priced hotel options with ratings, USD prices and cancellation details, plus rental-car offers whose prices may change at checkout.
- [All Travel workflows](https://fous.com/workflows/category/travel)
