Create a browsing session
spicrawl_session_createCreate a session: a persistent browser identity (cookie jar, localStorage, a fixed rendering tier and, by default, a sticky exit IP) that survives across scrapes. Use it for multi-step flows — log in, then fetch pages behind the login — by passing the returned id as session_id to every spicrawl_scrape call that should share the state. The rendering tier is fixed for the session's lifetime and every scrape on the session runs on it. Leave engine out and one is chosen for you. Release the session with spicrawl_session_release when done. Returns the session object (id, engine, status, sticky_key, proxy, expires_at).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "spicrawl_session_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | Rendering tier fixed for the session's lifetime. Optional: leave it out and one is chosen for you. `fetch` is plain HTTP; `js` is JavaScript rendering and refuses `actions`, `block_resources`, screenshots and PDFs; `browser` is a full browser. | |
| rotate_ip | No | Coming soon: not available yet, do not send. Keep the cookie jar stable but rotate the managed-pool exit IP per request. Cannot combine with sticky_key. | |
| sticky_key | No | Coming soon: not available yet, do not send. Pin the managed-pool exit IP to this key; sessions sharing a key share an exit. Cannot combine with rotate_ip. | |
| fingerprint | No | Coming soon: not available yet, do not send. Browser fingerprint pin, stored verbatim. Needs a full-browser session (`engine: "browser"`). | |
| region_pool | No | Coming soon: not available yet, do not send. Managed-pool region to draw the exit from. | |
| ttl_seconds | No | Idle lifetime in seconds (min 30, default 1800; the organization's maximum is enforced, not clamped). | |
| domain_scores | No | Seed per-domain error scores (usually copied from a spicrawl_session_context dump). | |
| premium_proxy | No | Coming soon: not available yet, do not send. Use a residential managed-pool exit, exactly as on spicrawl_scrape. | |
| proxy_country | No | Coming soon: not available yet, do not send. ISO-3166 alpha-2 exit country; requires premium_proxy. | |
| session_context | No | Seed the session's state (cookies, storage) — e.g. the `session_context` object from spicrawl_session_context, to clone a session. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session id; pass it as `session_id` to spicrawl_scrape. | |
| lease | No | Present only while a scrape holds the session; release and delete are refused until it lapses unless `force`. | |
| proxy | No | The session's exit intent (never an IP or endpoint). | |
| engine | No | Rendering tier the session is bound to: fetch, js or browser. | |
| status | No | active, released or expired; derived from the clock, and only `active` sessions can be used. | |
| context | No | Size summary of the stored context (counts only, no secrets); null once the session is not active. | |
| retired | No | Why the session was taken out of service (expired, usage_exhausted, explicit); absent while usable. | |
| warnings | No | Decisions made on your behalf at creation, e.g. a TTL reduced to the organization maximum. | |
| created_at | No | Creation time, RFC 3339 UTC. | |
| expires_at | No | Current expiry (slides on use), RFC 3339 UTC. | |
| project_id | No | Project the session belongs to. | |
| sticky_key | No | Exit pin in use (empty when rotate_ip was set). | |
| fingerprint | No | Browser fingerprint, as stored. | |
| released_at | No | Release time, on released sessions, RFC 3339 UTC. | |
| usage_count | No | Successful scrapes that used the session. | |
| last_used_at | No | Last successful scrape, RFC 3339 UTC; null if never used. | |
| domain_scores | No | Per-domain standing, keyed by domain. Omitted when empty. | |
| hard_expires_at | No | Fixed ceiling the expiry never passes, RFC 3339 UTC. |