B2B APIHotels
Stream Hotel Search Results
Search hotels with progressive Server-Sent Events (SSE) streaming.
Stream Hotel Search Results
Search for hotels using progressive Server-Sent Events streaming. Results arrive as suppliers respond, allowing you to display partial results immediately rather than waiting for all suppliers to finish.
Request
POST /v1/hotel/search/stream
Body:
| Field | Type | Required | Description |
|---|---|---|---|
destination | string | yes | City code (e.g., NYC) or coordinates. |
check_in | string | yes | ISO-8601 date (e.g., 2026-06-24). |
check_out | string | yes | ISO-8601 date. |
guests | object | yes | { adults, children?, rooms? } |
currency | string | no | ISO-4217. Defaults to org currency. |
filters | object | no | Star rating, price range, amenities. |
Streaming Response
Each SSE event is a JSON ApiResponse. The stream ends when all suppliers have responded.
event: result
data: {"success": true, "data": { "hotel": {...} }}
event: result
data: {"success": true, "data": { "hotel": {...} }}
event: complete
data: null
Try it
Sandbox-only. Try-it requests target
https://cloud.vanitypass.com with X-Environment: Sandbox. No real bookings or charges. Production access: contact us.POST
/v1/hotel/search/streamSandbox credentials
Keys never leave your browser — they are sent only to cloud.vanitypass.com with X-Environment: Sandbox.
curl -X POST 'https://cloud.vanitypass.com/v1/hotel/search/stream' \
-H 'Content-Type: application/json' \
-H 'X-Environment: Sandbox' \
-d '{"destination":"NYC","check_in":"2026-07-01","check_out":"2026-07-03","guests":{"adults":2,"rooms":1}}'