Skip to content
Scrappa Get API key
Hostelworld API 1 credit/request

Hostelworld Hostel Search API Documentation

GET https://scrappa.co/api/hostelworld/search

Hostelworld Hostel Search API Documentation 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.

Hostelworld Hostel Search API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/hostelworld/search
Auth header
x-api-key
Cost
1 credit/request
city_id = 1234567890
Response preview
200 OK
{
    "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
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

7 optional filters available.

city_id integer Required

Hostelworld city id. Find it with the autocomplete endpoint. Example: 26 for Berlin.

Example value 1234567890
check_in string Optional

Check-in date, YYYY-MM-DD, today or later. Prices are for this stay when set.

Example value example
nights integer Optional

Number of nights, 1 to 30. Defaults to 2. Used together with check_in.

Example value 10
guests integer Optional

Number of guests, 1 to 20. Defaults to 2.

Example value 10
currency string Optional

ISO 4217 currency code for all prices, for example EUR or USD. Defaults to EUR.

Example value USD
sort string Optional

Sort order: price, -price, name, -name, rating, -rating, distance, -distance, rankscore or -rankscore. A leading minus sorts descending. Omit for the Hostelworld default order.

Example value relevance
page integer Optional

Page number, starting at 1. Defaults to 1.

Example value 1
per_page integer Optional

Properties per page, 1 to 50. Defaults to 20.

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "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

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required query parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "city_id": [
            "A city_id is required. Find it with the autocomplete endpoint, e.g. 26 for Berlin."
        ]
    },
    "message": "The request validation failed"
}
404

Resource Not Found

The requested Hostelworld city does not exist. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "search"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "The requested Hostelworld resource was not found."
    },
    "success": false
}
503

Invalid Source Response

Hostelworld answered with a shape that no longer matches the documented contract. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "PARSER_DRIFT",
        "message": "The Hostelworld response could not be read. Please retry later."
    },
    "success": false
}
503

Service Unavailable

The upstream service is temporarily unavailable. Please retry shortly.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "search"
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "The Hostelworld API is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.