# 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/tools/hostelworld
- Handle: `@hostelworld`
- Category: [Travel](https://fous.com/tools/category/travel)
- Source website: https://hostelworld.com
- Last verified: Sep 29, 2026

## Methods

### Search hostels

Operation `search_hostels`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

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/Circus-Hostel/Berlin/703?from=2026-10-20&to=2026-10-22&guests=1"` |  |
| `hostels[].name` | string | `"Circus Hostel"` |  |
| `hostels[].type` | string | `"hostel"` |  |
| `hostels[].rating` | number or null | `9.3` | Overall rating out of 10. |
| `hostels[].property_id` | integer | `703` |  |
| `hostels[].rating_label` | string or null | `"Superb"` |  |
| `hostels[].review_count` | integer | `8081` |  |
| `hostels[].main_facilities` | array |  |  |
| `hostels[].free_cancellation` | boolean | `true` |  |
| `hostels[].distance_from_city_centre_km` | number or null | `1.01` |  |
| `hostels[].lowest_dorm_bed_price_per_night` | object or null |  |  |
| `hostels[].lowest_private_room_price_per_night` | object or null |  |  |

**Example input**

```json
{
  "city": "Berlin",
  "check_in": "2026-10-20",
  "check_out": "2026-10-22"
}
```

**Example output**

```json
{
  "hostels": [
    {
      "link": "https://www.hostelworld.com/pwa/hosteldetails.php/Circus-Hostel/Berlin/703?from=2026-10-20&to=2026-10-22&guests=1",
      "name": "Circus Hostel",
      "type": "hostel",
      "rating": 9.3,
      "property_id": 703,
      "rating_label": "Superb",
      "review_count": 8081,
      "main_facilities": [
        "Free WiFi",
        "Wi-Fi"
      ],
      "free_cancellation": true,
      "distance_from_city_centre_km": 1.01,
      "lowest_dorm_bed_price_per_night": {
        "amount": 26.41,
        "currency": "USD"
      },
      "lowest_private_room_price_per_night": {
        "amount": 101.56,
        "currency": "USD"
      }
    },
    {
      "link": "https://www.hostelworld.com/pwa/hosteldetails.php/St-Christopher-s-Berlin-Mitte/Berlin/15426?from=2026-10-20&to=2026-10-22&guests=1",
      "name": "St Christopher's Berlin - Mitte",
      "type": "hostel",
      "rating": 8.3,
      "property_id": 15426,
      "rating_label": "Fabulous",
      "review_count": 10426,
      "main_facilities": [
        "Free WiFi",
        "Wi-Fi"
      ],
      "free_cancellation": true,
      "distance_from_city_centre_km": 1.28,
      "lowest_dorm_bed_price_per_night": {
        "amount": 21.48,
        "currency": "USD"
      },
      "lowest_private_room_price_per_night": {
        "amount": 122.75,
        "currency": "USD"
      }
    }
  ]
}
```

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_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.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

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=180) 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.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_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);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/hostelworld`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `search_hostels`: Search hostels. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-hostelworld https://api.fous.com/mcp/tools/hostelworld --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## 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

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Hostelworld tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. 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. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified 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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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/tools/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 tools](https://fous.com/tools/category/travel)
