Pagination
List endpoints — /v1/search, /v1/listings/in/{city}, and friends — return
paged results. We return meta.has_more and a next_page_token; you pass
that token back as nextPageToken on the next request.
Response shape
{ "data": [ /* Array<Stay> */ ], "meta": { "count": 50, "limit": 50, "has_more": true, "next_page_token": "eyJzZWVuIjoyMTd9" }, "request_id": "req_abc"}next_page_token is opaque — treat it as a string token; we do not commit to
its internal structure.
Walking pages
import httpx
token = Noneall_rows = []while True: body = {"location": "Lisbon, Portugal", "filters": {"minBeds": 2}} if token: body["nextPageToken"] = token r = httpx.post( "https://api.stayingapi.com/v1/search", headers={"Authorization": "Bearer sk_live_..."}, json=body, timeout=60, ) j = r.json() all_rows.extend(j["data"]) if not j["meta"]["has_more"]: break token = j["meta"]["next_page_token"]
print(f"Got {len(all_rows)} stays")Limits
- Hard cap per single search query: 250 results (
maxItems). For larger result sets, walk pages withnextPageToken.