# Hostelworld Hostel Search API Documentation

<p><strong>Hostelworld Hostel Search API Documentation</strong> List the hostels and other budget stays of a Hostelworld city. Each property has its name, type, ratings with a breakdown, location, distance to the city centre, free cancellation info, a public web url, a photo and the lowest price per night for any room, for dorm beds and for private rooms. Send check_in to get prices for a stay; without it the prices are not date specific. Page with page and per_page; has_more tells you when to stop. A valid city with no properties on the requested page is a successful, billable response with an empty list.</p>

- **Documentation:** [https://scrappa.co/docs/hostelworld-api/hostelworld_search](https://scrappa.co/docs/hostelworld-api/hostelworld_search)
- **API group:** Hostelworld API
- **Endpoint:** `GET https://scrappa.co/api/hostelworld/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city_id` | integer | Yes | Hostelworld city id. Find it with the autocomplete endpoint. Example: 26 for Berlin. |
| `check_in` | string | No | Check-in date, YYYY-MM-DD, today or later. Prices are for this stay when set. |
| `nights` | integer | No | Number of nights, 1 to 30. Defaults to 2. Used together with check_in. |
| `guests` | integer | No | Number of guests, 1 to 20. Defaults to 2. |
| `currency` | string | No | ISO 4217 currency code for all prices, for example EUR or USD. Defaults to EUR. |
| `sort` | string | No | Sort order: price, -price, name, -name, rating, -rating, distance, -distance, rankscore or -rankscore. A leading minus sorts descending. Omit for the Hostelworld default order. |
| `page` | integer | No | Page number, starting at 1. Defaults to 1. |
| `per_page` | integer | No | Properties per page, 1 to 50. Defaults to 20. |

## Example response

```json
{
    "data": {
        "location": {
            "city": "Berlin",
            "region": "Berlin",
            "city_id": 26,
            "country": "Germany"
        },
        "pagination": {
            "page": 1,
            "has_more": true,
            "per_page": 3,
            "total_items": 43,
            "total_pages": 15
        },
        "properties": [
            {
                "id": 703,
                "url": "https://www.hostelworld.com/pwa/hosteldetails.php/Circus-Hostel/Berlin/703",
                "city": "Berlin",
                "name": "Circus Hostel",
                "type": "hostel",
                "image": "https://a.hwstatic.com/image/upload/f_auto,q_auto/v1/propertyimages/7/703/hmncsutasctba9hnlaxx",
                "address": "Weinbergsweg 1a, 10119",
                "country": "Germany",
                "district": "Mitte",
                "latitude": 52.530147,
                "overview": "Welcome to The Circus Hostel your perfect starting point to discover Berlin!\n\nWith the Metro and Tra",
                "position": 1,
                "longitude": 13.401918,
                "distance_km": 1.01,
                "ratings_count": 8093,
                "overall_rating": 92,
                "rating_breakdown": {
                    "fun": 88,
                    "staff": 94,
                    "value": 90,
                    "average": 92,
                    "location": 96,
                    "security": 97,
                    "facilities": 90,
                    "cleanliness": 92
                },
                "free_cancellation": true,
                "lowest_price_per_night": {
                    "amount": 16.88,
                    "currency": "EUR"
                },
                "free_cancellation_until": "2026-10-30T22:59:59Z",
                "lowest_dorm_price_per_night": {
                    "amount": 16.88,
                    "currency": "EUR"
                },
                "lowest_private_price_per_night": {
                    "amount": 59.18,
                    "currency": "EUR"
                }
            },
            {
                "id": 15426,
                "url": "https://www.hostelworld.com/pwa/hosteldetails.php/St-Christopher-s-Berlin-Mitte/Berlin/15426",
                "city": "Berlin",
                "name": "St Christopher's Berlin - Mitte",
                "type": "hostel",
                "image": "https://a.hwstatic.com/image/upload/f_auto,q_auto/v1/propertyimages/1/15426/m0tyooptf31sfivqsgdn",
                "address": "Ziegelstr. 28",
                "country": "Germany",
                "district": "Mitte",
                "latitude": 52.523588,
                "overview": "Please read our Things to Note before making a booking.\n\nSt Christopher's Berlin Mitte is located in",
                "position": 2,
                "longitude": 13.39096,
                "distance_km": 1.28,
                "is_featured": true,
                "ratings_count": 10435,
                "overall_rating": 83,
                "rating_breakdown": {
                    "fun": 82,
                    "staff": 86,
                    "value": 81,
                    "average": 83,
                    "location": 92,
                    "security": 90,
                    "facilities": 73,
                    "cleanliness": 75
                },
                "free_cancellation": true,
                "lowest_price_per_night": {
                    "amount": 13.89,
                    "currency": "EUR"
                },
                "free_cancellation_until": "2026-11-12T22:59:59Z",
                "lowest_dorm_price_per_night": {
                    "amount": 13.89,
                    "currency": "EUR"
                },
                "lowest_private_price_per_night": {
                    "amount": 54.55,
                    "currency": "EUR"
                }
            }
        ],
        "price_range": {
            "lowest": {
                "amount": 13.89,
                "currency": "EUR"
            },
            "highest": {
                "amount": 310.88,
                "currency": "EUR"
            }
        }
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 404 | Resource Not Found | The requested Hostelworld city does not exist. This response is not billable. |
| 503 | Invalid Source Response | Hostelworld answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
