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

# scrape

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

Scrape a webpage directly (without session).

```ts theme={null}
const markdown = await client.scrape('https://www.notte.cc', { only_main_content: true });
const product = await client.scrape('https://www.notte.cc', { response_format: Product, instructions: 'Extract the product' });
```

With `response_format` or `instructions`, the extracted data is returned
directly and a failed extraction throws `ScrapeFailedError`. Pass
`raiseOnFailure: false` to receive the `StructuredData` wrapper instead.

```typescript theme={null}
NotteClient.scrape(url: string, options?: GlobalScrapeOptions<unknown> & { response_format?: undefined; instructions?: undefined | null; }): Promise<string>;
NotteClient.scrape<T>(url: string, options: GlobalScrapeOptions<T> & { response_format: ZodLikeSchema<T>; raiseOnFailure?: true; }): Promise<T>;
NotteClient.scrape<T>(url: string, options: GlobalScrapeOptions<T> & { response_format: ZodLikeSchema<T>; raiseOnFailure: false; }): Promise<StructuredData<T>>;
NotteClient.scrape(url: string, options: GlobalScrapeOptions<unknown>): Promise<ScrapeResult<unknown>>;
```

## Parameters (overload 1)

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

<ParamField body="options" type={"GlobalScrapeOptions<unknown> & { response_format?: undefined; instructions?: undefined | null }"} />

## Returns (overload 1)

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

## Parameters (overload 2)

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

<ParamField body="options" type={"GlobalScrapeOptions<T> & { response_format: ZodLikeSchema<T>; raiseOnFailure?: true }"} required />

## Returns (overload 2)

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

## Parameters (overload 3)

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

<ParamField body="options" type={"GlobalScrapeOptions<T> & { response_format: ZodLikeSchema<T>; raiseOnFailure: false }"} required />

## Returns (overload 3)

```typescript theme={null}
Promise<StructuredData<T>>
```

## Parameters (overload 4)

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

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

## Returns (overload 4)

```typescript theme={null}
Promise<ScrapeResult<unknown>>
```

## Related types

* [GlobalScrapeOptions](/typescript-sdk-reference/types/globalscrapeoptions)
* [ScrapeResult](/typescript-sdk-reference/types/scraperesult)
* [StructuredData](/typescript-sdk-reference/types/structureddata)
* [ZodLikeSchema](/typescript-sdk-reference/types/zodlikeschema)


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