Skip to main content
Read the Notte skill 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.
Fetch extracts web page content as markdown or structured data using LLM-powered extraction. In the SDK this is scrape. In the console it is Fetch.

Quick Start

Extract structured data from a page:

Scraping Methods

Notte provides two ways to scrape:

Quick Scrape

For simple scraping without session management:

Session-Based Scrape

For scraping after authentication or navigation:

Structured Extraction

Extract data into typed Python objects using Pydantic models. The extraction is powered by an LLM that understands the page content and extracts the specified fields.

Using Pydantic Models

Define a schema and extract matching data:

Using Instructions Only

For flexible extraction without a strict schema:

Extracting Lists

Extract multiple items from a page:

Nested Structures

Handle complex, nested data:

Configuration Options

Content Filtering

Control what content gets extracted:
Control link extraction:

Scoped Scraping

Scrape only a specific section of the page:
Reduce output size by using placeholders:

Extraction Model

When you pass instructions or response_format, the extraction runs on the platform’s default model. Set model to use a different one, for example client.scrape(url, instructions="...", model="anthropic/claude-sonnet-4-5-20250929").

Return Types

The scrape method returns different types based on parameters: Pass raise_on_failure=False to get a StructuredData wrapper with success, error, and data fields instead.

Structured Response

When using structured extraction, the extracted data is returned directly:

Use Cases

Data Collection

Collect product information:

Content Monitoring

Track content changes:

Research and Analysis

Extract structured research data:

Best Practices

1. Use Specific Instructions

Clear instructions improve extraction accuracy:

2. Define Precise Schemas

Match your schema to the actual page content:

3. Handle Missing Data

Use optional fields for data that might not exist:

4. Scope Your Scrapes

Use selectors to focus on relevant content:

Next Steps

Browser Sessions

Learn about session management

Search

Find pages before you fetch them

Vaults

Store credentials for authenticated scraping

Functions

Deploy scraping as serverless functions

Multi-step extraction

Use client.scrape() for a single URL, or session.scrape() after navigation and authentication:
authenticated_scrape.py
Design the schema around the actual page content. Make fields optional when the source may omit them; request only data you need.
schema_design.py

Local Python extraction configuration

Install notte[llm] and set OPENROUTER_API_KEY for local structured extraction. The default model is google/gemini-3.5-flash-lite at https://openrouter.ai/api/v1. Cloud sessions use the platform’s server-side extraction configuration. For another OpenAI-compatible endpoint, set NOTTE_LLM_API_KEY and use the endpoint’s own model ID:
  • OpenAI: NOTTE_LLM_BASE_URL=https://api.openai.com/v1, NOTTE_LLM_MODEL=gpt-4o.
  • Gemini: NOTTE_LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai, NOTTE_LLM_MODEL=gemini-3.5-flash-lite.
  • Ollama/custom: NOTTE_LLM_BASE_URL=http://localhost:11434/v1, NOTTE_LLM_MODEL set to your local model, and NOTTE_LLM_API_KEY=ollama for an unauthenticated local server. Ollama is documented but has not been live-tested.
NOTTE_LLM_API_KEY takes precedence over OPENROUTER_API_KEY; the latter is only used at the default OpenRouter URL. Custom endpoints require an explicit model, supplied through NOTTE_LLM_MODEL or LlmExtractor(model=...). A model passed to extract(..., model=...) applies to that call only. NOTTE_LLM_TEMPERATURE defaults to 0.0, NOTTE_LLM_NB_RETRIES_STRUCTURED_OUTPUT to 2, and NOTTE_LLM_CONTEXT_TOKENS to 128000. Document clipping estimates four characters per token. The client uses a 60-second HTTP timeout and retries transient errors after 2 and 5 seconds. Typed extraction tries strict schemas, then JSON-object output with the schema in the prompt; if the endpoint rejects JSON-object mode as well, the schema stays in the prompt alone.