# Airbnb 房间 URL 爬虫 API：REST、Python 和 cURL | Scrapier (https://scrapier.io/zh/scrapers/airbnb/room/api/)

> 用 cURL、Python 或 Node.js 调用 Airbnb 房间 URL 爬虫 REST API。一次 GET，一个请求头，返回类型化 JSON。每个房源 10 积分。失败的调用免费。

Last updated: 2026-11-28

**GET**/api/v2/airbnb-room-urls/

## Airbnb 房间 URL 爬虫 _API_

最后更新：2026 年11月 9 日 · REST · JSON

简要回答

发送 `GET https://api.scrapier.io/api/v2/airbnb-room-urls/?url=https://www.airbnb.com/rooms/668146487515150072`，并在 `X-API-Key` 请求头中提供你的密钥。你会以 JSON 拿回该房源。每个房源 10 积分；失败的调用免费。

- 每个房源 10 积分
- 失败的调用免费
- 没有速率限制

[获取免费 API 密钥 →](https://app.scrapier.io/sign-up)[跳转到试用区](#playground)

复制给 你的 AI 智能体

API

## 调用 Airbnb 房间 URL 爬虫 API

在你自己的应用、脚本或智能体中使用 Airbnb 房间 URL 爬虫 API。你需要一个 Scrapier 账户和控制台里的 API 密钥。选择一种语言。

room.py

import requests\# Replace YOUR\_API\_KEY with the key from your Scrapier dashboardAPI\_KEY = "YOUR\_API\_KEY"params = {    "url": "https://www.airbnb.com/rooms/668146487515150072",    "currency": "USD",    "locale": "en-US",    "adults": "2",    "children": "0",    "pets": "0",    "enrich\_user\_profiles": "true",}r = requests.get(    "https://api.scrapier.io/api/v2/airbnb-room-urls/",    headers={"X-API-Key": API\_KEY},    params=params,    timeout=210,)r.raise\_for\_status()\# The result sits under data.listingresult = r.json()\["data"\]\["listing"\]print(result)

### Python 版 Airbnb 房间 URL 爬虫 API

只需普通的 `requests`，无需 SDK。每个响应都是类型化 JSON。

安装

**$** pip install requests

其他调用方式

试用区

## Airbnb 房间 URL 爬虫 API 交互式试用区

编辑请求，观察代码更新，然后运行。没有密钥时它显示目录示例，不计费。使用你的密钥时，它会从浏览器发出真实调用；密钥只会发送到 api.scrapier.io，从不存储。

就绪延迟 **—**已计费积分：**0**

请求已就绪`GET /api/v2/airbnb-room-urls/?url=https://www.airbnb.com/rooms/668146487515150072`

点击**运行请求**发送。没有密钥时你得到的是目录示例。

正在发送请求…

**错误**

失败的调用不计费。

[导入到 Postman](https://docs.scrapier.io/integrations/openapi.md)[OpenAPI 规范](https://api.scrapier.io/api/v2/openapi.json)

无论输入什么，示例都相同：它展示的是响应结构，而不是你输入的账户。

### 示例响应，目录示例，2026 年11月 9 日

{
  "success": true,
  "data": {
    "url": "https://www.airbnb.com/rooms/946231329459150209",
    "listing": {
      "id": "946231329459150209",
      "title": "Modern Apartment with Stunning Views",
      "url": "https://www.airbnb.com/rooms/946231329459150209?...",
      "thumbnail": "https://a0.muscache.com/im/pictures/xxx.jpg",
      "property\_type": "Apartment",
      "room\_type": "Entire home/apt",
      "person\_capacity": 4,
      "coordinates": {
        "latitude": 40.7128,
        "longitude": \-74.006
      },
      "rating": {
        "accuracy": 4.9,
        "cleanliness": 4.8,
        "guest\_satisfaction": 4.85,
        "reviews\_count": 127
      },
      "host": {
        "id": "12345",
        "name": "John",
        "is\_super\_host": true
      },
      "amenities": \[
        {
          "title": "Essentials",
          "values": \[
            {
              "title": "Wifi",
              "available": true
            }
          \]
        }
      \],
      "is\_available": true,
      "currency": "USD",
      "locale": "en-US"
    },
    "next\_cursor": null
  }
}

数据

## 你可以提取的数据

Airbnb 房间 URL 爬虫接收一个 Airbnb 房间的 URL，并返回其背后的房源：ID、标题、房产和房间类型、可容纳住客数、坐标、评分明细、房东信息和设施分组。下面每个字段都来自目录示例响应，均为类型化 JSON。

房源

响应中有 11 个字段。

- id
- title
- url
- thumbnail
- property\_type
- room\_type
- person\_capacity
- coordinates
- 另外 3 项

评分、房东和设施

响应中有 3 个字段。

- rating
- host
- amenities

响应结构与分页

响应中有 3 个字段。

- success
- data.url
- data.next\_cursor

结构

## 响应结构参考

示例响应中的每个字段。字段名每次调用都保持不变。

| 字段 | 类型 | 示例 | 说明 |
| --- | --- | --- | --- |
| `listing.id` | string | `"946231329459150209"` | Airbnb 房源 ID |
| `listing.title` | string | `"Modern Apartment with Stunning Views"` | 房源标题 |
| `listing.url` | string | `"https://www.airbnb.com/rooms/94623132945915…"` | 房源的 Airbnb URL |
| `listing.thumbnail` | string | `"https://a0.muscache.com/im/pictures/xxx.jpg"` | 缩略图 URL |
| `listing.property_type` | string | `"Apartment"` | 房产类型，例如 Apartment |
| `listing.room_type` | string | `"Entire home/apt"` | 房间类型，例如 Entire home/apt |
| `listing.person_capacity` | integer | `4` | 房源可容纳的住客数 |
| `listing.coordinates` | object | `{…}` | 含纬度和经度的对象 |
| `listing.is_available` | boolean | `true` | 房源可订时为 true |
| `listing.currency` | string | `"USD"` | 响应的币种代码 |
| `listing.locale` | string | `"en-US"` | 响应的语言区域 |
| `listing.rating` | object | `{…}` | 含 accuracy、cleanliness、guest\_satisfaction 和 reviews\_count 的对象 |
| `listing.host` | object | `{…}` | 含房东 id、姓名和 is\_super\_host 的对象 |
| `listing.amenities` | array | `1 items` | 设施分组，每组含标题、设施列表以及每项是否可用 |
| `success` | boolean | `true` | 每个 200 响应都为 true |
| `data.url` | string | `"https://www.airbnb.com/rooms/94623132945915…"` | 本次响应的房源 URL |
| `data.next_cursor` | null | `null` | 始终为 null：此端点是单次查询 |

参数

## 请求参数参考

| 名称 | 类型 | 必填 | 默认值 | 说明 | 示例 |
| --- | --- | --- | --- | --- | --- |
| `url` | string | 是 | — | Airbnb 房源 URL，例如 `https://www.airbnb.com/rooms/668146487515150072`。每次调用一个。返回完整的结构化详情。别名：`urls`、`startUrls`、`start_urls` | `https://www.airbnb.com/rooms/668146487515150072` |
| `cursor` | string | 否 | — | 此查询不需要：`next_cursor` 始终为 `null` | — |
| `currency` | string | 否 | `USD` | 币种代码，默认 `USD` | `USD` |
| `locale` | string | 否 | `en-US` | 语言区域，默认 `en-US` | `en-US` |
| `adults` | integer | 否 | `2` | 成人，默认 `2` | `2` |
| `children` | integer | 否 | `0` | 儿童，默认 `0` | `0` |
| `pets` | integer | 否 | `0` | 宠物数量，默认 `0` | `0` |
| `check_in` | string | 否 | — | 入住日期，`YYYY-MM-DD`，可选 | — |
| `check_out` | string | 否 | — | 退房日期，`YYYY-MM-DD`，可选 | — |
| `enrich_user_profiles` | boolean | 否 | `true` | 获取房东和共同房东资料，默认 `true` | `true` |
| `use_proxy` | boolean | 否 | `true` | 通过 Scrapier 的住宅代理池路由，默认开启。保持原样即可 | `true` |
| `raw_data` | boolean | 否 | `false` | 在 `raw_responses` 下返回 Airbnb 的原始上游数据，而不是格式化后的条目 | `true` |

每次调用一个房源：要查询十个房间 URL，就调用十次。布尔值是字符串 `true` 或 `false`。

### Airbnb 房间 URL 爬虫 API 中的分页

Airbnb 房间 URL 爬虫 API 分页返回结果。把 `data.next_cursor` 作为 `cursor` 传回即可获取下一页；当它为 `null` 时就没有更多了。每次成功调用，无论首页还是之后的页，都消耗 10 积分。

访问

## 无需 Airbnb 登录即可访问

Airbnb 房间 URL 爬虫 API 不需要 Airbnb 账户、不需要登录，也不需要会话 Cookie。你在 `X-API-Key` 请求头中发送 Scrapier 密钥，就能拿回 JSON。它只读取公开数据：任何访客无需登录就能看到的内容。

性能

## 速度、成本和并发

| 指标 | 数值 | 来源 |
| --- | --- | --- |
| 成功调用的成本 | 10 积分 | Scrapier 目录 |
| 失败调用的成本 | 0 积分 | 任何非 2xx 响应 |
| 每个密钥的并行请求数 | 无限制 | 所有套餐均无速率限制 |
| 建议的客户端超时 | 210 秒 | Scrapier 文档，适用于每个端点 |

### Airbnb 房间 URL 爬虫 API 的延迟

Scrapier 不公布此端点的延迟或成功率数字。每次调用都在调用时读取 Airbnb，所以响应时间取决于 Airbnb 和结果的大小。请按文档对每个端点的建议，把客户端超时设为 210 秒。

限制

## 端点的限制

Airbnb 房间 URL 爬虫 API 的真实限制。

- 仅限公开数据。
- 失败的调用，例如缺失或不可用的房源，会返回非 2xx 状态，消耗 0 积分。
- 数据在调用时实时读取。
- 没有速率限制，因此需要多少并行请求，就发多少。
- 较大的结果分页返回；把 `data.next_cursor` 作为 `cursor` 传回。
- Airbnb 没有显示的字段不会返回。

对比

## Scrapier 与官方 Airbnb API 对比

如果你需要完全定制的爬虫，或已经运行自己的抓取技术栈，自建能提供更多控制；Scrapier 适合想用一个密钥、一种 JSON 结构覆盖多个平台的团队。

| 功能 | Scrapier Airbnb 爬虫 | 自建 Airbnb 抓取 |
| --- | --- | --- |
| 所需权限 | 一个 Scrapier API 密钥 | 你自己的代理、解析器和服务器 |
| 哪些数据 | 每个房间 URL 对应一个公开房源 | 你的解析器提取到什么就是什么 |
| 返回的字段 | 每个房源 14 个字段：标识、房产、坐标、评分、房东和设施 | 你构建并维护什么就是什么 |
| 设置 | 注册，复制密钥，发送请求 | 编写选择器，处理封锁和重试 |
| 成本 | 每个房源 10 积分，每 1,000 次调用 $1.20 起 | 代理、服务器和工程时间 |

错误

## 错误与重试处理

| 状态 | 含义 | 是否计费 | 解决办法 |
| --- | --- | --- | --- |
| 200 | 房源数据，返回在 `data.listing` 中 | 是 | — |
| 400 | 输入有误或缺失 | 否 | 检查 `url`：每次调用一个值 |
| 401 | 缺少 `X-API-Key` 请求头 | 否 | 添加该请求头 |
| 402 | 积分用完（响应体含 `balance`） | 否 | 充值；重试无济于事 |
| 403 | API 密钥无效或已撤销 | 否 | 在控制台中检查密钥 |
| 429 | 被限流 | 否 | 等待 `Retry-After` 秒后重试 |
| 5xx | 上游故障或超时 | 否 | 退避重试；把客户端超时设为 210 s |

来自[错误参考](https://docs.scrapier.io/errors/)。任何非 2xx 响应消耗 0 积分。

### Airbnb 房间 URL 爬虫 API 的重试逻辑

retry.py

import time, requests

def get\_room(value, key, tries=5):
    for attempt in range(tries):
        r = requests.get(
            "https://api.scrapier.io/api/v2/airbnb-room-urls/",
            headers={"X-API-Key": key},
            params={"url": value},
            timeout=210,
        )
        if r.status\_code == 429:
            time.sleep(int(r.headers.get("Retry-After", 2 \*\* attempt)))
        elif r.status\_code >= 500:
            time.sleep(2 \*\* attempt)
        else:
            r.raise\_for\_status()
            return r.json()
    raise RuntimeError("gave up after retries")

价格

## 价格与速率限制

| 套餐 | 月费 | 包含的房源数 | 每 1,000 次成本 |
| --- | --- | --- | --- |
| Hobby | $29 | 15,000 | $1.93 |
| Pro | $79 | 50,000 | $1.58 |
| Scale | $299 | 250,000 | $1.20 |

[查看所有套餐 →](https://scrapier.io/zh/pricing/)

### Airbnb 房间 URL 爬虫 API 的计费规则

Airbnb Room URLs Scraper API 按每个成功获取的房源收取 10 积分。失败的调用（即任何非 2xx 状态）消耗 0 积分。所有套餐都没有速率限制。付费前可以先用免费额度试用。

批量

## 批量查询与 CSV

`url` 每次调用只接受一个值。对于列表，循环并行调用（没有速率限制），然后把每一行展平为一行 CSV。

bulk.py

import csv, requests
from concurrent.futures import ThreadPoolExecutor

values = \["https://www.airbnb.com/rooms/668146487515150072"\]  \# your list

def fetch(value):
    r = requests.get(
        "https://api.scrapier.io/api/v2/airbnb-room-urls/",
        headers={"X-API-Key": "YOUR\_API\_KEY"},
        params={"url": value},
        timeout=210,
    )
    r.raise\_for\_status()
    out = r.json()\["data"\]\["listing"\]
    return out if isinstance(out, list) else \[out\]

\# no rate limits: use as many workers as you need
with ThreadPoolExecutor(max\_workers=3) as pool:
    rows = \[row for part in pool.map(fetch, values) for row in part\]

cols = \["id", "title", "property\_type", "room\_type", "person\_capacity", "is\_available"\]
with open("out.csv", "w", newline="") as f:
    w = csv.DictWriter(f, fieldnames=cols, extrasaction="ignore")
    w.writeheader()
    w.writerows(rows)

### 从 Airbnb 房间 URL 爬虫 API 导出 CSV

out.csv目录示例 · 1 行

id,title,property\_type,room\_type,person\_capacity,is\_available
946231329459150209,Modern Apartment with Stunning Views,Apartment,Entire home/apt,4,true

智能体

## 通过 MCP 供 AI 智能体访问

### Airbnb 房间 URL 爬虫 API 的 MCP

AI 智能体可通过位于 `https://mcp.scrapier.io/mcp` 的 Scrapier MCP 服务器使用同一个端点。一条命令即可在 Claude Code 中注册它：`claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY"`。智能体用 `search_endpoints` 找到该端点，再用 `run_scrape` 和端点 id `airbnb-room-urls` 调用它。它接受相同的 `url` 输入，每个房源同样消耗 10 积分。各客户端的设置见 [Airbnb 房间 URL 爬虫 MCP 页面](https://scrapier.io/zh/scrapers/airbnb/room/mcp/)。

集成

## 按角色划分的集成路径

无代码

### n8n 和 Make

1. 添加一个 HTTP Request 步骤
2. 带上你的 `X-API-Key` 请求头，对该端点发送 GET
3. 把 `data.listing` 字段映射到你的列

开发者

### 循环并翻页

for value in values: rows += get(value) while cur := page\["data"\]\["next\_cursor"\]: page = get(cursor=cur)

AI 智能体

### 智能体中的 MCP 工具

在 Claude、Cursor 或 Windsurf 中用端点 `airbnb-room-urls` 调用 `run_scrape`。设置见 [MCP 页面](https://scrapier.io/zh/scrapers/airbnb/room/mcp/)。

分析师

### CSV 和展平的 JSON

把每一行展平为一行 CSV，每个字段一列，可直接用于 Sheets、Excel 或 BI 工具。

法律

## 法律与合规说明

抓取公开可用的网页在许多国家通常是合法的，但答案取决于你收集什么、你在哪里以及如何使用。在美国，关于公开数据抓取最常被引用的案例是 hiQ Labs v. LinkedIn。Scrapier 只返回任何访客无需登录就能看到的数据。房东的名字是结果中唯一的个人信息，所以只收集你需要的。在 GDPR 及类似法律下，收集公开数据可能是允许的，但你存储和使用个人数据的方式仍必须符合当地数据保护规定，并且 Airbnb 的条款适用。如果你的使用场景涉及批量存储个人数据，请咨询法律顾问。这不是法律建议；请参阅我们的[使用条款](https://scrapier.io/zh/terms/)。

常见问题

## 常见问题

### 有 Airbnb 房源 API 吗？

有。Scrapier 的 Airbnb 房间 URL 爬虫 API 用一次 GET 请求和 X-API-Key 请求头，就能以 JSON 返回任何公开房源。无需 Airbnb 应用或登录。

### 如何从 Python 调用？

对 \<code>https://api.scrapier.io/api/v2/airbnb-room-urls/\</code> 使用 \<code>requests.get\</code>，带上 \<code>params={'url': 'https://www.airbnb.com/rooms/668146487515150072'}\</code> 和 \<code>headers={"X-API-Key": KEY}\</code>。读取 \<code>r.json()\["data"\]\["listing"\]\</code>。

### 调用失败时会怎样？

任何非 200 响应都免费。对 429 和 5xx 请退避重试；API 已经会重试上游故障。

### 多少钱？

每次成功调用 10 积分，在 Pro 套餐上每 1,000 个房源约 $1.58。失败的调用免费。

### 有 OpenAPI 规范吗？

有。获取它无需密钥，并且涵盖每个 Scrapier 端点。

相关

## 相关 Airbnb API

### 房源搜索 API

按城市或街区和日期搜索房源：标题、入住总价、评分、评价数和坐标。

[### 入住率 / 可订情况 API

一个房源的日历，每页一个月：每个日期以及是否可订。](https://scrapier.io/zh/scrapers/airbnb/occupancy/)[### 价格追踪 API

一个房源的每日价格报价，每页 30 个入住日期：每晚价格、费用、总价和预订状态。](https://scrapier.io/zh/scrapers/airbnb/price-tracker/)[### 所有 Airbnb API

全部 5 个 Airbnb 端点。](https://scrapier.io/zh/scrapers/airbnb/)

## 一次请求即可获取公开的 Airbnb 房源（类型化 JSON）

每个房源 10 积分 · 失败的调用免费

[获取免费 API 密钥 →](https://app.scrapier.io/sign-up)

---
Canonical page: https://scrapier.io/zh/scrapers/airbnb/room/api/
Site index for AI agents: https://scrapier.io/llms.txt
