zenrows-mcp
v2.19.1Zenrows MCP server: Fetch, Extract, Batch, and Browser Sessions for AI agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
account_signup_answer
Answer the question Zenrows asks before it creates a free account. Use it only when another Zenrows tool reports a signup question: answer that question yourself and pass the answer here. On success the API key is stored and you can retry the original tool call.
| Parameter | Type | Description |
|---|---|---|
answer * | string | Your answer to the signup question, as plain text. |
scrape
Scrape any webpage and return its content using Zenrows (Fetch). Returns full-page content (markdown/HTML/PDF/screenshot). For structured JSON fields (products, articles, listings), the extract tool returns parsed fields instead of a full page body. By default the request uses automatic mode (mode=auto): Zenrows adds JS rendering or premium proxies per page only when a plain request does not return the page, and charges only for the configuration that succeeds. Pass just the URL. Set js_render or premium_proxy only to force a fixed configuration. Doing so switches off automatic mode, and ev…
| Parameter | Type | Description |
|---|---|---|
url * | string | The webpage URL to scrape |
autoparse | boolean | null | Deprecated: general-purpose structured JSON from the page. Prefer the extract tool (extract=auto on a prepared domain, or css_extractor). |
css_extractor | string | null | Extract specific elements using CSS selectors. JSON object mapping names to selectors, e.g. '{"title":"h1","price":".price-tag"}'. Returns JSON instead of full page content. |
js_instructions | string | null | JSON array of browser interactions to run before scraping. Works in automatic mode (mode=auto), which then renders the page and bills it at the JS rendering rate, or with js_render=true. Example: [{"c… |
js_render | boolean | null | Force JavaScript rendering on every request. Overrides automatic mode (mode=auto), which already renders JavaScript when a page needs it. Leave unset unless you need a fixed configuration. |
outputs | string | null | Comma-separated list of data types to extract as structured JSON. Available: emails, headings, links, menus, images, videos, audios. Use '*' for all types. Returns JSON instead of full page content. |
premium_proxy | boolean | null | Force premium residential proxies on every request (10x credit cost). Overrides automatic mode (mode=auto), which already uses premium proxies when a page needs them. Leave unset unless you need a fix… |
proxy_country | string | null | Country for geo-targeted scraping. ISO 3166-1 alpha-2 code (e.g. 'US', 'GB', 'DE'). Works in automatic mode (mode=auto); if you set js_render without premium_proxy, it requires premium_proxy=true. |
response_type | Output format. 'markdown' (default) preserves structure and is ideal for LLMs. 'plaintext' strips all formatting for pure text extraction. 'pdf' returns a PDF of the page. 'html' returns the raw HTML… | |
screenshot | boolean | null | Capture an above-the-fold screenshot of the page. Returns an image instead of text content. Useful for visual verification or debugging. |
screenshot_fullpage | boolean | null | Capture a full-page screenshot including content below the fold. Returns an image instead of text content. |
screenshot_selector | string | null | Capture a screenshot of a specific element using a CSS selector. Example: ".product-card". Returns an image instead of text content. |
wait | Milliseconds to wait after page load before capturing content. Max 30000 (30s). Requires js_render=true; without it, including in automatic mode, it may be ignored. | |
wait_for | string | null | CSS selector to wait for before capturing. Use when key content loads after the initial page render. Requires js_render=true; without it, including in automatic mode, it may be ignored. |
extract
Extract structured data from a webpage via Zenrows. Returns JSON fields (products, articles, listings) in "data" rather than a full page body. Set include_html to also get the page HTML. Modes: - auto (default): extract=auto, site-tailored Extract (currently free, billing may apply later). Works on any prepared domain, with any API key. Error REQS007 says why in "reason": - domain_not_prepared: call prepare_domain with the domain and 1 to 5 example URLs (one works; we recommend 3 or more of the same page type; a few minutes, no credits), poll prepared_domain_status about every…
| Parameter | Type | Description |
|---|---|---|
url * | string | The webpage URL to extract from |
css_extractor | string | null | Required when mode=css. JSON map of field→selector, e.g. '{"title":"h1","price":".price"}' |
fallback_autoparse | boolean | null | Deprecated, has no effect: Extract no longer falls back to autoparse. Prepare the domain with prepare_domain instead. |
include_html | boolean | null | mode=auto only: also return the full page HTML. Default false; the HTML is most of the response size. |
js_render | boolean | null | Force JS rendering on every request. Overrides automatic mode (mode=auto), which already renders when needed. |
mode | Extraction mode: auto (extract=auto, default), css (requires css_extractor), or the deprecated autoparse | |
mode_auto | boolean | null | Automatic mode (mode=auto) is on by default; leave unset. False sends a plain request without it. |
premium_proxy | boolean | null | Force premium residential proxies on every request (10x cost). Overrides automatic mode (mode=auto), which already uses premium proxies when a page needs them. |
proxy_country | string | null | ISO 3166-1 alpha-2 country code. Works in automatic mode (mode=auto); with js_render or mode_auto=false it requires premium_proxy. |
wait | Milliseconds to wait after load. Requires js_render=true; without it, including in automatic mode, it may be ignored. | |
wait_for | string | null | CSS selector to wait for before extracting. Requires js_render=true; without it, including in automatic mode, it may be ignored. |
prepare_domain
Prepare a domain so extract (mode=auto) works on it. Use this when extract returns error REQS007 with reason domain_not_prepared. Send the domain (the host, e.g. shop.example.com; a leading www. is dropped, and each host is prepared separately) and 1 to 5 example URLs of real pages you want extracted. One works; we recommend 3 or more of the same page type, so pass 3 or more when you can, up to 5 (e.g. 3 product pages: https://www.example.com/products/a, /products/b and /products/c), because Extract compares pages of one type to check the fields it found and fill in fields one page is missing…
| Parameter | Type | Description |
|---|---|---|
domain * | string | The host to prepare, e.g. shop.example.com (a URL is accepted; a leading www. is dropped) |
example_urls * | array | 1 to 5 full URLs of real pages on this domain that you want to extract. One works; we recommend 3 or more of the same page type when you can |
idempotency_key | string | null | Optional. Resending the same key with the same body returns the original submission |
prepared_domain_status
Check a domain submitted with prepare_domain, and the account's monthly allowance. Returns status (preparing, ready or failed), state (the current step), roles (one per page kind), a failure code and detail when it failed, the allowance (used, limit, remaining) and "next": what to do now. Poll about every 30 seconds; preparation takes a few minutes. Call extract again once status is "ready". Costs no credits.
| Parameter | Type | Description |
|---|---|---|
domain * | string | The domain passed to prepare_domain, e.g. example.com |
batch_create
Submit a Batch job: many URLs scraped asynchronously in the cloud (Zenrows Batch API). Suited to large URL lists; scrape and extract handle single pages. Not the same as browser_batch. Tasks use automatic mode (mode=auto) by default: Zenrows enables JS rendering and premium proxies only on the pages that need them. Pass just the URLs. Set js_render or premium_proxy (job-level, or per task) only to force a fixed configuration; that turns automatic mode off for those tasks. Cost: the same credits as the regular API, per successful task: 1 for a basic request, 5 with js_render, 10 with premium_…
| Parameter | Type | Description |
|---|---|---|
idempotency_key | Sent as the Idempotency-Key header, up to 128 characters; generated per call when unset. Reusing a key with the identical request within 24 hours returns the original response instead of doing it agai… | |
js_render | boolean | null | Force js_render on all tasks (5 credits each). Overrides automatic mode (mode=auto), which already renders when needed. |
mode_auto | boolean | null | Automatic mode (mode=auto) is on by default; leave unset. False sends plain requests without it. |
premium_proxy | boolean | null | Force premium_proxy on all tasks (10 credits each, 25 with js_render). Overrides automatic mode (mode=auto), which already uses premium proxies when a page needs them. |
proxy_country | string | null | Job-level ISO country code. Works in automatic mode (mode=auto); with js_render alone it requires premium_proxy. |
response_type | Job-level output format. Leave unset for the raw HTML, the default. | |
tasks | Tasks (each needs a url), up to 100,000. Prefer this over urls when you need per-task params. | |
urls | Shorthand: list of URLs (converted to tasks), up to 100,000. Ignored when tasks is provided. | |
wait | boolean | null | If true, poll before returning until the run ends or pauses, or wait_timeout passes; a timeout returns the current state with ok:true |
wait_timeout | Max wait in seconds when wait=true (default 50). Many MCP clients cancel a call after 60 s. | |
wait_timeout_ms | Deprecated: the same wait in milliseconds. Use the seconds parameter instead. | |
zenrows_params | Additional job-level scrape params merged with the flags above. Accepted: allowed_status_codes, autoparse, block_resources, css_extractor, custom_headers, extract, extract_fields, js_instructions, js_… |
batch_status
Get a Batch job's latest run: job_id, run_id, status (pending, running, completed, stopped, failed), stats (total, completed, successful, failed) and the job. A failed run answers ok:false with error.code BATCH_INSUFFICIENT_CREDITS, BATCH_KEY_CAP_REACHED, AUTH_INVALID (subscription_inactive) or BATCH_RUN_FAILED, error.server_code (the failure_reason) and failure_detail; batch_rerun recovers it once fixed. A paused run has paused:true; one still writing its tasks has ingesting:true.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
batch_wait
Poll a Batch job until its run ends (completed, stopped or failed) or pauses, and return its status and stats like batch_status. If the wait runs out first, it returns the current state with ok:true, timed_out:true and a note: call batch_wait again. A paused run returns at once with paused:true (it does not move until batch_resume). A failed run answers ok:false with error.code and server_code (insufficient_credits, subscription_inactive or api_key_cap_reached). Transient poll errors are retried. A call that carries a progressToken gets a progress notification after each poll.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
timeout | Max wait in seconds (default 50). Many MCP clients cancel a call after 60 s. | |
timeout_ms | Deprecated: the same wait in milliseconds. Use the seconds parameter instead. |
batch_results
List a Batch run's result rows, a page at a time: up to limit rows (default 100, max 1000) and next_cursor. Pass next_cursor back as cursor to continue; it is null once every row was read. Each row has task_id, external_id, url, metadata, status (successful, failed, pending, processing, expired), type, result_url when successful, and error when failed. A result_url is presigned and expires after 2 hours: call batch_results again for a fresh one, or read the body with batch_content. Results are kept 14 days by default; after that a successful row reads as status "expired", with no result_url,…
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
cursor | string | null | next_cursor from a previous batch_results call |
limit | Max rows to return (default 100, max 1000) | |
run_id | An earlier run's id (from batch_status or batch_rerun). Default: the job's latest run. | |
status | Filter rows by status (default all). processing = tasks not finished yet. successful also returns expired rows. |
batch_content
Read one Batch task's stored result, by job_id and task_id (from batch_results). A text result (HTML, Markdown, plain text, JSON) comes back inline, cut to max_chars (default 20000); a final note says when it was cut. A binary result (a PDF) is not inlined: the reply gives its result_url, presigned for 2 hours. Finding that URL reads the run's results; on a large run one call may run out of time first and answer with lookup_cursor: call batch_content again with it to go on. BATCH_TASK_NOT_READY: the task has not finished; BATCH_TASK_FAILED: it failed (task_error holds its error); BATCH_RESULT…
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
task_id * | string | task_id from a batch_results row |
lookup_cursor | lookup_cursor from a previous batch_content reply on a binary result, to go on looking for its result_url | |
max_chars | Max characters of a text result to return (default 20000) | |
run_id | An earlier run's id (from batch_status or batch_rerun). Default: the job's latest run. |
batch_list
List this account's Batch jobs, newest first, each with its latest run's status and stats. Filter by status (open or closed) and type (regular or scheduled). Pass next_cursor as cursor for the next page; a page can hold fewer than limit jobs while next_cursor is still set, so keep paging until it is null. Deleted jobs are not listed.
| Parameter | Type | Description |
|---|---|---|
cursor | string | null | next_cursor from a previous batch_list call |
limit | Jobs per page (default 20, max 100) | |
status | Only jobs with this job status | |
type | Only jobs of this type |
batch_cancel
Stop a Batch job's current run for good. No task still waiting is started or billed; tasks already in flight finish (and bill). Results so far stay readable with batch_results. Tasks that never started stay pending: batch_rerun (default failed and pending) runs them later. Idempotent: a run that already ended answers with its final status and already_ended:true. To halt without ending the run, use batch_pause.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
batch_pause
Pause a Batch job's current run: it picks up no new tasks until batch_resume. Tasks already in flight still finish and bill; for a hard cost stop use batch_cancel. A paused run still counts as an active job. Idempotent; a run that already ended answers with its final status and already_ended:true.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
batch_resume
Resume a paused Batch run: it picks up its remaining tasks again, billed as they finish. Idempotent on a run that is not paused; a run that already ended answers with its final status and already_ended:true. Needs credits: BATCH_INSUFFICIENT_CREDITS or BATCH_KEY_CAP_REACHED otherwise.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
batch_rerun
Start a new run of a Batch job whose latest run ended (completed, stopped or failed). By default it reruns only the tasks that failed or never started (status ["failed", "pending"]), and carries the others' results over: the recovery after a run that failed on credits or was cancelled. Pass status to pick other task statuses, or full:true to scrape every task again. Rerun tasks are billed like new ones. A rerun of only some tasks works up to 10 days after the run started (BATCH_RERUN_WINDOW_EXPIRED after that; full:true still works). BATCH_NO_MATCHING_TASKS: no task has those statuses. BATCH_…
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
full | boolean | null | Rerun every task, not only some (default false) |
idempotency_key | Sent as the Idempotency-Key header, up to 128 characters; generated per call when unset. Reusing a key with the identical request within 24 hours returns the original response instead of doing it agai… | |
status | Task statuses to rerun (default ["failed", "pending"]). Ignored with full:true. |
batch_delete
Delete a Batch job with all its runs and results, for good. A run in flight stops picking up tasks at once, and the job frees its active-job slot. The job reads as not found right away; storage is cleaned up in the background. Idempotent. To keep the results, use batch_cancel instead.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Batch job id returned by batch_create or batch_list |
crawl_create
Start a crawl from one URL (Zenrows Crawl API). Crawl follows the links in each page's HTML up to depth hops (no depth limit when depth is omitted), keeps the URLs that match include_patterns / exclude_patterns, and stays on the start URL's registrable domain (subdomains count). Use crawl when you have one start page (a listing, category, blog index) and need the URLs behind it, optionally with each page's HTML. For a single page, use scrape. Each page fetched is billed as one scrape on this account; max_pages bounds the cost (default 100), max_items bounds how many URLs are kept (default 10…
| Parameter | Type | Description |
|---|---|---|
url * | string | Start URL: a public http(s) page, such as a listing or category page |
depth | Link hops to follow from the start URL. 1 returns the start page's links; 2 also opens those. Omit for no depth limit: the crawl follows links until max_pages or max_items stops it. | |
discovery | How the crawl finds the URLs it follows on each page it walks. ['links'] follows the links in each page's HTML, and is what a crawl runs with when you omit this. | |
exclude_patterns | Drop URLs containing any of these substrings, even if they match include_patterns | |
idempotency_key | Sent as the Idempotency-Key header. Reusing a key returns the crawl it created; reusing it with a different body is CRAWL_INVALID_REQUEST. | |
include_patterns | Keep only URLs containing at least one of these substrings, e.g. ["/product/"] | |
max_items | Stop once this many URLs are kept (default 100) | |
max_pages | Stop once this many pages are fetched, each billed as one scrape (default 100). With output_format, every kept URL's page counts too. | |
output_format | 'html' or 'markdown' also stores each kept URL's page for crawl_content, as fetched or converted to Markdown. Omit for URLs only. | |
webhook | Where to post the crawl's signed events (crawl.started, then one of crawl.completed, crawl.stopped, crawl.failed). Each is signed with the account's webhook signing key, in the X-Signature header. |
crawl_get
Get a crawl and one page of the URLs it kept: crawl_id, status (running, completed, stopped, failed), the crawl (with coverage: pages_fetched, pages_failed, items_found; webhook when set), results and next_cursor. completed with stop_reason max_items / max_pages means a limit ended it; stopped with stop_reason user means crawl_stop ended it; stopped with no stop_reason and error.code insufficient_credits or api_key_cap_reached means the account ran out of credits or the API key hit a credit cap (the URLs kept before that stay readable); completed with no results and no error means the crawl's…
| Parameter | Type | Description |
|---|---|---|
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
cursor | string | null | next_cursor from a previous crawl_get call, to continue from there |
limit | Results in this page (default 100, max 10000) |
crawl_results
List the URLs a crawl kept, in the order it kept them, following the API's pages up to limit. Each result has url and, when the crawl has output_format, content_status (pending, fetched, failed) and, once fetched, content_url: pass it to crawl_content as content. While the crawl runs the list is partial (partial=true): call again later with the returned next_cursor to get only the URLs kept since. A stopped crawl can still add URLs from pages fetched before the stop for up to 10 minutes, so next_cursor stays set during that window: call again later. next_cursor is null once the crawl ended a…
| Parameter | Type | Description |
|---|---|---|
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
cursor | string | null | next_cursor from a previous crawl_results call, to continue from there |
limit | Max results to return in this call (default 100, max 10000) |
crawl_content
Read the stored page of one URL a crawl kept, in the crawl's output_format. Works only for crawls created with an output_format, and only for results whose content_status is fetched. Pass crawl_id and content_id: a content id, or content_url from a crawl_results row. Returns the page as stored — raw HTML for output_format "html", Markdown for "markdown" — cut to max_chars (default 20000); a final note says when it was cut. To read a page the crawl did not store, use scrape on its URL instead.
| Parameter | Type | Description |
|---|---|---|
content_id * | string | A content id (ct_…), or content_url from a crawl_results row; its last path segment is the id |
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
max_chars | Max characters of the page to return (default 20000) |
crawl_list
List this account's crawls, newest first, with status and coverage (no results). Pass next_cursor as cursor for the next page; next_cursor is absent on the last page.
| Parameter | Type | Description |
|---|---|---|
cursor | string | null | next_cursor from a previous crawl_list call |
limit | Crawls per page (default 20, max 100) |
crawl_stop
Stop a running crawl. No page still waiting is fetched or billed; pages already in flight finish. The URLs kept so far stay readable with crawl_results. A stopped crawl cannot resume. Idempotent: a crawl that already ended answers with its final status. A 429, 502, 503 or 504 is retried up to 3 times, waiting at most 50 seconds in all; a 503 crawl_busy means the stop was not saved yet, and if it persists, CRAWL_BUSY says when to call again. Pages in flight still finish, so coverage and results can keep growing for up to 10 minutes after the stop; read them with crawl_get and crawl_results.
| Parameter | Type | Description |
|---|---|---|
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
crawl_wait
Poll a crawl until it ends (completed, stopped, or failed) and return its status, its counts and the first 20 URLs (first_urls). For every result, call crawl_download (one file) or crawl_results (pages). A crawl that ends completed with no results and no error finished; it is not a failure (see crawl_get). If the wait runs out first, it returns the crawl with status running and a note: call crawl_wait again. A call that carries a progressToken gets a progress notification after each poll, with the status and counts.
| Parameter | Type | Description |
|---|---|---|
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
timeout | Max wait in seconds (default 50). Many MCP clients cancel a call after 60 s. |
crawl_download
Save every result of a crawl to one local file, as JSON lines: url, content_status and, once fetched, content (the page). Returns the file's path and line count, not the results, so a crawl of any size costs one small reply. Read the file with your own tools. The file goes to path when given (a relative path inside ~/.zenrows/crawls; an absolute path or one that leaves that folder fails with INVALID_PATH), else ~/.zenrows/crawls/<crawl_id>.jsonl. An existing file is kept and the call fails with FILE_EXISTS unless overwrite is true. On a running crawl the file holds only what was kept so far:…
| Parameter | Type | Description |
|---|---|---|
crawl_id * | string | Crawl id returned by crawl_create (c_…) |
overwrite | boolean | null | Replace the file if it exists (default false) |
path | File to write, relative to ~/.zenrows/crawls (default <crawl_id>.jsonl) |
account_usage
Read the current plan's credit allowance and how much of it is spent. Useful before a large batch, or after a 402 / AUTH004, to see whether the account has credits left and when the allowance renews. The call is free and does not use a concurrency slot. Credit costs per request: 1 basic, 5 js_render, 10 premium_proxy, 25 both. AUTH004 ("usage exceeded") means this allowance is spent until it renews at the end of the billing period (period_ends_at in this tool's response). Plans and credit options are described at https://www.zenrows.com/pricing. AUTH006 is the concurrency limit, not a credi…
browser_close
Close a browser session and free all associated resources, including the concurrency slot it holds.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_go_back
Navigate back to the previous page in the browser history.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_go_forward
Navigate forward to the next page in the browser history.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_reload
Reload the current page of a browser session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_click
Click an element on the page using a CSS selector.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the element to click |
session_id * | string | Session ID returned by browser_navigate |
browser_hover
Move the mouse cursor over an element to trigger hover effects.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the element to hover over |
session_id * | string | Session ID returned by browser_navigate |
browser_type
Type text into an input element. Appends to existing content unless clear_first is set.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the input element |
session_id * | string | Session ID returned by browser_navigate |
text * | string | Text to type |
clear_first | boolean | null | Clear existing content before typing (default false) |
browser_fill
Clear an input field and set its value, replacing what was there (browser_type appends instead).
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the input element |
session_id * | string | Session ID returned by browser_navigate |
value * | string | Value to fill in |
browser_select_option
Select an option from a <select> dropdown element.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the <select> element |
session_id * | string | Session ID returned by browser_navigate |
value * | string | Value of the option to select |
browser_check
Check a checkbox or radio button.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the checkbox or radio element |
session_id * | string | Session ID returned by browser_navigate |
browser_uncheck
Uncheck a checkbox, found by CSS selector, in a browser session.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the checkbox element |
session_id * | string | Session ID returned by browser_navigate |
browser_focus
Move focus to an element, triggering focus-dependent UI changes.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector of the element to focus |
session_id * | string | Session ID returned by browser_navigate |
browser_press_key
Press a keyboard key. Examples: "Enter", "Tab", "Escape", "ArrowDown", "Control+a".
| Parameter | Type | Description |
|---|---|---|
key * | string | Key to press (e.g. "Enter", "Tab", "Escape", "ArrowDown", "Control+a") |
session_id * | string | Session ID returned by browser_navigate |
browser_scroll
Scroll the page in a given direction.
| Parameter | Type | Description |
|---|---|---|
direction * | string | Scroll direction |
session_id * | string | Session ID returned by browser_navigate |
distance | Pixels to scroll (default 500) |
browser_drag
Drag an element from its current position to a target element.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
source_selector * | string | CSS selector of the element to drag |
target_selector * | string | CSS selector of the drop target |
browser_get_accessibility_tree
Get the ARIA accessibility tree of the current page as readable text. Shows the page structure and the selectors needed to interact with elements, in fewer tokens than a screenshot. The tree shows all interactive elements (buttons, inputs, links) with their roles, labels, and states — everything needed to drive browser interactions.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_get_url
Get the current URL of the browser session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_get_title
Get the title of the current page.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_get_text
Get the visible text content of an element or the entire page body.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
selector | string | null | CSS selector of the element (omit for full page body text) |
browser_get_attribute
Get the value of a specific attribute on an element.
| Parameter | Type | Description |
|---|---|---|
attribute * | string | Attribute name to retrieve (e.g. 'href', 'src', 'data-id') |
selector * | string | CSS selector of the element |
session_id * | string | Session ID returned by browser_navigate |
browser_get_html
Get the HTML source of an element or the full page.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
selector | string | null | CSS selector of the element (omit for full page HTML) |
browser_query_selector_all
Find all elements matching a CSS selector and return their text, HTML, and attributes.
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector to query |
session_id * | string | Session ID returned by browser_navigate |
browser_screenshot
Take a screenshot of the current page or a specific element. Use for visual verification or when the accessibility tree is not sufficient.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
full_page | boolean | null | Capture full page including content below the fold (default false) |
selector | string | null | CSS selector to capture only a specific element (overrides full_page) |
browser_generate_pdf
Render the current page as a PDF document.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
landscape | boolean | null | Landscape orientation (default false) |
print_background | boolean | null | Print background graphics (default false) |
scale | Page scale factor (default 1) |
browser_wait_for_selector
Wait until an element matching the CSS selector is stable in the DOM. Set visible=true to also require the element to be visible (not hidden).
| Parameter | Type | Description |
|---|---|---|
selector * | string | CSS selector to wait for |
session_id * | string | Session ID returned by browser_navigate |
visible | boolean | null | Also require the element to be visible, not just present in the DOM (default false) |
browser_wait
Wait for a fixed duration. browser_wait_for_selector waits only until an element appears.
| Parameter | Type | Description |
|---|---|---|
ms * | integer | Milliseconds to wait (max 30000) |
session_id * | string | Session ID returned by browser_navigate |
browser_evaluate
Execute JavaScript in the browser context and return the result. The script can change or delete the session's page state, such as cookies, storage and form data.
| Parameter | Type | Description |
|---|---|---|
script * | string | JavaScript expression or function body to evaluate in the page context |
session_id * | string | Session ID returned by browser_navigate |
browser_get_cookies
Get all cookies for the current page.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_set_cookies
Set one or more cookies in the browser session. A cookie with the same name, domain and path replaces the existing one.
| Parameter | Type | Description |
|---|---|---|
cookies * | array | Array of cookie objects to set |
session_id * | string | Session ID returned by browser_navigate |
browser_clear_cookies
Clear all cookies for the current browser session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_get_local_storage
Read one localStorage value in the current page context.
| Parameter | Type | Description |
|---|---|---|
key * | string | Storage key to read |
session_id * | string | Session ID returned by browser_navigate |
browser_set_local_storage
Write one localStorage value in the current page context. An existing value under the same key is replaced.
| Parameter | Type | Description |
|---|---|---|
key * | string | Storage key to write |
session_id * | string | Session ID returned by browser_navigate |
value * | string | Value to store |
browser_clear_local_storage
Delete every localStorage entry in the current page context.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
browser_new_tab
Open a new browser tab. Returns a tab_id to use with browser_switch_tab.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
url | URL to open in the new tab (opens blank tab if omitted) |
browser_switch_tab
Switch focus to a different browser tab.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | Session ID returned by browser_navigate |
tab_id * | string | Tab ID returned by browser_new_tab |
browser_batch
Execute a sequence of browser actions in a single call against an existing session. Use this when you already know the full sequence of steps — it reduces round trips and is faster than calling each tool individually. Actions run sequentially and stop at the first failure unless stop_on_error is false. Each step result is returned in the results array at the same index. Note: screenshots in batch results are returned as base64 strings inside the JSON; browser_screenshot returns them as images. A batch can include evaluate, so it can change or delete page state the same way browser_evalua…
| Parameter | Type | Description |
|---|---|---|
actions * | array | Ordered list of actions to perform. Each action has a 'type' field plus type-specific parameters. |
session_id * | string | Session ID returned by browser_navigate |
stop_on_error | boolean | null | Stop executing on the first failed action (default true) |