This endpoint is a wrapper around the session.scrape method that automatically starts a new session, goes to the given URL, and scrapes the page. Example:
from notte_sdk import NotteClient

client = NotteClient()
with client.Session() as session:
    session.execute({"type": "goto", "url": "https://www.google.com"})
    markdown = session.scrape(only_main_content=False)
With structured data:
from notte_sdk import NotteClient
from pydantic import BaseModel

# Define your Pydantic model
...

client = NotteClient()
with client.Session() as session:
    session.execute({"type": "goto", "url": "https://www.notte.cc"})
    data = session.scrape(
        response_format=Product,
        instructions="Extract the products names and prices"
    )

Parameters

scrape_images
bool
only_main_content
bool
only_images
bool
response_format
type[pydantic.main.BaseModel] | None
instructions
str | None

Returns

UnionType[str, StructuredData[BaseModel], list[ImageData]]: An Observation object containing metadata, screenshot, action space, and data space.