Airbnb 价格追踪爬虫 API
最后更新: · REST · JSON
发送 GET https://proxy.scrapier.io/api/v2/airbnb-price-tracker/?url=https://www.airbnb.com/rooms/569049214818933247,并在 X-API-Key 请求头中提供你的密钥。你会以 JSON 拿回这一页价格报价。每页价格报价 10 积分;失败的调用免费。
- 每页价格报价 10 积分
- 失败的调用免费
- 每个密钥 3 个并行请求
调用 Airbnb 价格追踪爬虫 API
在你自己的应用、脚本或智能体中使用 Airbnb 价格追踪爬虫 API。你需要一个 Scrapier 账户和控制台里的 API 密钥。选择一种语言。
import requests# Replace YOUR_API_KEY with the key from your Scrapier dashboardAPI_KEY = "YOUR_API_KEY"params = { "url": "https://www.airbnb.com/rooms/569049214818933247", "check_in_date": "2026-12-01", "stay_days": "3", "adults": "2", "children": "0", "infants": "0", "pets": "0", "currency": "USD",}r = requests.get( "https://proxy.scrapier.io/api/v2/airbnb-price-tracker/", headers={"X-API-Key": API_KEY}, params=params, timeout=210,)r.raise_for_status()# The result sits under data.entriesresult = r.json()["data"]["entries"]print(result)
// Replace YOUR_API_KEY with the key from your Scrapier dashboardconst API_KEY = "YOUR_API_KEY";const params = new URLSearchParams({ url: "https://www.airbnb.com/rooms/569049214818933247", check_in_date: "2026-12-01", stay_days: "3", adults: "2", children: "0", infants: "0", pets: "0", currency: "USD",});const res = await fetch(`https://proxy.scrapier.io/api/v2/airbnb-price-tracker/?${params}`, { headers: { "X-API-Key": API_KEY }, signal: AbortSignal.timeout(210_000),});if (!res.ok) throw new Error(`HTTP ${res.status}`);const { data } = await res.json();console.log(data.entries);
# One GET request. The key goes in a header, never in the URL.GET /api/v2/airbnb-price-tracker/?url=https://www.airbnb.com/rooms/569049214818933247&check_in_date=2026-12-01&stay_days=3&adults=2&children=0&infants=0&pets=0¤cy=USD HTTP/1.1Host: proxy.scrapier.ioX-API-Key: YOUR_API_KEYAccept: application/json
# Scrapier publishes an OpenAPI spec that covers every endpoint. No API key needed.curl -O https://proxy.scrapier.io/api/v2/openapi.json# Import openapi.json into Postman, Insomnia, Bruno or a code generator,# then add your key as the X-API-Key header.
# 1. Add the Scrapier MCP server to Claude Codeclaude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY"# 2. Ask your agent. It finds the endpoint with search_endpoints# and calls it with run_scrape:"Get Airbnb price quotes from 2026-12-01 for https://www.airbnb.com/rooms/569049214818933247 and show the cheapest dates"run_scrape("airbnb-price-tracker", {url: "https://www.airbnb.com/rooms/569049214818933247"})
Python 版 Airbnb 价格追踪爬虫 API
只需普通的 requests,无需 SDK。每个响应都是类型化 JSON。
安装
JavaScript 版 Airbnb 价格追踪爬虫 API
可在 Node 18+、Deno、Bun 和边缘运行时中使用内置的 fetch。
检查你的环境
通过 HTTP 调用 Airbnb 价格追踪爬虫 API
一次 GET 请求。认证只需一个 X-API-Key 请求头。
检查你的环境
Airbnb 价格追踪爬虫 API 的 OpenAPI 定义
下载一次规范,然后导入到你已在使用的工具中。获取它无需密钥。
下载规范
通过 MCP 调用 Airbnb 价格追踪爬虫 API
同一个端点也是 Claude Code、Cursor 和 Windsurf 的工具调用。相同的 url,每页价格报价同样 10 积分。
安装
其他调用方式
Airbnb 价格追踪爬虫 API 交互式试用区
编辑请求,观察代码更新,然后运行。没有密钥时它显示目录示例,不计费。使用你的密钥时,它会从浏览器发出真实调用;密钥只会发送到 proxy.scrapier.io,从不存储。
GET /api/v2/airbnb-price-tracker/?url=https://www.airbnb.com/rooms/569049214818933247点击运行请求发送。没有密钥时你得到的是目录示例。
失败的调用不计费。
无论输入什么,示例都相同:它展示的是响应结构,而不是你输入的账户。
示例响应,目录示例,2026 年11月 9 日
{
"success": true,
"data": {
"url": "https://www.airbnb.com/rooms/569049214818933247",
"check_in_date": "2026-12-01",
"currency": "USD",
"page_size": 30,
"entries": [
{
"listing_url": "https://www.airbnb.com/rooms/569049214818933247",
"listing_id": "569049214818933247",
"host": "Hosted by Fatin",
"overview": "Entire serviced apartment in Kuala Lumpur, Malaysia",
"title": "CeylonZ Suites Kuala Lumpur. 33a (B) City View - Serviced apartments for Rent in Kuala Lumpur, Malaysia - Airbnb",
"canonical_url": "https://www.airbnb.com/rooms/569049214818933247",
"room_info": "Serviced apartment in Kuala Lumpur · ★4.91 · 1 bedroom · 2 beds · 1 bath",
"property_type": "Entire serviced apartment",
"room_rating": 4.91,
"accuracy_rating": 4.94,
"checkin_rating": 4.84,
"cleanliness_rating": 4.93,
"communication_rating": 4.92,
"location_rating": 4.84,
"value_rating": 4.9,
"guest_satisfaction_overall": 4.91,
"visible_review_count": "388",
"review_accessibility_label": "Rated 4.91 out of 5 from 388 reviews.",
"pets_allowed": false,
"guest_capacity": 2,
"location": "Kuala Lumpur",
"image_url": "https://a0.muscache.com/im/pictures/93f9feea-82c8-4537-bfad-3bda8e479333.jpg",
"meta_description": "Dec 1, 2026 · Entire serviced apartment · Located in the HEART of Kuala Lumpur. Building address is Exsim Ceylonz Suites, Persiaran Raja Chulan...",
"price_breakdown_title": "Price details",
"price_breakdown_subtitle": null,
"accessibility_label": "$435 for 3 nights",
"strike_through_price": null,
"primary_price": "$145",
"cleaning_fee": "$25",
"service_fee": "$61",
"taxes": null,
"total_price": "$435",
"booking": "Available",
"bedrooms": "1",
"beds": "2",
"bathrooms": "1",
"cancellation_policy_name": "Firm",
"cancellation_policy_subtitles": [
"Free cancellation before November 1. Cancel before November 24 for a partial refund."
],
"check_in_date": "2026-12-01",
"check_out_date": "2026-12-04",
"url": "https://www.airbnb.com/rooms/569049214818933247"
}
],
"next_cursor": "eyJhIjoyLCJjaCI6bnVsbCwiY2lkIjoiMjAyNi0xMi0zMSIsImN1IjoiVVNEIiwiaCI6IjdmMWU1ZjZhMDk5MyIsImluZiI6bnVsbCwicCI6MCwic2QiOjMsInUiOiJodHRwczovL3d3dy5haXJibmIuY29tL3Jvb21zLzU2OTA0OTIxNDgxODkzMzI0NyJ9"
}
}你可以提取的数据
Airbnb 价格追踪爬虫针对一系列入住日期(每页 30 个)为房源报价,并把每次住宿作为一行返回:每晚价格、费用、总价、预订状态、评分和取消政策。下面每个字段都来自目录示例响应,均为类型化 JSON。
房源
响应中有 16 个字段。
- listing_url
- listing_id
- host
- overview
- title
- canonical_url
- room_info
- property_type
- 另外 8 项
评分
响应中有 10 个字段。
- room_rating
- accuracy_rating
- checkin_rating
- cleanliness_rating
- communication_rating
- location_rating
- value_rating
- guest_satisfaction_overall
- 另外 2 项
住宿价格
响应中有 10 个字段。
- price_breakdown_title
- price_breakdown_subtitle
- accessibility_label
- strike_through_price
- primary_price
- cleaning_fee
- service_fee
- taxes
- 另外 2 项
住宿与政策
响应中有 5 个字段。
- check_in_date
- check_out_date
- cancellation_policy_name
- cancellation_policy_subtitles
- url
响应结构与分页
响应中有 6 个字段。
- success
- data.url
- data.check_in_date
- data.currency
- data.page_size
- data.next_cursor
响应结构参考
示例响应中的每个字段。字段名每次调用都保持不变。
| 字段 | 类型 | 示例 | 说明 |
|---|---|---|---|
entries.listing_url | string | "https://www.airbnb.com/rooms/56904921481893…" | 房源的 Airbnb URL |
entries.listing_id | string | "569049214818933247" | Airbnb 房源 ID |
entries.host | string | "Hosted by Fatin" | 房东行,例如 Hosted by <name> |
entries.overview | string | "Entire serviced apartment in Kuala Lumpur, …" | 房产和地点的一句话概述 |
entries.title | string | "CeylonZ Suites Kuala Lumpur. 33a (B) City V…" | 房源的页面标题 |
entries.canonical_url | string | "https://www.airbnb.com/rooms/56904921481893…" | 房源的规范 URL |
entries.room_info | string | "Serviced apartment in Kuala Lumpur · ★4.91 …" | 概述行:类型、地点、评分、卧室、床、卫生间 |
entries.property_type | string | "Entire serviced apartment" | 房产类型 |
entries.location | string | "Kuala Lumpur" | 城市或区域 |
entries.image_url | string | "https://a0.muscache.com/im/pictures/93f9fee…" | 房源主图 URL |
entries.meta_description | string | "Dec 1, 2026 · Entire serviced apartment · L…" | 页面 meta 描述 |
entries.guest_capacity | integer | 2 | 房源可容纳的住客数 |
entries.pets_allowed | boolean | false | 允许携带宠物时为 true |
entries.bedrooms | string | "1" | 卧室数量 |
entries.beds | string | "2" | 床的数量 |
entries.bathrooms | string | "1" | 卫生间数量 |
entries.room_rating | number | 4.91 | 总体星级评分 |
entries.accuracy_rating | number | 4.94 | 准确度评分 |
entries.checkin_rating | number | 4.84 | 入住评分 |
entries.cleanliness_rating | number | 4.93 | 清洁度评分 |
entries.communication_rating | number | 4.92 | 沟通评分 |
entries.location_rating | number | 4.84 | 位置评分 |
entries.value_rating | number | 4.9 | 性价比评分 |
entries.guest_satisfaction_overall | number | 4.91 | 住客总体满意度得分 |
entries.visible_review_count | string | "388" | 页面上显示的评价数 |
entries.review_accessibility_label | string | "Rated 4.91 out of 5 from 388 reviews." | 评分和评价数的文字标签 |
entries.price_breakdown_title | string | "Price details" | 价格明细的标题 |
entries.price_breakdown_subtitle | null | null | 价格明细的副标题(如有显示) |
entries.accessibility_label | string | "$435 for 3 nights" | 文字形式的价格摘要,例如 N 晚总价 |
entries.strike_through_price | null | null | 显示折扣时的原价 |
entries.primary_price | string | "$145" | 显示的每晚价格 |
entries.cleaning_fee | string | "$25" | 清洁费 |
entries.service_fee | string | "$61" | 服务费 |
entries.taxes | null | null | 税费(如有显示) |
entries.total_price | string | "$435" | 住宿总价 |
entries.booking | string | "Available" | 预订状态,例如 Available |
entries.check_in_date | string | "2026-12-01" | 这条报价的入住日期 |
entries.check_out_date | string | "2026-12-04" | 这条报价的退房日期 |
entries.cancellation_policy_name | string | "Firm" | 取消政策名称 |
entries.cancellation_policy_subtitles | array | 1 items | 取消政策详情 |
entries.url | string | "https://www.airbnb.com/rooms/56904921481893…" | 该报价的 Airbnb URL |
success | boolean | true | 每个 200 响应都为 true |
data.url | string | "https://www.airbnb.com/rooms/56904921481893…" | 本次响应的房源 URL |
data.check_in_date | string | "2026-12-01" | 本页的起始入住日期 |
data.currency | string | "USD" | 价格的币种 |
data.page_size | integer | 30 | 每页的报价数 |
data.next_cursor | string | "eyJhIjoyLCJjaCI6bnVsbCwiY2lkIjoiMjAyNi0xMi0…" | 作为 cursor 传回即可获取接下来 30 天;最后一页为 null |
请求参数参考
| 名称 | 类型 | 必填 | 默认值 | 说明 | 示例 |
|---|---|---|---|---|---|
url | string | 是 | — | Airbnb 房源 URL,例如 https://www.airbnb.com/rooms/569049214818933247。每次调用一个。首次调用时必填;提供 cursor 时会被忽略。别名:urls、startUrls、start_urls | https://www.airbnb.com/rooms/569049214818933247 |
cursor | string | 否 | — | 原样传回上一个响应的 data.next_cursor,即可向后推进 30 天;null 表示最后一页 | — |
check_in_date | string | 否 | 2026-12-01 | 起始入住日期,YYYY-MM-DD,默认 2026-12-01。游标每页将其推进 30 天 | 2026-12-01 |
stay_days | integer | 否 | 3 | 每条每日报价的晚数,默认 3。锁定在游标中 | 3 |
adults | integer | 否 | 2 | 成人住客,默认 2 | 2 |
children | integer | 否 | 0 | 儿童住客,默认 0 | 0 |
infants | integer | 否 | 0 | 婴儿住客,默认 0 | 0 |
pets | integer | 否 | 0 | 宠物数量,默认 0 | 0 |
currency | string | 否 | USD | 币种代码,默认 USD | USD |
use_proxy | boolean | 否 | true | 通过 Scrapier 的住宅代理池路由,默认开启。保持原样即可 | true |
raw_data | boolean | 否 | false | 在 raw_responses 下返回 Airbnb 的原始上游数据,而不是格式化后的条目 | true |
每次调用一个房源:要追踪十个房源,就调用十次,并分别用 cursor 翻页。布尔值是字符串 true 或 false。
Airbnb 价格追踪爬虫 API 中的分页
Airbnb 价格追踪爬虫 API 分页返回结果。把 data.next_cursor 作为 cursor 传回即可获取下一页;当它为 null 时就没有更多了。每次成功调用,无论首页还是之后的页,都消耗 10 积分。
无需 Airbnb 登录即可访问
Airbnb 价格追踪爬虫 API 不需要 Airbnb 账户、不需要登录,也不需要会话 Cookie。你在 X-API-Key 请求头中发送 Scrapier 密钥,就能拿回 JSON。它只读取公开数据:任何访客无需登录就能看到的内容。
速度、成本和并发
| 指标 | 数值 | 来源 |
|---|---|---|
| 成功调用的成本 | 10 积分 | Scrapier 目录 |
| 失败调用的成本 | 0 积分 | 任何非 2xx 响应 |
| 每个密钥的并行请求数 | 3 | 超过后:429 和 Retry-After |
| 建议的客户端超时 | 210 秒 | Scrapier 文档,适用于每个端点 |
Airbnb 价格追踪爬虫 API 的延迟
Scrapier 不公布此端点的延迟或成功率数字。每次调用都在调用时读取 Airbnb,所以响应时间取决于 Airbnb 和结果的大小。请按文档对每个端点的建议,把客户端超时设为 210 秒。
端点的限制
Airbnb 价格追踪爬虫 API 的真实限制。
- 仅限公开数据。
- 失败的调用,例如缺失或不可用的价格报价页面,会返回非 2xx 状态,消耗 0 积分。
- 数据在调用时实时读取。
- 每个密钥 3 个并行请求;超过后 API 会返回
429和Retry-After。 - 较大的结果分页返回;把
data.next_cursor作为cursor传回。 - Airbnb 没有显示的字段不会返回。
Scrapier 与官方 Airbnb API 对比
如果你需要完全定制的爬虫,或已经运行自己的抓取技术栈,自建能提供更多控制;Scrapier 适合想用一个密钥、一种 JSON 结构覆盖多个平台的团队。
| 功能 | Scrapier Airbnb 爬虫 | 自建 Airbnb 抓取 |
|---|---|---|
| 所需权限 | 一个 Scrapier API 密钥 | 你自己的代理、解析器和服务器 |
| 哪些数据 | 任何公开房源的每日价格报价 | 你的解析器提取到什么就是什么 |
| 返回的字段 | 每条报价 41 个字段:价格、费用、预订状态、评分和政策 | 你构建并维护什么就是什么 |
| 设置 | 注册,复制密钥,发送请求 | 编写选择器,处理封锁和重试 |
| 成本 | 每页价格报价 10 积分,每 1,000 次调用 $1.20 起 | 代理、服务器和工程时间 |
错误与重试处理
| 状态 | 含义 | 是否计费 | 解决办法 |
|---|---|---|---|
| 200 | 一页价格报价数据,返回在 data.entries 中 | 是 | — |
| 400 | 输入有误或缺失 | 否 | 检查 url:每次调用一个值 |
| 401 | 缺少 X-API-Key 请求头 | 否 | 添加该请求头 |
| 402 | 积分用完(响应体含 balance) | 否 | 充值;重试无济于事 |
| 403 | API 密钥无效或已撤销 | 否 | 在控制台中检查密钥 |
| 429 | 被限流 | 否 | 等待 Retry-After 秒后重试 |
| 5xx | 上游故障或超时 | 否 | 退避重试;把客户端超时设为 210 s |
来自错误参考。任何非 2xx 响应消耗 0 积分。
Airbnb 价格追踪爬虫 API 的重试逻辑
import time, requests def get_price_tracker(value, key, tries=5): for attempt in range(tries): r = requests.get( "https://proxy.scrapier.io/api/v2/airbnb-price-tracker/", 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 |
Airbnb 价格追踪爬虫 API 的计费规则
Airbnb 价格追踪爬虫 API 每个成功的价格报价页计费 10 积分。失败的调用,即任何非 2xx 状态,消耗 0 积分。每个套餐都允许每个密钥 3 个并行请求。免费额度让你付费前先试用。
批量查询与 CSV
url 每次调用只接受一个值。对于列表,循环调用,每个密钥最多并行 3 个请求,然后把每一行展平为一行 CSV。
import csv, requests from concurrent.futures import ThreadPoolExecutor values = ["https://www.airbnb.com/rooms/569049214818933247"] # your list def fetch(value): r = requests.get( "https://proxy.scrapier.io/api/v2/airbnb-price-tracker/", headers={"X-API-Key": "YOUR_API_KEY"}, params={"url": value}, timeout=210, ) r.raise_for_status() out = r.json()["data"]["entries"] return out if isinstance(out, list) else [out] # 3 parallel requests per key is the limit with ThreadPoolExecutor(max_workers=3) as pool: rows = [row for part in pool.map(fetch, values) for row in part] cols = ["check_in_date", "check_out_date", "primary_price", "cleaning_fee", "service_fee", "total_price"] with open("out.csv", "w", newline="") as f: w = csv.DictWriter(f, fieldnames=cols, extrasaction="ignore") w.writeheader() w.writerows(rows)
从 Airbnb 价格追踪爬虫 API 导出 CSV
check_in_date,check_out_date,primary_price,cleaning_fee,service_fee,total_price 2026-12-01,2026-12-04,$145,$25,$61,$435
通过 MCP 供 AI 智能体访问
Airbnb 价格追踪爬虫 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-price-tracker 调用它。它接受相同的 url 输入,每页价格报价同样消耗 10 积分。各客户端的设置见 Airbnb 价格追踪爬虫 MCP 页面。
按角色划分的集成路径
n8n 和 Make
- 添加一个 HTTP Request 步骤
- 带上你的
X-API-Key请求头,对该端点发送 GET - 把
data.entries字段映射到你的列
循环并翻页
CSV 和展平的 JSON
把每一行展平为一行 CSV,每个字段一列,可直接用于 Sheets、Excel 或 BI 工具。
法律与合规说明
抓取公开可用的网页在许多国家通常是合法的,但答案取决于你收集什么、你在哪里以及如何使用。在美国,关于公开数据抓取最常被引用的案例是 hiQ Labs v. LinkedIn。Scrapier 只返回任何访客无需登录就能看到的数据。房源上显示的房东名字是结果中唯一的个人信息,所以只收集你需要的。在 GDPR 及类似法律下,收集公开数据可能是允许的,但你存储和使用个人数据的方式仍必须符合当地数据保护规定,并且 Airbnb 的条款适用。如果你的使用场景涉及批量存储个人数据,请咨询法律顾问。这不是法律建议;请参阅我们的使用条款。
常见问题
有 Airbnb 价格报价页面 API 吗?
有。Scrapier 的 Airbnb 价格追踪爬虫 API 用一次 GET 请求和 X-API-Key 请求头,就能以 JSON 返回任何公开的价格报价页面。无需 Airbnb 应用或登录。
如何从 Python 调用?
对 <code>https://proxy.scrapier.io/api/v2/airbnb-price-tracker/</code> 使用 <code>requests.get</code>,带上 <code>params={'url': 'https://www.airbnb.com/rooms/569049214818933247'}</code> 和 <code>headers={"X-API-Key": KEY}</code>。读取 <code>r.json()["data"]["entries"]</code>。
调用失败时会怎样?
任何非 200 响应都免费。对 429 和 5xx 请退避重试;API 已经会重试上游故障。
多少钱?
每次成功调用 10 积分,在 Pro 套餐上每 1,000 页价格报价约 $1.58。失败的调用免费。
有 OpenAPI 规范吗?
有。获取它无需密钥,并且涵盖每个 Scrapier 端点。