Sessions
Create a persisted browser session
Creates a session: a sealed cookie jar and web-storage snapshot, pinned to one exit intent, that you reuse by passing its id as session_id on /v1/scrape.
Pitfalls:
- Every field is optional. An empty body (Content-Length 0) means "all defaults"; {} also works. Unknown fields are refused with 400.
- Sessions are single-writer. While a render holds the lease, a second scrape on the same session, and release/delete without force=true, get 409 ERR::SESSION::BUSY with a Retry-After. Serialise work per session, or create one session per concurrent worker.
- rotate_ip and sticky_key are mutually exclusive (400 ERR::REQUEST::INCOMPATIBLE_FLAGS). Omitting both pins the exit: sticky_key is derived from the session id.
- ttl_seconds above the organization's maximum is refused (400), never clamped. It slides on use but never past hard_expires_at.
- proxy_country requires premium_proxy: true. fingerprint is an advanced option and may be refused with 400.
- A project may hold only one active session per sticky_key (409 ERR::REQUEST::CONFLICT).
- An organization may hold at most 100 live sessions (429 ERR::LIMIT::SESSIONS_EXCEEDED, Retry-After 30).
- engine is optional (fetch, js or browser): omit it and the session's rendering is chosen for you. Scrapes with the session run on that tier, so a js session refuses actions, block_resources, a screenshot and a PDF (400 ERR::REQUEST::CAPABILITY_UNSUPPORTED).
post/v1/sessions
Request
- Base URL: https://api.spicrawl.com
- URL: https://api.spicrawl.com/v1/sessions
- Auth: HTTP bearer
Request body
Response
Session created. Use id as session_id on /v1/scrape. Read warnings for any decision made on your behalf (e.g. a reduced default TTL).
Example response
{
"id": "01J9ZQ4M7R3T8VX2K5N6P0B1CD"
}Changes
No recorded changes to this operation across all 1 revision of this API.