> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# get_cookies

> Gets cookies from the session

<Tip>
  Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.
</Tip>

```python theme={null}
import json
cookies = session.get_cookies() # get the cookies from the session
with open("cookies.json", "w") as f:
    json.dump(cookies, f) # save the cookies to a json file
```

## Returns

`list`\[[`CookieDict`](/sdk-reference/misc/cookiedict.md)]: The response containing the list of cookies in the session.

## Raises

* `ValueError`: If the session hasn't been started yet (no session\_id available).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.