browser_extract_site

Summary: Browser Extract SitePOST /api/execute/browser_extract_site

Launches an asynchronous, breadth-first website crawler that traverses links from a seed address and compiles multi-document content. Because rendering and harvesting dozens of JavaScript-heavy views takes time, the endpoint schedules a background worker task and immediately returns a tracking `job_id`. That non-blocking design ensures the caller never suffers HTTP socket timeouts during deep crawls. The worker respects configurable hop depth limits, total document caps, per-route render timeouts, and glob exclusion filters such as skipping `/login` or `/admin/*` paths. Each visited route is rendered inside the engine and converted into Markdown, plain text, or structured JSON. Optional flags control whether resolved image source links and OpenGraph or meta description fields are embedded in the resulting corpus. Callers monitor progress and retrieve results using the companion job endpoints.

Parameters

Required Parameters

NameTypeRequiredDescription
context_idstringyesWorkspace session utilized to initialize and execute the asynchronous multi-document crawl worker.
urlstringyesInitial seed web address where breadth-first link discovery and content harvesting begin.

Optional Parameters

NameTypeRequiredDescription
depthstringnoMaximum link-hop distance from the seed address that the crawler is permitted to traverse.
max_pagesstringnoHard upper limit on total routes visited and harvested before terminating the job.
follow_externalbooleannoBoolean switch permitting traversal onto external hostnames outside the seed domain.
output_formatenum (markdown | text | json)noTarget serialization format ('markdown', 'text', or 'json') applied to every harvested route.
include_imagesbooleannoBoolean option to retain resolved image source URLs within the extracted payloads.
include_metadatabooleannoBoolean option to attach title, canonical URL, and meta description fields.
exclude_patternsstringnoJSON array of glob pattern strings matching route paths or URLs to skip during crawling.
timeout_per_pagestringnoMaximum milliseconds allotted for each individual navigation and render pass.

Usage

result = await browser.extract_site(context_id=context_id, url="https://example.com")

See Also