Extraction actions retrieve information from web pages using LLM-powered extraction or visual snapshots.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/browser-use/browser-use/llms.txt
Use this file to discover all available pages before exploring further.
extract
Use an LLM to extract structured or free-text data from the current page’s markdown content.Description of what data to extract from the page
Set to
True if the query requires URLs/links, False to save tokensCharacter position to start extraction from. Use this for long pages when previous extraction was truncated.Note: This is a character offset in the markdown content, NOT an element index from browser_state.
Optional JSON Schema dictionary. When provided, extraction returns validated JSON matching this schema instead of free-text.See Structured Output Example
Free-text Extraction Example
Structured Extraction Example
When to use extract:
- You’re on the right page
- You know what data to extract
- You haven’t called extract before on the same page for the same query
- Cannot extract interactive elements (use browser_state for that)
- Large content may be truncated (use
start_from_charto continue)
browser_use.tools.service:951
screenshot
Take a screenshot of the current viewport.Optional filename to save the screenshot. If provided, saves to file and returns the path.If omitted, the screenshot will be included in the next browser_state observation.Supported format: PNG (
.png extension added automatically)Save to File Example
Include in Observation Example
browser_use.tools.service:1387
search_page
Search page text for a pattern instantly with zero LLM cost (like grep).Text or regex pattern to search for in page content
Treat pattern as regex (default: literal text match)
Case-sensitive search (default: case-insensitive)
Characters of surrounding context per match
CSS selector to limit search scope (e.g.,
"div#main")Maximum matches to return
Example
Zero LLM cost - This action executes JavaScript directly in the browser for instant results.
browser_use.tools.service:1169
find_elements
Query DOM elements by CSS selector instantly with zero LLM cost.CSS selector to query elements (e.g.,
"table tr", "a.link", "div.product")Specific attributes to extract (e.g.,
["href", "src", "class"]).If not set, returns tag and text only.Maximum elements to return
Include text content of each element
Example
browser_use.tools.service:1206
Related Actions
- Navigation Actions - Navigate between pages
- Interaction Actions - Interact with elements