Skip to main content
Persistent profiles save cookies by default. You only need the cookie endpoints when transferring cookies between a profile and another system. For ordinary login reuse, start the same persistent profile. Use these endpoints on a stopped profile. To inspect or change cookies in a running browser, use your framework’s cookie API in the existing context.

Export

The response places the cookies in data.cookies. JSON export returns an array; export_format=netscape returns cookie-file text. Example JSON export, with a redacted value:
cookies_not_found means there are no stored cookies to export. cookies_disabled means cookie storage is disabled for the profile.

Import

For the import endpoint, send the serialized cookies in the cookies field:
The string can contain a serialized JSON cookie array or Netscape cookie text. Importing an expired cookie does not renew the website’s session. At profile creation, cookies also accepts an array:
Cookie values can grant access to signed-in accounts. Store exports securely and redact them from logs and support requests.

Sessions that will not stay logged in

Check the state restored by the next run: Service workers can also hold application state. Enable storage_options.serviceworkers if the site needs it. The storage options table lists all defaults.