Airbnb Search API
Search Airbnb listings by location and dates with optional price, beds/bedrooms/bathrooms, and guest-party filters and get results (name, total-stay price label, rating, host) as normalized JSON.
按用量计费;执行前先报价
公开 ID: commerce.airbnb.search · 版本 1
定价
按用量计费;执行前先报价
已发布的计价规则
费率和条件按已发布规则展示,报价与最终费用由服务端计算。
{
"charge_on": "success",
"components": [
{
"id": "base",
"metric": "call",
"mode": "fixed",
"per": "1",
"unit_price": "0.00009"
},
{
"id": "results",
"limit_field": "limit",
"max_quantity": "20",
"metric": "result_count",
"mode": "unit",
"per": "1",
"unit_price": "0.00165"
}
],
"currency": "USD",
"schema_version": 2,
"scope": "run"
}快速开始
使用 API 密钥发现此工具,再通过返回的 provider 和 endpoint 检查接口后执行。
将 GLOOP_API_BASE 设为 API 地址,GLOOP_API_KEY 设为服务端密钥。
curl
curl --fail-with-body "${GLOOP_API_BASE%/}/v1/discover" \
-H "Authorization: Bearer $GLOOP_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"limit": 5,
"query": "Airbnb Search"
}'Python
import os, json, urllib.request
url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/discover"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n \"limit\": 5,\n \"query\": \"Airbnb Search\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
print(json.load(response))Node.js
const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/discover";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
"limit": 5,
"query": "Airbnb Search"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());工具 API 文档 · POST /v1/inspect输入结构
{
"additionalProperties": false,
"properties": {
"adults": {
"description": "Number of adult guests (e.g. 2).",
"minimum": 1,
"type": "integer"
},
"checkIn": {
"description": "Check-in date in YYYY-MM-DD format (e.g. 2026-07-01).",
"type": "string"
},
"checkOut": {
"description": "Check-out date in YYYY-MM-DD format (e.g. 2026-07-05).",
"type": "string"
},
"children": {
"description": "Number of child guests (e.g. 1).",
"minimum": 0,
"type": "integer"
},
"currency": {
"description": "Currency code for prices (e.g. EUR).",
"enum": [
"USD",
"CZK",
"AUD",
"BRL",
"BGN",
"CAD",
"CLP",
"CNY",
"COP",
"CRC",
"HRK",
"DKK",
"EGP",
"AED",
"EUR",
"GHS",
"HKD",
"HUF",
"INR",
"IDR",
"ILS",
"JPY",
"KZT",
"KES",
"MYR",
"MXN",
"MAD",
"TWD",
"NZD",
"NOK",
"PEN",
"PHP",
"PLN",
"GBP",
"QAR",
"RON",
"SAR",
"SGD",
"ZAR",
"KRW",
"SEK",
"CHF",
"THB",
"TRY",
"UGX",
"UAH",
"UYU",
"VND"
],
"type": "string"
},
"infants": {
"description": "Number of infant guests (e.g. 1).",
"minimum": 0,
"type": "integer"
},
"limit": {
"description": "Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less.",
"maximum": 20,
"minimum": 1,
"type": "integer"
},
"location": {
"description": "Location to search listings in (e.g. London).",
"type": "string"
},
"minBathrooms": {
"description": "Minimum number of bathrooms (e.g. 2).",
"minimum": 0,
"type": "integer"
},
"minBedrooms": {
"description": "Minimum number of bedrooms (e.g. 2).",
"minimum": 0,
"type": "integer"
},
"minBeds": {
"description": "Minimum number of beds (e.g. 2).",
"minimum": 0,
"type": "integer"
},
"pets": {
"description": "Number of pets; only pet-friendly listings are returned when set (e.g. 1).",
"minimum": 0,
"type": "integer"
},
"priceMax": {
"description": "Maximum search price in the selected currency (e.g. 300).",
"minimum": 0,
"type": "integer"
},
"priceMin": {
"description": "Minimum search price in the selected currency (e.g. 50).",
"minimum": 0,
"type": "integer"
}
},
"required": [
"location",
"limit"
],
"title": "Airbnb search input",
"type": "object"
}输出结构
{
"type": "object"
}