browser_extract_site
POST /api/execute/browser_extract_siteLaunches 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
| Name | Type | Required | Description |
|---|---|---|---|
| context_id | string | yes | Workspace session utilized to initialize and execute the asynchronous multi-document crawl worker. |
| url | string | yes | Initial seed web address where breadth-first link discovery and content harvesting begin. |
Optional Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| depth | string | no | Maximum link-hop distance from the seed address that the crawler is permitted to traverse. |
| max_pages | string | no | Hard upper limit on total routes visited and harvested before terminating the job. |
| follow_external | boolean | no | Boolean switch permitting traversal onto external hostnames outside the seed domain. |
| output_format | enum (markdown | text | json) | no | Target serialization format ('markdown', 'text', or 'json') applied to every harvested route. |
| include_images | boolean | no | Boolean option to retain resolved image source URLs within the extracted payloads. |
| include_metadata | boolean | no | Boolean option to attach title, canonical URL, and meta description fields. |
| exclude_patterns | string | no | JSON array of glob pattern strings matching route paths or URLs to skip during crawling. |
| timeout_per_page | string | no | Maximum milliseconds allotted for each individual navigation and render pass. |
Usage
result = await browser.extract_site(context_id=context_id, url="https://example.com")