Browser Scraper

v0.8.3
io.github.eurafaeldecarvalho/browser-scraper Checked 2 days ago Published 1 month ago

Stealth Chrome for AI agents: bot-protected sites, Turnstile, closed Shadow DOM, clean Markdown.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

navigate

Open a URL in the stealth browser and return the page snapshot (accessibility outline with [ref=…] on interactive elements). Best for: starting a browsing task, sites behind Cloudflare/bot checks. Not for: fetching many URLs in bulk (use scrape).

ParameterTypeDescription
url *stringAbsolute http(s) URL.
waitUntilstring

snapshot

Accessibility snapshot of the current page: roles, names and [ref=…] for interactive elements, including elements inside closed shadow DOM and cross-origin iframes. Refs are valid until the next snapshot. Set interactiveOnly for a short list of what can be clicked/typed.

ParameterTypeDescription
interactiveOnlyboolean

click

Click an element by ref with human-like mouse movement. Returns the updated snapshot.

ParameterTypeDescription
ref *stringElement ref from the latest snapshot, e.g. "e12".
elementstringHuman-readable description of the element (for logs).

type

Type text into an element by ref with human-like keystrokes. Use {{SECRET_NAME}} placeholders for credentials configured on the server — never ask the user for raw secrets. Set submit to press Enter afterwards.

ParameterTypeDescription
ref *stringElement ref from the latest snapshot, e.g. "e12".
text *string
clearbooleanClear the field first.
submitboolean

press_key

Press a keyboard key on the focused element (e.g. Enter, Escape, Tab, ArrowDown).

ParameterTypeDescription
key *string

go_back

Go back in history.

wait

Wait for a number of seconds (max 30), e.g. for a slow page or a challenge to clear. Returns the snapshot.

ParameterTypeDescription
seconds *number

markdown

Read the current page as clean Markdown (main content only by default; includes closed shadow DOM). Best for: articles, docs, product pages — far fewer tokens than a snapshot. Pass `query` to keep only the relevant sections.

ParameterTypeDescription
includeIframesboolean
linksstring
mainContentboolean
querystringKeep only blocks relevant to this query.

metadata

Structured metadata of the current page: title, description, canonical, OpenGraph, Twitter card and JSON-LD (schema.org: products, prices, articles…).

screenshot

PNG screenshot of the current page (viewport, or full page).

ParameterTypeDescription
fullPageboolean

solve_turnstile

Solve an interactive Cloudflare Turnstile checkbox on the current page with human-like input. Use when the snapshot shows a Cloudflare challenge.

scrape

One-shot fetch of a URL as Markdown (+ metadata), escalating automatically: plain HTTP → stealth browser → browser with Turnstile solving. Best for: reading a page you don't need to interact with. Does not change the current tab.

ParameterTypeDescription
url *string
formatsarray
querystringKeep only blocks relevant to this query.
strategystring

check_egress

Report the browser's exit IP, ASN/org, country and whether it looks like a datacenter (the #1 reason sites block). Useful before debugging blocks.