Skip to content
StayingAPI
Docs

Pagination, rate limits & jobs

The cross-cutting mechanics: one-page list responses, per-plan rate-limit headers, the /v1 versioning policy, and the 202 → jobId async pattern for long scrapes.

Pagination

List endpoints return one page per call: /search returns up to limit (max 40) results per platform and /reviews up to limit (max 100) reviews. There are no further pages: ask for the size you need with limit.

  • meta.pagination on a synchronous list response is { limit, cursor: null, nextCursor: null, hasMore: false }. Single-object endpoints and async job results carry pagination: null.
  • Passing a cursor is a free 400 invalid_cursor. (Earlier responses offered a nextCursor, but following it repeated the same call and charged again; it is no longer issued.)
  • limit out of range → 400 limit_out_of_range.
One page per call
# One call, one page: ask for what you need with limit
GET /v1/reviews?platform=booking&listingId=abramovic2&limit=50

# → meta.pagination = { "limit": 50, "cursor": null, "nextCursor": null, "hasMore": false }

Rate limits

Two independent token-bucket namespaces: REST is metered per API key; MCP is metered per user. Both are sized by your plan’s rate_limit_per_min and are independent of credits — a request can be rate-limited (429) before any credit logic runs, and 429 is always 0 credits. Read your own limit from code via GET /v1/account (rateLimit.requestsPerMinute).

PlanRequests / min
Free / Sandbox30
Starter60
Pro120
Scale300
EnterpriseCustom

Every response — success and error — advertises the bucket state:

Rate-limit headers
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 117
X-RateLimit-Reset: 1782000060
# On 429 only:
Retry-After: 7

Back off on 429

Async jobs — the 8-second rule

If a live scrape is projected to run longer than ~8 seconds, the request returns 202 with a jobId instead of blocking — in practice that means most live calls run asynchronously. Poll /v1/jobs/{jobId} (free) until data.status is completed, then read the payload from data.result. Cache hits and the sandbox are always served synchronously and never produce a 202. Credits are charged once, on the job’s successful completion — never on the 202 or a poll.

estimatedSeconds is how long this kind of job usually takes (about 9 in 10 finish within it), not a deadline. Poll until the job is completed or failed; a job can run several minutes (Booking.com up to about 4). Honour the Retry-After the poll returns rather than busy-looping. The SDK auto-polls a 202 to completion — its maxWaitMs defaults to 600s (10 min), enough to wait out a slow scrape; raise it for exceptionally slow searches.

Versioning

  • URI versioning. The major version is the first path segment: /v1 — never a header or query param.
  • Additive changes ship in place under /v1: new endpoints, new optional params, new response fields, new enum values, new error sub-codes. Clients must tolerate unknown fields.
  • Breaking changes go to /v2 and run in parallel. Deprecations get 6 months’ notice, a Sunset header and a changelog entry.

The full contract — everything guaranteed within /v1, what changes additively, what is breaking, deprecation and pricing-change notice — is on the API stability & versioning page.