Skip to content

最后更新

更新日志

hostelworld.com API

部分异常只读

来自 hostelworld.com 的结构化数据。 来源: www.hostelworld.com.

基础 URL
https://api.maviapi.com/v1/sites/hostelworld
2
端点
1 h ago
最近验证
1982ms
p50 延迟
GET/search5 credits per call

搜索

查询指定住宿日期内有空房的青旅及其他经济型住宿(青旅、酒店、民宿、营地、公寓),每页 30 条。每条记录包含 Hostelworld 住宿 id、名称、坐标、类型、评分(0-10)和评论数,每晚最低多人间床位价格(按人计)和最低独立房间价格(按房间计),平均每晚价格和整个住宿期的总价,货币,是否可免费取消及截止时间,距市中心的距离(km),照片 URL,以及已填入日期和住客信息的住宿页面 URL。按目的地搜索时,结果保持 Hostelworld 自身的排序;按地图区域搜索时,结果按距区域中心的距离排序,距离相同再按 id 排序。地图区域通过在区域内分布若干点、取距各点最近的 Hostelworld 城市来覆盖,因此区域过大时可能遗漏其中小城镇的住宿。

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

city or neighbourhood name, e.g. "Lisbon", "Camden, London"; used when no map area is given

stringOptionalin query

northern latitude of a map bounding box (give with south, east, west); overrides destination

stringOptionalin query

southern latitude of the bounding box

stringOptionalin query

eastern longitude of the bounding box

stringOptionalin query

western longitude of the bounding box

stringOptionalin query

latitude of a map centre (give with lng and radius_km); overrides destination

stringOptionalin query

longitude of the map centre

stringOptionalin query

radius around the centre in km (default 5 when lat/lng are given)

stringOptionalin query

arrival date YYYY-MM-DD (default 14 days from today)

stringOptionalin query

departure date YYYY-MM-DD (default 3 nights after checkin)

integerOptionalin query

number of guests (1-80)

stringOptionalin query

ISO currency code for prices, e.g. EUR, USD, GBP

integerOptionalin query

1-based page number of 30 rows

resolvedobject3 fields
typestringe.g."city"
idintegere.g.725
namestringe.g."Lisbon, Portugal"
checkinstringe.g."2026-12-12"
checkoutstringe.g."2026-12-15"
nightsintegere.g.3
guestsintegere.g.2
currencystringe.g."EUR"
pageintegere.g.1
page_sizeintegere.g.30
totalintegere.g.73
pagesintegere.g.3
propertiesobject[]23 fields
idintegere.g.36649
namestringe.g."Yes! Lisbon Hostel"
latitudenumbere.g.38.7091373
longitudenumbere.g.-9.1377152
typestringe.g."hostel"
citystringe.g."Lisbon"
city_idintegere.g.725
countrystringe.g."Portugal"
districtstringe.g."Sao Jorge Castle"
ratingnumbere.g.9.7
review_countintegere.g.15268
dorm_bed_price_per_nightnumbere.g.23.9
dorm_bed_average_price_per_nightnumbere.g.24.47
dorm_bed_total_staynumbere.g.73.41
private_room_price_per_nightnull
private_room_average_price_per_nightnull
private_room_total_staynull
currencystringe.g."EUR"
free_cancellationbooleane.g.true
free_cancellation_untilstringe.g."2026-12-09T23:59:59+00:00"
distance_from_centre_kmnumbere.g.0.53
photosstring[]
urlstringe.g."https://www.hostelworld.com/pwa/hosteldetails.php/Yes-Lisbon-Hostel/Lisbon/36649?from=2026-12-12&to=2026-12-15&guests=2"
paginationobject3 fields
countintegere.g.30
has_morebooleane.g.true
next_cursorstringe.g."WzEsIjhhZjEzOWI3IixudWxsLDAseyJwYWdlIjoyfV0"
fetched_atstringe.g."2026-11-28T14:55:58.439Z"
ageintegere.g.0
Try itLive
GET
https://api.maviapi.com/v1/sites/hostelworld/search?destination=Lisbon&guests=2&currency=EUR&page=1
Request
curl "https://api.maviapi.com/v1/sites/hostelworld/search?destination=Lisbon&guests=2&currency=EUR&page=1" \
-H "Authorization: Bearer $MAVI_KEY"
Example1.4 KB
{
  "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.

How to connect
https://mcp.maviapi.com/mcp

Or 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 import

Paste 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 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    destinationstring / query否city or neighbourhood name, e.g. "Lisbon", "Camden, London"; used when no map area is given
    northstring / query否northern latitude of a map bounding box (give with south, east, west); overrides destination
    southstring / query否southern latitude of the bounding box
    eaststring / query否eastern longitude of the bounding box
    weststring / query否western longitude of the bounding box
    latstring / query否latitude of a map centre (give with lng and radius_km); overrides destination
    lngstring / query否longitude of the map centre
    radius_kmstring / query否radius around the centre in km (default 5 when lat/lng are given)
    checkinstring / query否arrival date YYYY-MM-DD (default 14 days from today)
    checkoutstring / query否departure date YYYY-MM-DD (default 3 nights after checkin)
    guestsinteger / query否number of guests (1-80)
    currencystring / query否ISO currency code for prices, e.g. EUR, USD, GBP
    pageinteger / query否1-based page number of 30 rows
    响应字段
    字段类型说明
    resolvedobject
    resolved.typestring
    resolved.idinteger
    resolved.namestring
    checkinstring
    checkoutstring
    nightsinteger
    guestsinteger
    currencystring
    pageinteger
    page_sizeinteger
    totalinteger
    pagesinteger
    propertiesobject[]
    properties[].idinteger
    properties[].namestring
    properties[].latitudenumber
    properties[].longitudenumber
    properties[].typestring
    properties[].citystring
    properties[].city_idinteger
    properties[].countrystring
    properties[].districtstring
    properties[].ratingnumber
    properties[].review_countinteger
    properties[].dorm_bed_price_per_nightnumber
    properties[].dorm_bed_average_price_per_nightnumber
    properties[].dorm_bed_total_staynumber
    properties[].private_room_price_per_nightnull
    properties[].private_room_average_price_per_nightnull
    properties[].private_room_total_staynull
    properties[].currencystring
    properties[].free_cancellationboolean
    properties[].free_cancellation_untilstring
    properties[].distance_from_centre_kmnumber
    properties[].photosstring[]
    properties[].urlstring
    paginationobject
    pagination.countinteger
    pagination.has_moreboolean
    pagination.next_cursorstring
    fetched_atstring
    ageinteger
  • 住宿 GET /property

    单个 Hostelworld 住宿的详情:名称、类型、描述、地址、坐标、全部照片、按类别划分的设施、总评分及分项评分(0-10)和评论数、入住时间段和最晚退房时间、注意事项和税费;还包括指定住宿日期内所有可订的多人间和独立房间房型,含容纳人数、剩余床位或房间数,以及各价格方案的价格(每晚价格、住宿期总价和逐晚价格)。多人间价格按床位计,独立房间价格按房间计。`url` 打开已填入日期和住客信息的住宿页面。

    GET /property 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    idinteger / query否Hostelworld property id, as returned by search
    checkinstring / query否arrival date YYYY-MM-DD (default 14 days from today)
    checkoutstring / query否departure date YYYY-MM-DD (default 3 nights after checkin)
    guestsinteger / query否number of guests (1-80)
    currencystring / query否ISO currency code for prices, e.g. EUR, USD, GBP
    响应字段
    字段类型说明
    idinteger
    namestring
    typestring
    descriptionstring
    addressstring
    address_line1string
    address_line2null
    citystring
    city_idinteger
    countrystring
    latitudenumber
    longitudenumber
    directionsstring
    ratingnumber
    review_countinteger
    rating_breakdownobject
    rating_breakdown.value_for_moneynumber
    rating_breakdown.securitynumber
    rating_breakdown.locationnumber
    rating_breakdown.staffnumber
    rating_breakdown.atmospherenumber
    rating_breakdown.cleanlinessnumber
    rating_breakdown.facilitiesnumber
    check_in_fromstring
    check_in_untilstring
    check_out_untilstring
    facilitiesobject[]
    facilities[].categorystring
    facilities[].facilitiesstring[]
    policiesstring[]
    things_to_notestring[]
    taxesobject[]
    taxes[].typestring
    taxes[].amountinteger
    taxes[].unitstring
    taxes[].included_in_priceboolean
    photosstring[]
    checkinstring
    checkoutstring
    nightsinteger
    guestsinteger
    currencystring
    free_cancellationboolean
    free_cancellation_untilstring
    lowest_dorm_bed_price_per_nightnumber
    lowest_private_room_price_per_nightnull
    roomsobject[]
    rooms[].room_idinteger
    rooms[].kindstring
    rooms[].namestring
    rooms[].basic_typestring
    rooms[].gradestring
    rooms[].capacityinteger
    rooms[].ensuiteboolean
    rooms[].descriptionstring
    rooms[].bed_typesstring[]
    rooms[].beds_availableinteger
    rooms[].rooms_availablenull
    rooms[].lowest_price_per_nightnumber
    rooms[].price_unitstring
    rooms[].ratesobject[]
    rooms[].rates[].rate_plan_idinteger
    rooms[].rates[].paymentstring
    rooms[].rates[].is_defaultboolean
    rooms[].rates[].price_per_nightnumber
    rooms[].rates[].original_price_per_nightnumber
    rooms[].rates[].total_staynumber
    rooms[].rates[].nightlyobject[]
    rooms[].rates[].nightly[].datestring
    rooms[].rates[].nightly[].pricenumber
    rooms[].photosstring[]
    urlstring
    fetched_atstring
    ageinteger

将 hostelworld.com 数据导出为 CSV

下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。

列表CSV 列
搜索GET /searchid, 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
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 修改页面时,maviapi 会让 hostelworld.com API 保持可用,您继续调用同样的端点,并得到本页文档所述结构的 JSON。它当前的运行状况见状态页,变更记录见它的更新日志。

更新会破坏我的 hostelworld.com API 集成吗?

不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。

  • Tripadvisor API

    来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…

  • Songkick 演唱会 API

    从 Songkick 获取任意城市在指定日期范围内即将举行的演唱会和音乐节,包含场馆、演出者、票价和购票链接。

  • Google Maps API

    来自 maps.google.com 的结构化数据。