1. Headless Scrapers vs Dedicated Hospitality Gateway
Self-hosted Playwright scrapers fail on bot challenges, geo-currency mismatches, and silent DOM changes.
| Operational Factor | HotelPrices API | Self-Hosted Playwright + Proxies |
|---|---|---|
| Cold Latency | 1.38s P50 (24ms warm cache) | 18–45s browser boot + render |
| Currency Normalization | Native ?currency=USD/EUR/GBP/JPY | Geo-IP proxy rotation required |
| Maintenance Effort | Zero — stable /v1/* JSON contract | Weekly CSS selector & anti-bot fixes |
| Cost / 100K Hotels | $8.00 (Business) – $20.00 (PAYG) | $120–$400+ residential proxy bandwidth |
Resolve Any Destination & Fetch Available Hotels
Use /v1/locations/search for niche towns, airports, or landmarks outside our top-50 pre-seeded city list.
curl -sS "https://api.hotelpricesapi.com/v1/locations/search?query=Kyoto" \
-H "x-api-key: hp_live_your_api_key"import requests
locs = requests.get(
"https://api.hotelpricesapi.com/v1/locations/search",
params={"query": "Kyoto"},
headers={"x-api-key": "hp_live_your_api_key"},
timeout=15,
).json()["data"]["items"]
print(locs[0]["location_id"], locs[0]["hotels_count"])const res = await fetch("https://api.hotelpricesapi.com/v1/locations/search?query=Kyoto", {
headers: { "x-api-key": "hp_live_your_api_key" },
});
console.log((await res.json()).data.items[0]);{
"code": 0,
"provider": "https://hotelpricesapi.com",
"status": "ok",
"data": {
"query": "Kyoto",
"items": [
{
"location_id": "eyJjaXR5X25hbWUiOiJLeW90byIsImNvdW50cnkiOiJKYXBhbiIsImRlc3RfaWQiOiItMjM1NDAyIiwiZGVzdF90eXBlIjoiY2l0eSJ9",
"dest_id": "-235402",
"dest_type": "city",
"name": "Kyoto",
"country": "Japan",
"country_code": "jp",
"hotels_count": 3920
}
]
},
"meta": {
"endpoint": "/v1/locations/search",
"credits_charged": 2,
"cached": true,
"took_ms": 19
}
}Interactive Hospitality Rate-Shopper Lab · GET /v1/locations/search
Verify live gateway latency, rate-sweep credit math & JSON schema
Frequently Asked Questions
- Can I call /v1/hotels/search without an API key from an autonomous AI wallet?
- Yes. Every /v1/* endpoint supports keyless Base Mainnet (eip155:8453) USDC x402 micropayments at $0.002/call with strict Query-Before-Settle ($0 settled on empty results).