> For the complete documentation index, see [llms.txt](https://docs.scanner.dev/scanner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/beta-features/jupyter-notebooks/getting-started-with-jupyter-notebooks.md).

# Getting Started with Jupyter Notebooks

The fastest way to get started is to install the **JupyterLab Desktop** app locally on your computer, and install the **Scanner Python SDK** into your Jupyter noteboo&#x6B;**.**

## Step 1: Download JupyterLab Desktop

Simply download and run the appropriate installer for your OS. You can find [download links on the GitHub page here](https://github.com/jupyterlab/jupyterlab-desktop?tab=readme-ov-file#installation).

## Step 2: Create or open a notebook

Open up the **JupyterLab Desktop** app. It is often useful to create a directory where you plan to edit your notebooks. Open up that directory in the app, and then create a notebook file.

## Step 3: Install the Scanner Python SDK

Run the following command to install the [Scanner Python SDK](https://pypi.org/project/scanner-client/):

```
pip install scanner-client
```

## Step 4: Import and configure the Scanner API Client

In your Jupyter notebook, run this command to import the Scanner API client:

```python
from scanner_client import Scanner
```

In the Scanner UI, visit **Settings** and copy-paste your API URL and API key. We recommend adding them to environment variables like `SCANNER_API_URL` and `SCANNER_API_KEY`.

Once that is done, you can create the Scanner API client in your Jupyter notebook:

```python
scanner = Scanner(
    api_url=os.environ["SCANNER_API_URL"],
    api_key=os.environ["SCANNER_API_KEY"],
)
```

You are now ready to execute queries and perform investigations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/beta-features/jupyter-notebooks/getting-started-with-jupyter-notebooks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
