{
  "openapi": "3.0.1",
  "info": {
    "title": "Hostelworld Hostels Scraper",
    "description": "Scrapes hostels, guesthouses and budget hotels from Hostelworld by city. Every row carries nightly dorm and private prices, an 8-axis rating breakdown, GPS coordinates, address, district, facilities and images. Optional per-property detail adds policies, house rules and check-in times.",
    "version": "0.1",
    "x-build-id": "mFhEf5pTuc0jIw7Kj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~hostelworld-hostels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-hostelworld-hostels-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapyx~hostelworld-hostels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-hostelworld-hostels-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapyx~hostelworld-hostels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-hostelworld-hostels-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "title": "Cities",
            "type": "array",
            "description": "One city per entry, each with its own SEARCH_SUMMARY row.\n\nThree accepted forms:\n\n- `Spain/Barcelona` — **recommended**. Country-scoped, unambiguous, and needs only one lookup request.\n- `Barcelona` — bare name. Works, but the first bare name in a run builds a global city index (one request per country, issued concurrently). Refused with a list of candidates if the name exists in more than one country.\n- `22418` — a raw Hostelworld city id, used as-is with no lookup.\n\nHostelworld has no city-search endpoint, so names are resolved through their own continents → countries → cities listing. That listing is not exhaustive: if a city you know exists is not found, pass its numeric id instead.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "",
              "HOSTEL",
              "HOTEL",
              "GUESTHOUSE",
              "APARTMENT",
              "CAMPSITE"
            ],
            "type": "string",
            "description": "Restrict to one kind of property. Verified on Barcelona, where the types partition the city exactly: 93 hostels + 5 hotels + 15 guesthouses + 2 apartments = the full 115. An unrecognised type is refused by Hostelworld with HTTP 400 rather than being silently ignored, so anything outside this list is rejected before the run starts.",
            "default": ""
          },
          "sort": {
            "title": "Sort order",
            "enum": [
              "",
              "-rating",
              "rating",
              "price",
              "-price",
              "distance",
              "name"
            ],
            "type": "string",
            "description": "Each value here was verified to genuinely reorder results. `popularity` and `recommended` look plausible but are refused with HTTP 400, so they are not offered.",
            "default": ""
          },
          "checkInDate": {
            "title": "Check-in date",
            "type": "string",
            "description": "Optional `YYYY-MM-DD`. Set this together with **Nights** to return only properties with real availability for those dates — on London this narrowed 94 properties to 80. Must be set as a pair: one without the other is answered with HTTP 400.",
            "default": ""
          },
          "nights": {
            "title": "Nights",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Length of stay in nights, used with **Check-in date**. Leave at 0 to list every property regardless of availability.",
            "default": 0
          },
          "includePropertyDetails": {
            "title": "Fetch full property details",
            "type": "boolean",
            "description": "Adds one request per property and attaches a `detail` object carrying what the listing does not: full description, house rules and things to note, cancellation policy, payment methods, check-in/check-out window, the categorised facility list and a sample of recent reviews.\n\nOff by default — search rows already include prices, the 8-axis rating breakdown, coordinates, address, district and images, which is enough for most uses.",
            "default": false
          },
          "maxItems": {
            "title": "Max properties per city",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many properties per city. Set to 0 for unlimited — Hostelworld imposes no result-window ceiling, and the largest city measured (Bangkok) holds 326 properties.",
            "default": 100
          },
          "pageSize": {
            "title": "Rows per request",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many properties to pull per API call. No server-side cap was found — 500 returns a whole city in a single request. 200 keeps responses around 1 MB while still covering most cities in one call.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Upper bound on requests in flight at once, across all cities and any detail fetches.",
            "default": 4
          },
          "minRequestInterval": {
            "title": "Minimum seconds between requests",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Paces how often requests START, without tying up a concurrency slot. No throttling was observed (12 back-to-back detail calls all returned 200), so this defaults to 0 — raise it to be gentler on large crawls.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Hostelworld's API is fully open — no auth, no token, and no bot challenge on any of the 8 TLS profiles tested across every surface. Residential is still the cloud default, because container egress is a different posture than a home connection. No country pin: this is a global travel API with no geo gate.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}