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

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

[Source: node-sdk/src/client.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/client.ts)

Search the public web (`POST /search`). Returns ranked results by default,
an answer with sources with `outputType: 'sourcedAnswer'`, or structured
output with `outputType: 'structured'`.

```ts theme={null}
import { NotteClient } from 'notte-sdk';

const client = new NotteClient();
const { results } = await client.search('notte browser agents');
const { answer } = await client.search('what is notte?', { outputType: 'sourcedAnswer' });
```

```typescript theme={null}
NotteClient.search(query: string, options?: SearchOptions & { outputType?: "searchResults"; }): Promise<SearchResultsResponse>;
NotteClient.search(query: string, options: SearchOptions & { outputType: "sourcedAnswer"; }): Promise<SearchSourcedAnswerResponse>;
NotteClient.search(query: string, options: SearchOptions & { outputType: "structured"; }): Promise<SearchStructuredResponse>;
NotteClient.search(query: string, options: SearchOptions): Promise<SearchResponse>;
```

## Parameters (overload 1)

<ParamField body="query" type={"string"} required />

<ParamField body="options" type={"SearchOptions & { outputType?: 'searchResults' }"} />

## Returns (overload 1)

```typescript theme={null}
Promise<SearchResultsResponse>
```

## Parameters (overload 2)

<ParamField body="query" type={"string"} required />

<ParamField body="options" type={"SearchOptions & { outputType: 'sourcedAnswer' }"} required />

## Returns (overload 2)

```typescript theme={null}
Promise<SearchSourcedAnswerResponse>
```

## Parameters (overload 3)

<ParamField body="query" type={"string"} required />

<ParamField body="options" type={"SearchOptions & { outputType: 'structured' }"} required />

## Returns (overload 3)

```typescript theme={null}
Promise<SearchStructuredResponse>
```

## Parameters (overload 4)

<ParamField body="query" type={"string"} required />

<ParamField body="options" type={"SearchOptions"} required />

## Returns (overload 4)

```typescript theme={null}
Promise<SearchResponse>
```

## Related types

* [SearchOptions](/typescript-sdk-reference/types/searchoptions)
* [SearchResponse](/typescript-sdk-reference/types/searchresponse)
* [SearchResultsResponse](/typescript-sdk-reference/types/searchresultsresponse)
* [SearchSourcedAnswerResponse](/typescript-sdk-reference/types/searchsourcedanswerresponse)
* [SearchStructuredResponse](/typescript-sdk-reference/types/searchstructuredresponse)


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