Skip to main content
Read the browser’s cookie jar directly, seed a session cookie, or clear a context’s jar — lighter than exporting a full storage state when all you need is the cookies. CLI and cURL examples use $RT and browser b1 (Sessions).

Read and set cookies

cookies returns {cookies, count} — each entry {name, value, domain, path, expires, secure, httpOnly, sameSite} — for the default context, one context_id’s jar, or cookies visible to one url. set_cookie writes one cookie; scope it with url (preferred — derives domain/path) or a context_id, and pass attrs for the rest — domain, path, expires, secure, httpOnly, sameSite — all string values, e.g. {"secure": "true", "sameSite": "Lax"}.
Cookies inside an isolated context never appear in the default jar — pass its context_id to work that jar instead. To carry a whole session (cookies plus origins) across runtimes, export a storage state; to carry the entire browser state, export a profile.