最后更新
更新日志/search5 credits per call搜索
查询指定住宿日期内有空房的青旅及其他经济型住宿(青旅、酒店、民宿、营地、公寓),每页 30 条。每条记录包含 Hostelworld 住宿 id、名称、坐标、类型、评分(0-10)和评论数,每晚最低多人间床位价格(按人计)和最低独立房间价格(按房间计),平均每晚价格和整个住宿期的总价,货币,是否可免费取消及截止时间,距市中心的距离(km),照片 URL,以及已填入日期和住客信息的住宿页面 URL。按目的地搜索时,结果保持 Hostelworld 自身的排序;按地图区域搜索时,结果按距区域中心的距离排序,距离相同再按 id 排序。地图区域通过在区域内分布若干点、取距各点最近的 Hostelworld 城市来覆盖,因此区域过大时可能遗漏其中小城镇的住宿。
Authorization: Bearer <key> on every request.Parameters
city or neighbourhood name, e.g. "Lisbon", "Camden, London"; used when no map area is given
northern latitude of a map bounding box (give with south, east, west); overrides destination
southern latitude of the bounding box
eastern longitude of the bounding box
western longitude of the bounding box
latitude of a map centre (give with lng and radius_km); overrides destination
longitude of the map centre
radius around the centre in km (default 5 when lat/lng are given)
arrival date YYYY-MM-DD (default 14 days from today)
departure date YYYY-MM-DD (default 3 nights after checkin)
number of guests (1-80)
ISO currency code for prices, e.g. EUR, USD, GBP
1-based page number of 30 rows
Response fields
resolved
typee.g."city"ide.g.725namee.g."Lisbon, Portugal"checkine.g."2026-12-12"checkoute.g."2026-12-15"nightse.g.3guestse.g.2currencye.g."EUR"pagee.g.1page_sizee.g.30totale.g.73pagese.g.3properties
ide.g.36649namee.g."Yes! Lisbon Hostel"latitudee.g.38.7091373longitudee.g.-9.1377152typee.g."hostel"citye.g."Lisbon"city_ide.g.725countrye.g."Portugal"districte.g."Sao Jorge Castle"ratinge.g.9.7review_counte.g.15268dorm_bed_price_per_nighte.g.23.9dorm_bed_average_price_per_nighte.g.24.47dorm_bed_total_staye.g.73.41private_room_price_per_nightprivate_room_average_price_per_nightprivate_room_total_staycurrencye.g."EUR"free_cancellatione.g.truefree_cancellation_untile.g."2026-12-09T23:59:59+00:00"distance_from_centre_kme.g.0.53photosurle.g."https://www.hostelworld.com/pwa/hosteldetails.php/Yes-Lisbon-Hostel/Lisbon/36649?from=2026-12-12&to=2026-12-15&guests=2"pagination
counte.g.30has_moree.g.truenext_cursore.g."WzEsIjhhZjEzOWI3IixudWxsLDAseyJwYWdlIjoyfV0"fetched_ate.g."2026-11-28T14:55:58.439Z"agee.g.0curl "https://api.maviapi.com/v1/sites/hostelworld/search?destination=Lisbon&guests=2¤cy=EUR&page=1" \-H "Authorization: Bearer $MAVI_KEY"
{
"resolved": {
"type": "city",
"id": 725,
"name": "Lisbon, Portugal"
},
"checkin": "2026-12-12",
"checkout": "2026-12-15",
"nights": 3,
"guests": 2,
"currency": "EUR",
"page": 1,
"page_size": 30,
"total": 73,
"pages": 3,
"properties": [
{
"id": 36649,
"name": "Yes! Lisbon Hostel",
"latitude": 38.7091373,
"longitude": -9.1377152,
"type": "hostel",
"city": "Lisbon",
"city_id": 725,
"country": "Portugal",
"district": "Sao Jorge Castle",
"rating": 9.7,
"review_count": 15268,
"dorm_bed_price_per_night": 23.9,
"dorm_bed_average_price_per_night": 24.47,
"dorm_bed_total_stay": 73.41,
"private_room_price_per_night": null,
"private_room_average_price_per_night": null,
"private_room_total_stay": null,
"currency": "EUR",
"free_cancellation": true,
"free_cancellation_until": "2026-12-09T23:59:59+00:00",
"distance_from_centre_km": 0.53,
"photos": [
"https://a.hwstatic.com/propertyimages/3/36649/clgjsiiqn96qksjzxbxm.jpg"
],
"url": "https://www.hostelworld.com/pwa/hosteldetails.php/Yes-Lisbon-Hostel/Lisbon/36649?from=2026-12-12&to=2026-12-15&guests=2"
}
],
"pagination": {
"count": 30,
"has_more": true,
"next_cursor": "WzEsIjhhZjEzOWI3IixudWxsLDAseyJwYWdlIjoyfV0"
},
"fetched_at": "2026-11-28T14:55:58.439Z",
"age": 0
}Get all the data, no code
Collect every page of GET /search into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use hostelworld.com API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of hostelworld.com API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=hostelworld -- npx -y '@maviapi/mcp'Import hostelworld.com API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/hostelworld/openapi.json - Postman
https://api.maviapi.com/v1/apis/hostelworld/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
使用 hostelworld.com API 进行开发
选择一个端点开始
- 搜索
GET /search查询指定住宿日期内有空房的青旅及其他经济型住宿(青旅、酒店、民宿、营地、公寓),每页 30 条。每条记录包含 Hostelworld 住宿 id、名称、坐标、类型、评分(0-10)和评论数,每晚最低多人间床位价格(按人计)和最低独立房间价格(按房间计),平均每晚价格和整个住宿期的总价,货币,是否可免费取消及截止时间,距市中心的距离(km),照片 URL,以及已填入日期和住客信息的住宿页面 URL。按目的地搜索时,结果保持 Hostelworld 自身的排序;按地图区域搜索时,结果按距区域中心的距离排序,距离相同再按 id 排序。地图区域通过在区域内分布若干点、取距各点最近的 Hostelworld 城市来覆盖,因此区域过大时可能遗漏其中小城镇的住宿。
GET /search 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 destination string / query 否 city or neighbourhood name, e.g. "Lisbon", "Camden, London"; used when no map area is given north string / query 否 northern latitude of a map bounding box (give with south, east, west); overrides destination south string / query 否 southern latitude of the bounding box east string / query 否 eastern longitude of the bounding box west string / query 否 western longitude of the bounding box lat string / query 否 latitude of a map centre (give with lng and radius_km); overrides destination lng string / query 否 longitude of the map centre radius_km string / query 否 radius around the centre in km (default 5 when lat/lng are given) checkin string / query 否 arrival date YYYY-MM-DD (default 14 days from today) checkout string / query 否 departure date YYYY-MM-DD (default 3 nights after checkin) guests integer / query 否 number of guests (1-80) currency string / query 否 ISO currency code for prices, e.g. EUR, USD, GBP page integer / query 否 1-based page number of 30 rows 响应字段 字段 类型 说明 resolved object resolved.type string resolved.id integer resolved.name string checkin string checkout string nights integer guests integer currency string page integer page_size integer total integer pages integer properties object[] properties[].id integer properties[].name string properties[].latitude number properties[].longitude number properties[].type string properties[].city string properties[].city_id integer properties[].country string properties[].district string properties[].rating number properties[].review_count integer properties[].dorm_bed_price_per_night number properties[].dorm_bed_average_price_per_night number properties[].dorm_bed_total_stay number properties[].private_room_price_per_night null properties[].private_room_average_price_per_night null properties[].private_room_total_stay null properties[].currency string properties[].free_cancellation boolean properties[].free_cancellation_until string properties[].distance_from_centre_km number properties[].photos string[] properties[].url string pagination object pagination.count integer pagination.has_more boolean pagination.next_cursor string fetched_at string age integer - 住宿
GET /property单个 Hostelworld 住宿的详情:名称、类型、描述、地址、坐标、全部照片、按类别划分的设施、总评分及分项评分(0-10)和评论数、入住时间段和最晚退房时间、注意事项和税费;还包括指定住宿日期内所有可订的多人间和独立房间房型,含容纳人数、剩余床位或房间数,以及各价格方案的价格(每晚价格、住宿期总价和逐晚价格)。多人间价格按床位计,独立房间价格按房间计。`url` 打开已填入日期和住客信息的住宿页面。
GET /property 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 id integer / query 否 Hostelworld property id, as returned by search checkin string / query 否 arrival date YYYY-MM-DD (default 14 days from today) checkout string / query 否 departure date YYYY-MM-DD (default 3 nights after checkin) guests integer / query 否 number of guests (1-80) currency string / query 否 ISO currency code for prices, e.g. EUR, USD, GBP 响应字段 字段 类型 说明 id integer name string type string description string address string address_line1 string address_line2 null city string city_id integer country string latitude number longitude number directions string rating number review_count integer rating_breakdown object rating_breakdown.value_for_money number rating_breakdown.security number rating_breakdown.location number rating_breakdown.staff number rating_breakdown.atmosphere number rating_breakdown.cleanliness number rating_breakdown.facilities number check_in_from string check_in_until string check_out_until string facilities object[] facilities[].category string facilities[].facilities string[] policies string[] things_to_note string[] taxes object[] taxes[].type string taxes[].amount integer taxes[].unit string taxes[].included_in_price boolean photos string[] checkin string checkout string nights integer guests integer currency string free_cancellation boolean free_cancellation_until string lowest_dorm_bed_price_per_night number lowest_private_room_price_per_night null rooms object[] rooms[].room_id integer rooms[].kind string rooms[].name string rooms[].basic_type string rooms[].grade string rooms[].capacity integer rooms[].ensuite boolean rooms[].description string rooms[].bed_types string[] rooms[].beds_available integer rooms[].rooms_available null rooms[].lowest_price_per_night number rooms[].price_unit string rooms[].rates object[] rooms[].rates[].rate_plan_id integer rooms[].rates[].payment string rooms[].rates[].is_default boolean rooms[].rates[].price_per_night number rooms[].rates[].original_price_per_night number rooms[].rates[].total_stay number rooms[].rates[].nightly object[] rooms[].rates[].nightly[].date string rooms[].rates[].nightly[].price number rooms[].photos string[] url string fetched_at string age integer
将 hostelworld.com 数据导出为 CSV
下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。
| 列表 | CSV 列 |
|---|---|
搜索GET /search | id, name, latitude, longitude, type, city, city_id, country, district, rating, review_count, dorm_bed_price_per_night, dorm_bed_average_price_per_night, dorm_bed_total_stay, private_room_price_per_night, private_room_average_price_per_night, private_room_total_stay, currency, free_cancellation, free_cancellation_until, distance_from_centre_km, photos, url |
嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作
hostelworld.com API 常见问题
能获取什么数据、费用多少、如何调用。
hostelworld.com 有官方 API 吗?
这个 hostelworld.com API 不是官方 API。它是 maviapi 针对 hostelworld.com 上的公开数据提供的独立托管 API,并非由 hostelworld.com 开发、认可或支持。hostelworld.com 是否提供自己的开发者 API,请向 hostelworld.com 咨询。这个 API 用一个 maviapi 密钥即可调用,它的每个端点和返回的每个字段都在本页有文档说明。
hostelworld.com API 可以获取哪些数据?
hostelworld.com API 有 2 个端点。每个端点都返回 JSON,参数和字段见上方的文档:
- GET
/search: 查询指定住宿日期内有空房的青旅及其他经济型住宿(青旅、酒店、民宿、营地、公寓),每页 30 条。 - GET
/property: 单个 Hostelworld 住宿的详情:名称、类型、描述、地址、坐标、全部照片、按类别划分的设施、总评分及分项评分(0-10)和评论数、入住时间段和最晚退房时间、注意事项和税费;还包括指定住宿日期内所有可订的多人间和独立房间房型,含容纳人数、剩余床位或房间数,以及各价格方案的价格(每晚价格、住宿期总价和逐晚价格)。
hostelworld.com API 的价格是多少?
调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 5 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $0.98。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。
如何调用 hostelworld.com API?
向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /search:
curl 'https://api.maviapi.com/v1/sites/hostelworld/search' \
-H "Authorization: Bearer $MAVI_KEY"在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。
以 JSON 获取 hostelworld.com 数据有哪些方式?
以 JSON 获取 hostelworld.com 数据的每种方式适合不同的需求:
- 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 hostelworld.com 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
- Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
- RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
- maviapi: 本页的 hostelworld.com API:2 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。
hostelworld.com 改版后会怎样?
更新会破坏我的 hostelworld.com API 集成吗?
不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。
相关 API
- Tripadvisor API
来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…
- Songkick 演唱会 API
从 Songkick 获取任意城市在指定日期范围内即将举行的演唱会和音乐节,包含场馆、演出者、票价和购票链接。
- Google Maps API
来自 maps.google.com 的结构化数据。