Skip to main content
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:
With structured data:

Parameters

raise_on_failure
bool
default:"True"
selector
str | None
scrape_images
bool
only_main_content
bool
ignored_tags
list
only_images
bool
response_format
type[pydantic.main.BaseModel] | None
instructions
str | None

Returns

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