Quick Start
Scrape any URL in one line:quickstart.py
Scraping Methods
Notte provides two ways to scrape:| Method | Use Case |
|---|---|
client.scrape(url) | Quick, one-off scrapes |
session.scrape() | Scraping after navigation or authentication |
Quick Scrape
For simple scraping without session management:quick_scrape.py
Session-Based Scrape
For scraping after authentication or navigation:session_based.py
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:pydantic_model.py
Using Instructions Only
For flexible extraction without a strict schema:instructions_only.py
Extracting Lists
Extract multiple items from a page:extract_lists.py
Nested Structures
Handle complex, nested data:nested_structures.py
Image Extraction
Extract all images from a page:image_extraction.py
Configuration Options
Content Filtering
Control what content gets extracted:content_filtering.py
Links and Images
Control link and image extraction:links_and_images.py
Scoped Scraping
Scrape only a specific section of the page:scoped_scraping.py
Link Placeholders
Reduce output size by using placeholders:link_placeholders.py
Return Types
The scrape method returns different types based on parameters:| Parameters | Return Type |
|---|---|
| None | str (markdown) |
instructions | StructuredData[BaseModel] |
response_format | StructuredData[YourModel] |
only_images=True | list[ImageData] |
StructuredData Response
When using structured extraction:structured_data_response.py
Use Cases
Data Collection
Collect product information:data_collection.py
Content Monitoring
Track content changes:content_monitoring.py
Research and Analysis
Extract structured research data:research_analysis.py
Best Practices
1. Use Specific Instructions
Clear instructions improve extraction accuracy:specific_instructions.py
2. Define Precise Schemas
Match your schema to the actual page content:precise_schemas.py
3. Handle Missing Data
Use optional fields for data that might not exist:handle_missing_data.py
4. Scope Your Scrapes
Use selectors to focus on relevant content:scope_scrapes.py

