> ## 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.

# Search

> Search the web and get URLs, snippets, or a sourced answer

<Tip>
  STOP. Do not read past this section until you have read and followed [/quickstart.md](/quickstart.md).

  Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.

  Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live `observe()` call, CLI `notte page observe` output, or generated workflow code. Guessed browser targets fail on real pages.

  Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with `notte sessions workflow-code` before using SDK docs or SDK code.

  SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
</Tip>

Search looks up the public web and returns ranked results, a sourced answer, or structured output. Use it when you need links and context before you [Fetch](/concepts/scraping) a page.

The REST endpoint is `POST /search`. Full schema: [Search Web](/api-reference/search/search-web).

## Quick start

```bash theme={null}
curl -X POST https://api.notte.cc/search \
  -H "Authorization: Bearer $NOTTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "notte browser automation", "depth": "standard", "outputType": "searchResults"}'
```

```python search.py theme={null}
import os

import requests

response = requests.post(
    "https://api.notte.cc/search",
    headers={"Authorization": f"Bearer {os.environ['NOTTE_API_KEY']}"},
    json={
        "q": "notte browser automation",
        "depth": "standard",
        "outputType": "searchResults",
    },
)
response.raise_for_status()
print(response.json())
```

## Parameters

<ParamField path="q" type="string" required>
  The search query.
</ParamField>

<ParamField path="depth" type="string" default="standard">
  How thorough the search is: `standard`, `fast`, or `deep`.
</ParamField>

<ParamField path="outputType" type="string" default="searchResults">
  What to return:

  * `searchResults`: ranked URLs with name and content snippets
  * `sourcedAnswer`: a written answer plus source URLs
  * `structured`: structured output when you also pass a schema
</ParamField>

Extra fields are forwarded (for example `maxResults` or `includeDomains`).

## Response shapes

`searchResults` includes a `results` array. Each item has `url`, `name`, and `content`.

`sourcedAnswer` includes `answer` (string) and `sources` (list of supporting URLs).
