Source: https://metadock.app/api-docs

# MetaDock API reference

MetaDock exposes every browser in your workspace over 5 protocols totalling 707 operations. They drive the same visible, logged-in browsers you use by hand and they all run on your own machine. MCP is on every plan; REST, WebSocket, WebDriver and CDP are part of MetaDock Pro. The interactive reference below is generated from the OpenAPI spec.

## Which protocols does MetaDock expose?

Five, and they are alternatives rather than layers: the same browser keeps its profile state whichever one you reach it through, so you can drive a session over REST and attach to it over CDP without losing anything.

MetaDock automation protocols, the size of each surface, and what each is for

| Protocol | Surface | What it is for |
| --- | --- | --- |
| REST | 166 operations | HTTP calls from any language. The broadest surface, and the one most scripts start with. |
| WebSocket | 164 operations | Bidirectional control plus event subscriptions, for anything that needs to react rather than poll. |
| MCP | 161 tools | Model Context Protocol server. Lets Claude Desktop, Claude Code, or Cursor drive your real browsers. |
| W3C WebDriver | 216 operations | Standard WebDriver, so existing Selenium suites point at MetaDock with minimal changes. |
| Chrome DevTools Protocol | 12 domains handled explicitly | CDP discovery plus passthrough to Chromium, so Puppeteer and Playwright attach to a running browser. Unlisted domains are forwarded, so the reachable surface is larger than the count. |

## Where do the machine-readable specs live?

Two files, both generated by the desktop app from its own route table rather than written by hand. [openapi.yaml](https://metadock.app/openapi.yaml) covers REST, WebDriver and CDP discovery, and is what the reference below renders. MCP clients get the tool list from the server itself when they connect. [asyncapi.yaml](https://metadock.app/asyncapi.yaml) covers the WebSocket surface, which AsyncAPI describes and OpenAPI cannot.

## What do I need before the first call?

An API key minted inside the app, and the surface you are targeting switched on. Both live in Settings, both are off until you turn them on, and keys carry per-surface scopes so a REST key cannot drive CDP. A key can be narrowed further: to a set of capabilities, to a deny list of individual tools, to named profiles and layouts, and to an allowlist of domains it may navigate to. A tool denied to a key stays denied on every surface it reaches, and the sensitive groups such as cookies and browsing history start switched off on a new key. The full walkthrough, including base URLs and a first request in each protocol, is on the getting-started guide.

[Read the API getting-started guide](https://metadock.app/api-docs/getting-started)

## Find an endpoint by task

Methods, paths and descriptions below come from [the complete OpenAPI specification](https://metadock.app/openapi.yaml). Use the interactive reference below for parameters, request bodies and response schemas. For events, see [the WebSocket specification](https://metadock.app/asyncapi.yaml); for AI clients, see [MCP setup](https://metadock.app/docs/mcp).

-   [Browser](https://metadock.app/api-docs#reference-browser)
-   [Workspace](https://metadock.app/api-docs#reference-workspace)
-   [Layout](https://metadock.app/api-docs#reference-layout)
-   [App](https://metadock.app/api-docs#reference-app)
-   [Bookmark](https://metadock.app/api-docs#reference-bookmark)
-   [History](https://metadock.app/api-docs#reference-history)
-   [Search](https://metadock.app/api-docs#reference-search)
-   [Download](https://metadock.app/api-docs#reference-download)
-   [Adblock](https://metadock.app/api-docs#reference-adblock)
-   [Permission](https://metadock.app/api-docs#reference-permission)
-   [Settings](https://metadock.app/api-docs#reference-settings)
-   [Selenium](https://metadock.app/api-docs#reference-selenium)
-   [CDP](https://metadock.app/api-docs#reference-cdp)
-   [Other](https://metadock.app/api-docs#reference-other)
-   [Extension](https://metadock.app/api-docs#reference-extension)
-   [Video](https://metadock.app/api-docs#reference-video)

### Browser

Create, control, inspect, and automate browser instances (REST).

-   **GET** `/api/browsers`

    Get all browsers

    List the open browsers: uuid, url, title, custom title, profile and layout. layout\_uuid narrows it to one layout.

-   **POST** `/api/browsers/close`

    Execute bulk mcp action

    Close many browsers at once: every browser, or only those in layout\_uuid, except keep\_browser\_uuid when given

-   **POST** `/api/browsers/create`

    Create browser

    Create a new browser instance

-   **POST** `/api/browsers/create-multiple`

    Create multiple browsers

    Create multiple browsers with different configurations

-   **GET** `/api/browsers/gpu-presets`

    Get gpu presets

    List the GPU presets browser\_set\_fingerprint accepts as webgl.gpu\_preset, with a description of each.

-   **POST** `/api/browsers/run`

    Execute bulk mcp action

    Run one action on many browsers: reload, stop, back, forward, navigate (url), execute (script; answers each result) or screenshot (saved; answers each screenshot\_uuid for browser\_get\_screenshot; needs browser.capture). Selects the listed browser\_uuids, every browser in layout\_uuid, or every browser.

-   **GET** `/api/browsers/screenshots/{p1}`

    Get saved screenshot

    Retrieve a saved screenshot by UUID. Use this after browser\_screenshot with save=true. Screenshots expire after 5 minutes.

-   **POST** `/api/browsers/set-state`

    Execute bulk mcp action

    browser\_set\_state for many browsers: the listed browser\_uuids, every browser in layout\_uuid, or every browser when neither is given. Answers one result per browser.

-   **POST** `/api/browsers/{uuid}/back`

    Go back

    Navigate browser back in history

-   **POST** `/api/browsers/{uuid}/batch`

    Execute batch

    Execute multiple browser operations in sequence on one or multiple browsers (100 operations per browser max)

-   **POST** `/api/browsers/{uuid}/cache/clear`

    Execute mcp action

    Clear this browser's HTTP cache (CDP Network.clearBrowserCache). Does not touch cookies.

-   **POST** `/api/browsers/{uuid}/clear`

    Clear input

    Clear an input field

-   **POST** `/api/browsers/{uuid}/click`

    Click element

    Click an element by CSS selector

-   **POST** `/api/browsers/{uuid}/click-at`

    Execute mcp action

    Click at raw viewport pixel coordinates using a real (trusted) mouse event. Use when you have coordinates rather than a CSS selector (e.g. from a screenshot or element box).

-   **POST** `/api/browsers/{uuid}/close`

    Close browser

    Close a browser instance

-   **GET** `/api/browsers/{uuid}/console`

    Get console messages

    Get console messages from the browser

-   **POST** `/api/browsers/{uuid}/console/clear`

    Clear console messages

    Clear console messages for the browser

-   **POST** `/api/browsers/{uuid}/cookie`

    Set cookie

    Set a cookie for the browser

-   **DELETE** `/api/browsers/{uuid}/cookies`

    Execute mcp action

    Delete the cookie named name for the current page's URL, or, with all: true, every cookie of the browser's profile on every site (it signs the profile out everywhere). Send exactly one of the two. A key limited to domains cannot delete them all.

-   **GET** `/api/browsers/{uuid}/cookies`

    Execute mcp action

    Get the cookies sent to the current page's URL (HttpOnly included), as name and value, or only those named name

-   **POST** `/api/browsers/{uuid}/drag`

    Execute mcp action

    Drag from one element to another using real (trusted) mouse events: press at the source center, move in steps to the target center, release. Works for sliders, sortable lists, and canvas/custom drag handlers.

-   **POST** `/api/browsers/{uuid}/element`

    Execute mcp action

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/api/browsers/{uuid}/emulation`

    Execute mcp action

    Change a browser's emulation in one call. Only the fields sent change; null clears a field back to the real value. device sets viewport, pixel ratio, touch and user agent together and survives navigation; a docked browser's own viewport snaps back to its dock, so use device for a stable page size. Answers the full state.

-   **POST** `/api/browsers/{uuid}/execute`

    Execute java script

    Execute JavaScript code in browser. The value of the last expression is returned; a returned promise is awaited and top-level await works. A thrown exception, or a promise still pending at timeout\_ms, is reported as an error.

-   **POST** `/api/browsers/{uuid}/execute-with-result`

    Execute java script with result

    Execute JavaScript code in browser. The value of the last expression is returned; a returned promise is awaited and top-level await works. A thrown exception, or a promise still pending at timeout\_ms, is reported as an error.

-   **POST** `/api/browsers/{uuid}/extract`

    Extract content

    Structured, schema-driven extraction. Provide a 'fields' map of {fieldName: {selector, attr, all}} and get back JSON. attr: 'text' (default), 'html', or an attribute name like 'href'. all:true returns an array of matches.

-   **POST** `/api/browsers/{uuid}/find`

    Execute mcp action

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **GET** `/api/browsers/{uuid}/fingerprint`

    Get fingerprint

    Get a browser profile's fingerprint protection config, with its geolocation override under geo (including the last resolved result in auto mode).

-   **POST** `/api/browsers/{uuid}/fingerprint`

    Set fingerprint

    Change a browser profile's fingerprint protection, including its geolocation override. Only what is sent changes: a section (canvas, webgl, identity, network, ...) is merged field by field into the stored one. Turning canvas, webgl or audio on also turns protection on. A preset is a new baseline: the config restarts from that preset and the other fields sent apply on top. geo sets the geolocation, timezone and locale override (needs protection on; null removes it). reset: true clears the whole config. The config belongs to the browser's profile and applies to every open browser of it. A named GPU card sets platform to that card's OS, unless identity carries an explicit override\_ua (follow\_profile\_ua=false): then the UA's OS is the platform and a card from another OS is reset to Auto. enabled=false also turns the geolocation override off. Answers the config, as browser\_get\_fingerprint does.

-   **POST** `/api/browsers/{uuid}/forms`

    Execute mcp action

    Enumerate forms and their fields {name, id, type, label, placeholder, required, options, selector}. Lets you fill forms by known field names instead of guessing selectors. Password/sensitive values are never returned.

-   **POST** `/api/browsers/{uuid}/forward`

    Go forward

    Navigate browser forward in history

-   **GET** `/api/browsers/{uuid}/headers`

    Get custom headers

    List the custom request headers currently applied to a browser. Readable counterpart to browser\_set\_headers. These are session-only and do not survive a restart.

-   **POST** `/api/browsers/{uuid}/headers`

    Execute mcp action

    Add, change or remove custom HTTP request headers sent by this browser on subsequent requests. headers maps each name to its value, or to null to remove it. Every name is checked first; Authorization, Cookie, Host and Proxy-Authorization are refused. Session-only. Answers the headers now applied.

-   **POST** `/api/browsers/{uuid}/history/go`

    Execute mcp action

    Move within the browser's session history by a relative delta (e.g. -1 = back, 1 = forward, -2 = back twice).

-   **POST** `/api/browsers/{uuid}/hover`

    Execute mcp action

    Hover the pointer over an element (dispatches pointer/mouse enter+over+move events), triggering hover menus and tooltips. Scrolls the element into view first.

-   **POST** `/api/browsers/{uuid}/inject`

    Execute mcp action

    Add CSS (css) or an external script by URL (script\_url, http or https) to the current page. Send exactly one.

-   **POST** `/api/browsers/{uuid}/last-dialog`

    Execute mcp action

    Get the most recent JavaScript dialog captured for this browser (only captured while a non-default dialog policy is active): {policy, kind, message, uri, captured}.

-   **POST** `/api/browsers/{uuid}/links`

    Get links

    Extract all hyperlinks on the page as a compact list of {text, href, rel}. Deduplicated. A token-cheap navigation map instead of raw HTML.

-   **GET** `/api/browsers/{uuid}/metadata`

    Get metadata

    Get page metadata: title, description, canonical URL, author, published/modified dates, language, favicon, Open Graph + Twitter cards, word count and reading time.

-   **POST** `/api/browsers/{uuid}/navigate`

    Navigate

    Navigate a browser to a specific URL

-   **POST** `/api/browsers/{uuid}/network`

    Execute mcp action

    List the network requests the page has made (from the Resource Timing API): url, type, protocol, size, and duration, plus navigation timing. Note: does NOT include status codes, headers, or response bodies.

-   **POST** `/api/browsers/{uuid}/pdf`

    Print to pdf

    Print page to PDF. Output is restricted to your Documents or Downloads folder.

-   **POST** `/api/browsers/{uuid}/press-key`

    Execute mcp action

    Send a real (trusted) key press to the focused element via native input. Accepts a named key or a single printable character. Named keys (case-insensitive): Enter/Return, Tab, Escape/Esc, Backspace, Delete/Del, Space, Up/ArrowUp, Down/ArrowDown, Left/ArrowLeft, Right/ArrowRight, Home, End, PageUp, PageDown, Insert, and F1-F24 (F1-F20 on macOS, where Home/End also keep their Mac meaning: they scroll instead of moving the caret). Use this for Enter-to-submit / Tab-between-fields where synthetic JS key events do not work. Modifier combos (Ctrl+A etc.) are not yet supported.

-   **POST** `/api/browsers/{uuid}/read`

    Read content

    Read the page as clean, LLM-friendly content instead of raw HTML. Strips boilerplate (article mode), converts to markdown or plain text, and supports paging via max\_chars + offset. Prefer this over browser\_get\_source.

-   **POST** `/api/browsers/{uuid}/reload`

    Reload

    Reload the current page

-   **POST** `/api/browsers/{uuid}/right-click`

    Execute mcp action

    Right-click (context-menu) an element by dispatching mousedown/mouseup/contextmenu with the secondary button. Scrolls the element into view first.

-   **POST** `/api/browsers/{uuid}/screenshot`

    Take screenshot

    Take a screenshot of the page - returns base64-encoded PNG image data. Use save=true for batch operations to reduce token usage (returns UUID instead of image data, use browser\_get\_screenshot to retrieve).

-   **POST** `/api/browsers/{uuid}/screenshot/element`

    Execute mcp action

    Screenshot a single element (scrolls it into view, captures just its bounding box). Returns an image. Far smaller than a full-page screenshot when you only need one component.

-   **POST** `/api/browsers/{uuid}/scroll`

    Execute mcp action

    Scroll the page to x, y (page coordinates, not negative), or by x, y when relative is true

-   **POST** `/api/browsers/{uuid}/set-value`

    Set input value

    Set value of an input element

-   **POST** `/api/browsers/{uuid}/snapshot`

    Execute mcp action

    Token-efficient interactive snapshot: a compact list of visible interactive elements (links, buttons, inputs, selects) each with role, accessible name and a CSS selector usable by browser\_click/browser\_set\_value, plus a heading outline. Far cheaper than a screenshot for driving a page.

-   **GET** `/api/browsers/{uuid}/source`

    Get page source

    Get raw page source HTML. Token-heavy - prefer browser\_read for clean content. Supports clean (strip script/style/svg/etc.) and max\_chars + offset paging to avoid dumping the whole document.

-   **GET** `/api/browsers/{uuid}/state`

    Get browser state

    Get a browser's full state: identity, navigation, every field browser\_set\_state and browser\_set\_emulation set (zoom, muted, locked, scripts\_enabled, adblock, profile, headless, dialog\_policy, user\_agent, viewport, emulated\_device, offline), whether ads are blocked (adblock\_effective) and custom request headers. The raw geolocation override is not readable.

-   **POST** `/api/browsers/{uuid}/state`

    Execute mcp action

    Change any part of a browser's state in one call: locked, muted, zoom, scripts\_enabled, adblock, profile, headless, dialog\_policy, devtools\_enabled, devtools\_open. Only the fields sent change; every field is checked before any changes. Answers the full state, as browser\_get\_state does.

-   **POST** `/api/browsers/{uuid}/stop`

    Stop

    Stop loading the current page

-   **POST** `/api/browsers/{uuid}/storage`

    Execute mcp action

    Read the page's localStorage or sessionStorage. With a key, returns that value; without, returns all entries for the origin.

-   **POST** `/api/browsers/{uuid}/storage/clear`

    Execute mcp action

    Clear the page's localStorage or sessionStorage. With a key, removes just that key; without, clears the whole store for the origin.

-   **POST** `/api/browsers/{uuid}/storage/set`

    Execute mcp action

    Set a key in the page's localStorage or sessionStorage.

-   **POST** `/api/browsers/{uuid}/submit`

    Submit form

    Submit a form

-   **POST** `/api/browsers/{uuid}/tables`

    Get tables

    Extract HTML tables as markdown (default), CSV, or JSON rows. Avoids the model parsing <td> soup.

-   **POST** `/api/browsers/{uuid}/type`

    Type text

    Type text at current cursor position

-   **POST** `/api/browsers/{uuid}/upload`

    Execute mcp action

    Attach files to a file <input> element. You supply the file CONTENT as base64 (not a local path), so the tool never reads the machine's disk. Each file is materialized in-page and assigned to the input.

-   **POST** `/api/browsers/{uuid}/wait`

    Execute mcp action

    Wait for something on the page. for: element (selector appears; default timeout 5000), load (the page finishes loading; default 30000), or network\_idle (loaded and no new requests for idle\_ms; default 30000). Use after a navigation or an action that loads content, before reading.

### Workspace

Manage workspaces (collections of layouts) (REST).

-   **GET** `/api/workspaces`

    List workspaces

    List every workspace, marking the current, startup and temporary ones

-   **POST** `/api/workspaces`

    Create workspace

    Create a new workspace. temporary: true makes one that is deleted when a window switches away from it.

-   **POST** `/api/workspaces/import`

    Import workspace

    Create a workspace from exported text (workspace\_export's data, or an .mws file's content). Profiles it names that do not exist become the default profile. A browser dock whose page the ad blocker blocks is left out and listed in skipped. Use workspace\_switch to open it.

-   **POST** `/api/workspaces/perform`

    Perform workspace action

    Run a workspace action. save: write every open window's workspace now. install\_presets: install the bundled preset workspaces; an existing preset is overwritten only with overwrite: true.

-   **DELETE** `/api/workspaces/{id}`

    Delete workspace

    Delete a workspace

-   **GET** `/api/workspaces/{id}`

    Get workspace state

    Get a workspace's full state: name, homepage, startup, temporary, current, and its layouts (one per window, by app\_index).

-   **GET** `/api/workspaces/{id}/export`

    Export workspace

    Export a workspace as text, the same content as an exported .mws file. Pass data to workspace\_import to recreate it. No file is written.

-   **POST** `/api/workspaces/{id}/state`

    Set workspace state

    Change a workspace in one call: name, homepage, startup. Only the fields sent change; every field is checked before any changes. Answers the full state, as workspace\_get\_state does.

-   **POST** `/api/workspaces/{id}/switch`

    Switch workspace

    Switch the windows to a different workspace. Every open dock is closed and the workspace's docks are loaded.

### Layout

Manage layouts/docks and browser profiles (REST).

-   **GET** `/api/layouts`

    List layouts

    List all available layouts/docks

-   **POST** `/api/layouts`

    Add layout

    Create a new layout/dock

-   **POST** `/api/layouts/close-all`

    Close all docks

    Close all dock widgets of specified types, or exactly the docks dock\_uuids names (any dock uuid from layout\_get\_state). Use to bulk-close browsers, native apps, video players, etc. With dock\_uuids an unknown or closed uuid, or one outside layout\_uuid, refuses the call and nothing closes.

-   **DELETE** `/api/layouts/{uuid}`

    Delete layout

    Delete a layout/dock

-   **GET** `/api/layouts/{uuid}`

    Execute mcp action

    Get a layout's full state: lock, fullscreen, window state, size and fixed resolution, mute, new-dock placement, workspace-switch sync, UI toggles, and every dock with its area, focus, floating, maximized and tabbed state. layout\_set\_state takes the same fields.

-   **POST** `/api/layouts/{uuid}/open-dock`

    Execute mcp action

    Open a non-browser dock in the layout: downloads, history, bookmarks (the layout's profile), or a new-window panel. Settings is a floating panel, not a dock; change settings with settings\_set. beside\_dock\_uuid opens it next to an open dock of the same layout instead of where new docks normally go. Answers the new dock's dock\_uuid, which layout\_move\_dock and layout\_set\_dock\_state take.

-   **POST** `/api/layouts/{uuid}/perform`

    Execute mcp action

    Run a layout action: equalize (share space evenly between the tiled docks), reset (re-dock everything into the automatic grid) or restore\_closed (reopen the most recently closed browser; answers its browser\_uuid).

-   **GET** `/api/layouts/{uuid}/screenshot`

    Get layout screenshot

    Screenshot the layout window at its exact dimensions. Captures dock chrome only - content areas come out black. Use browser\_screenshot for page content.

-   **POST** `/api/layouts/{uuid}/state`

    Execute mcp action

    Change any part of a layout's state in one call. Every field is optional and only the fields sent change. Answers the full state, as layout\_get\_state does.

-   **GET** `/api/profiles`

    List profiles

    List the usable browser profiles: which one is the default, which are temporary, and which have a proxy configured; locked names the profiles the plan's profile limit locks. Does not return proxy values - the stored form embeds credentials.

-   **POST** `/api/profiles`

    Add profile

    Create a new browser profile. temporary: true makes one that MetaDock removes when it exits (or, after a crash, when it next starts).

-   **DELETE** `/api/profiles/{name}`

    Delete profile

    Delete a browser profile and everything stored under it. Refused for the last permanent profile and for a profile an open browser uses; close its browsers first

-   **GET** `/api/profiles/{name}`

    Get profile state

    Get a profile's state, including one locked by the plan's profile limit: default, temporary, locked, colour, fingerprint protection, the sites it was recorded as signed in to, and its proxy with any credentials stripped.

-   **POST** `/api/profiles/{name}/state`

    Set profile state

    Change a profile in one call: new\_name (rename), default (true makes it the default profile), proxy or proxy\_id, color, fingerprint, active (unlock a profile the plan's limit locks). Only the fields sent change; every field is checked first. A proxy applies to browsers opened after every browser on the profile is closed. Answers the state.

-   **GET** `/api/proxies`

    List proxies

    List the saved proxy library, the entries the proxy dialog offers: id, label, address with credentials stripped, and the profiles bound to each.

-   **POST** `/api/proxies`

    Add proxy

    Save a proxy to the library without binding it to a profile (profile\_set\_state proxy\_id binds one). Saving an address the library already has answers that entry. Pro only.

-   **DELETE** `/api/proxies/{id}`

    Delete proxy

    Delete a saved proxy. Every profile bound to it is left with no proxy (answered as unbound); their open browsers keep it until they are all closed.

### App

Mount and control docked native applications (REST).

-   **GET** `/api/apps`

    List apps

    List native app docks mounted in a layout (full JSON)

-   **POST** `/api/apps`

    Mount app

    Mount a running native window as a dock in a layout

-   **GET** `/api/apps/processes`

    List processes

    List visible top-level OS windows that can be mounted as native app docks, including process name, PID, window title and whether the process is a game

-   **DELETE** `/api/apps/{uuid}`

    Dismount app

    Dismount (unembed) a native app dock by UUID

-   **GET** `/api/apps/{uuid}`

    Get app

    Get the state of a mounted native app dock by UUID: process, title, layout, lock and whether it is still running

-   **POST** `/api/apps/{uuid}/click`

    Click app

    Click at a point inside a mounted native app, in the same pixel coordinates as native\_app\_screenshot. Best effort: some apps ignore synthesized clicks, so prefer native\_app\_uia\_act when the element is in the control tree. Works while other windows cover MetaDock. The click is delivered asynchronously, so allow a moment before taking a screenshot to see its effect. Not available for games.

-   **POST** `/api/apps/{uuid}/key`

    Press app key

    Press a single named key in a mounted native app, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). No modifier combinations such as Ctrl+S. Delivered asynchronously. Not available for games.

-   **GET** `/api/apps/{uuid}/screenshot`

    Screenshot app

    Capture the contents of a mounted native app window. At full size, image pixels match native\_app\_uia\_tree rects and native\_app\_click points; when max\_width shrinks the image, divide image coordinates by the returned scale to get window coordinates. On macOS the image is the whole window, title bar included, and needs the Screen Recording permission. Not available for games.

-   **POST** `/api/apps/{uuid}/state`

    Set app state

    Set a native app dock's lock and custom title. Pass only the fields to change; answers the resulting state

-   **POST** `/api/apps/{uuid}/type`

    Type app text

    Type text into a mounted native app as keyboard character input, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). Unlike native\_app\_uia\_act 'set\_value', rich editors register it as real typing. Use native\_app\_press\_key for Enter, Tab and other named keys. Delivered asynchronously. Not available for games.

-   **GET** `/api/apps/{uuid}/uia`

    Uia tree

    Read the control tree (UI Automation on Windows, Accessibility on macOS) of a mounted native app: buttons, fields, menus and their ids, names, rects and supported actions. Includes the app's open dialogs and menus. Prefer this plus native\_app\_uia\_act over clicking by pixel. Not available for games.

-   **POST** `/api/apps/{uuid}/uia/act`

    Uia act

    Perform an action on a control-tree element of a mounted native app, by the id from native\_app\_uia\_tree. Does not move the mouse or use the keyboard. set\_value can bypass rich-text editors (chat boxes, web-based editors) so the app never sees the text; for those, use 'focus' here and then native\_app\_type. Not available for games.

### Bookmark

Manage bookmarks and categories (REST).

-   **GET** `/api/bookmarks`

    List bookmarks

    List bookmarks (id, name, url, category\_id, tags). Optional profile filter. Supports limit + offset paging; response includes total.

-   **POST** `/api/bookmarks`

    Create bookmark

    Create a bookmark

-   **GET** `/api/bookmarks/categories`

    List categories

    List bookmark categories (id, name, parent\_id, color, path, depth)

-   **POST** `/api/bookmarks/categories`

    Create category

    Create a bookmark category and return its id, which bookmark\_create and bookmark\_update take as category\_id.

-   **DELETE** `/api/bookmarks/categories/{p1}`

    Delete category

    Delete a bookmark category. Fails if it still holds bookmarks or child categories unless delete\_contents is true.

-   **PUT** `/api/bookmarks/categories/{p1}`

    Rename category

    Rename a bookmark category

-   **GET** `/api/bookmarks/tags`

    List tags

    List every distinct tag used across saved bookmarks, sorted alphabetically. Call this to discover valid values for the tags parameter on bookmark\_create and bookmark\_update. Unlike bookmark\_list, this is not scoped to a profile - tags are shared across all bookmarks.

-   **DELETE** `/api/bookmarks/{id}`

    Delete bookmark

    Delete a bookmark by id

-   **PUT** `/api/bookmarks/{id}`

    Update bookmark

    Update a bookmark's title, url, and/or category by id (unspecified fields keep their current value)

-   **POST** `/api/bookmarks/{id}/open`

    Open bookmark

    Open a bookmark in a new browser

### History

Query and prune browsing history (REST).

-   **DELETE** `/api/history`

    Clear history

    Clear browsing history: one profile's, a time range's, or both. With no arguments, clears all history across every profile. A profile-limited key must name its profile.

-   **GET** `/api/history`

    List history

    List/search browsing history visits (visit\_id, uri, title, host, profile, visit\_time, counts)

-   **GET** `/api/history/profiles`

    List profiles

    List distinct profiles that have history visits

-   **POST** `/api/history/remove-uri`

    Remove uri

    Remove all history for a specific URL

-   **DELETE** `/api/history/visit/{visitId}`

    Delete visit

    Delete a single history visit by visit\_id

### Search

Run searches and manage search aliases (REST).

-   **GET** `/api/aliases`

    List aliases

    List website aliases (short keyword -> URL shortcuts used in the omnibox)

-   **POST** `/api/aliases`

    Set alias

    Create or update a website alias

-   **DELETE** `/api/aliases/{alias}`

    Delete alias

    Delete a website alias

-   **GET** `/api/aliases/{alias}`

    Resolve alias

    Resolve a website alias to its URL

-   **POST** `/api/search`

    Search

    Run a search query in a new browser using the default (or specified) search engine

### Download

List and control downloads (REST).

-   **GET** `/api/downloads`

    List downloads

    List active/recent downloads (uuid, filename, url, status, bytes, speed, profile). Supports limit + offset paging; response includes total. Pass uuid for just that one download, and profile to list only that profile's downloads.

-   **POST** `/api/downloads/clear`

    Clear downloads

    Remove finished downloads (completed, cancelled, failed) from the list, or every download, cancelling running ones first, when completed\_only is false

-   **POST** `/api/downloads/start`

    Start download

    Start a managed download to the app's configured download directory and return its UUID and initial state. The transfer can be observed and controlled with the other download tools. There is intentionally no destination-path parameter, and the request does not use a browser login session. With profile, the download belongs to that profile and goes through its proxy; a key limited to profiles must name one of them.

-   **DELETE** `/api/downloads/{uuid}`

    Remove download

    Act on one download: pause or resume it, cancel it, or remove it from the list (cancelling it first if it is still running)

-   **GET** `/api/downloads/{uuid}`

    Get download

    List active/recent downloads (uuid, filename, url, status, bytes, speed, profile). Supports limit + offset paging; response includes total. Pass uuid for just that one download, and profile to list only that profile's downloads.

-   **POST** `/api/downloads/{uuid}/perform`

    Perform download

    Act on one download: pause or resume it, cancel it, or remove it from the list (cancelling it first if it is still running)

### Adblock

Manage adblock filter lists and per-site overrides (REST).

-   **GET** `/api/adblock/lists`

    List filters

    List all adblock filter lists (id, name, url, enabled, rule\_count, last\_updated) and the auto-update schedule

-   **POST** `/api/adblock/lists`

    Add filter

    Add a new adblock filter list by URL

-   **DELETE** `/api/adblock/lists/{id}`

    Remove filter

    Remove an adblock filter list by id

-   **POST** `/api/adblock/lists/{id}/update`

    Update filter

    Re-download one filter list by id, or every enabled list when id is omitted

-   **GET** `/api/adblock/override`

    Get override

    Get a profile's adblock override (on/off/inherit) and the effective enabled state

-   **POST** `/api/adblock/override`

    Set override

    Set a profile's adblock override

-   **POST** `/api/adblock/state`

    Set state

    Enable or disable a filter list (id + enabled) and/or set the auto-update schedule (auto\_update, auto\_update\_hours). Pass only what changes; answers the same state as adblock\_list

-   **POST** `/api/adblock/update`

    Update all

    Re-download one filter list by id, or every enabled list when id is omitted

-   **GET** `/api/adblock/whitelist`

    Get whitelist

    Without host: list a profile's hosts excepted from adblocking. With host: check whether that host is excepted in the profile. Matching is subdomain-inclusive, so an entry for metadock.app covers www.metadock.app.

-   **POST** `/api/adblock/whitelist`

    Set whitelist

    Add or remove a host from a profile's adblock site exceptions. Adding a host that is already excepted is a no-op, reported as changed=false.

### Permission

Inspect and revoke site permissions (REST).

-   **GET** `/api/permissions`

    List permissions

    List a profile's remembered site permission decisions (profile, host, permission\_type, label, allowed). Decisions are per profile.

-   **POST** `/api/permissions/clear`

    Clear permissions

    Forget every remembered permission decision of a profile, for all hosts

-   **POST** `/api/permissions/remove`

    Remove permission

    Forget one of a profile's remembered permission decisions for a host. permission\_type is the stored value from permission\_list or permission\_list\_types

-   **POST** `/api/permissions/remove-host`

    Remove host permissions

    Forget every one of a profile's remembered permission decisions for a host

-   **POST** `/api/permissions/set`

    Set permission

    Remember a profile's permission decision for a host, as if the user had answered a prompt with 'remember this choice'. Takes effect immediately, without a restart.

-   **GET** `/api/permissions/types`

    List permission types

    List every permission type that can be granted or denied, with a human-readable label. Call this to discover valid permission\_type values for permission\_set and permission\_remove.

### Settings

Read and update application settings (REST).

-   **GET** `/api/settings`

    Get settings

    Get current values of application settings (the readable counterpart to settings\_set) - behaviour/features, appearance, browsing, and API-surface flags. The API key/secret is never returned.

-   **POST** `/api/settings`

    Set setting

    Set an application setting by key. Call settings\_list first for each key's type, permitted values, bounds and whether it is writable.

-   **GET** `/api/settings/list`

    List settings

    List every application setting with its type, whether it is writable, its current value, permitted values and bounds. Use this to discover valid keys before calling settings\_set.

-   **GET** `/api/settings/search-engines`

    List search engines

    List configured search engines (id, name, url). The id is what settings\_set writes to default\_search\_engine\_id and what search accepts as engine\_id.

-   **POST** `/api/settings/search-engines`

    Create search engine

    Add a search engine. The URL must contain the {searchTerms} placeholder where the query is inserted. A bare host gains an https:// prefix. Both name and URL must be unique.

-   **DELETE** `/api/settings/search-engines/{p1}`

    Delete search engine

    Remove a search engine. Refused for the engine currently set as default - point default\_search\_engine\_id at another engine first.

-   **PATCH** `/api/settings/search-engines/{p1}`

    Update search engine

    Rename a search engine, change its URL, or both. Omit a field to leave it unchanged. A changed URL must still contain the {searchTerms} placeholder.

-   **GET** `/api/settings/themes`

    List themes

    List available themes (id, name, is\_dark, is\_core). The id is what settings\_set writes to theme\_id.

-   **POST** `/api/settings/themes`

    Create theme

    Add a custom theme copied from from\_theme\_id (default: the active theme), with any colours given replacing the copied ones. Select it with settings\_set theme\_id. Window, input, button, tooltip and selection text must keep 3:1 contrast with their background; a colour that breaks a pair is refused.

-   **DELETE** `/api/settings/themes/{p1}`

    Delete theme

    Delete a custom theme. Built-in themes are refused. Deleting the active theme switches to the first built-in theme.

-   **GET** `/api/settings/themes/{p1}`

    Get theme

    Get one theme: its name, dark flag, whether it is built in or active, and its 21 palette colours (#rrggbb).

-   **PATCH** `/api/settings/themes/{p1}`

    Update theme

    Rename a custom theme, change some of its colours, or its dark flag. Omitted fields stay as they are. Built-in themes are refused: copy one with theme\_create first. Applies live when the theme is active. Window, input, button, tooltip and selection text must keep 3:1 contrast with their background; a colour that breaks a pair is refused.

### Selenium

W3C WebDriver protocol under /wd/hub, plus MetaDock-specific extensions. Authenticates via the Authorization: Bearer header only (scope selenium); responses use the WebDriver { "value": ... } envelope.

-   **POST** `/wd/hub/session`

    New session

    Create a new browser instance

-   **DELETE** `/wd/hub/session/{sessionId}`

    Delete session

    Close a browser instance

-   **GET** `/wd/hub/session/{sessionId}`

    Get session capabilities

    Navigate a browser to a specific URL

-   **POST** `/wd/hub/session/{sessionId}/back`

    Back

    Navigate browser back in history

-   **DELETE** `/wd/hub/session/{sessionId}/cookie`

    Delete all cookies

    Delete the cookie named name for the current page's URL, or, with all: true, every cookie of the browser's profile on every site (it signs the profile out everywhere). Send exactly one of the two. A key limited to domains cannot delete them all.

-   **GET** `/wd/hub/session/{sessionId}/cookie`

    Get all cookies

    Get the cookies sent to the current page's URL (HttpOnly included), as name and value, or only those named name

-   **POST** `/wd/hub/session/{sessionId}/cookie`

    Add cookie

    Set a cookie for the browser

-   **DELETE** `/wd/hub/session/{sessionId}/cookie/{name}`

    Delete cookie

    Delete the cookie named name for the current page's URL, or, with all: true, every cookie of the browser's profile on every site (it signs the profile out everywhere). Send exactly one of the two. A key limited to domains cannot delete them all.

-   **GET** `/wd/hub/session/{sessionId}/cookie/{name}`

    Get named cookie

    Get the cookies sent to the current page's URL (HttpOnly included), as name and value, or only those named name

-   **POST** `/wd/hub/session/{sessionId}/element`

    Find element

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **GET** `/wd/hub/session/{sessionId}/element/active`

    Get active element

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/attribute/{name}`

    Get element attribute

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/wd/hub/session/{sessionId}/element/{elementId}/clear`

    Element clear

    Clear an input field

-   **POST** `/wd/hub/session/{sessionId}/element/{elementId}/click`

    Element click

    Click an element by CSS selector

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/css/{propertyName}`

    Get element css value

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/wd/hub/session/{sessionId}/element/{elementId}/element`

    Find element from element

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **POST** `/wd/hub/session/{sessionId}/element/{elementId}/elements`

    Find elements from element

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/enabled`

    Is element enabled

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/name`

    Get element tag name

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/property/{name}`

    Get element property

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/rect`

    Get element rect

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/screenshot`

    Take element screenshot

    Screenshot a single element (scrolls it into view, captures just its bounding box). Returns an image. Far smaller than a full-page screenshot when you only need one component.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/selected`

    Is element selected

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/session/{sessionId}/element/{elementId}/text`

    Get element text

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/wd/hub/session/{sessionId}/element/{elementId}/value`

    Element send keys

    Type text at current cursor position

-   **POST** `/wd/hub/session/{sessionId}/elements`

    Find elements

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **POST** `/wd/hub/session/{sessionId}/execute/async`

    Execute async script

    Execute JavaScript code in browser. The value of the last expression is returned; a returned promise is awaited and top-level await works. A thrown exception, or a promise still pending at timeout\_ms, is reported as an error.

-   **POST** `/wd/hub/session/{sessionId}/execute/sync`

    Execute script

    Execute JavaScript code in browser. The value of the last expression is returned; a returned promise is awaited and top-level await works. A thrown exception, or a promise still pending at timeout\_ms, is reported as an error.

-   **POST** `/wd/hub/session/{sessionId}/forward`

    Forward

    Navigate browser forward in history

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-add`

    Selenium adblock add

    Add a new adblock filter list by URL

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-get-override`

    Selenium adblock get override

    Get a profile's adblock override (on/off/inherit) and the effective enabled state

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-get-whitelist`

    Selenium adblock get whitelist

    Without host: list a profile's hosts excepted from adblocking. With host: check whether that host is excepted in the profile. Matching is subdomain-inclusive, so an entry for metadock.app covers www.metadock.app.

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-list`

    Selenium adblock list

    List all adblock filter lists (id, name, url, enabled, rule\_count, last\_updated) and the auto-update schedule

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-remove`

    Selenium adblock remove

    Remove an adblock filter list by id

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-set-override`

    Selenium adblock set override

    Set a profile's adblock override

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-set-state`

    Selenium adblock set state

    Enable or disable a filter list (id + enabled) and/or set the auto-update schedule (auto\_update, auto\_update\_hours). Pass only what changes; answers the same state as adblock\_list

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-set-whitelist`

    Selenium adblock set whitelist

    Add or remove a host from a profile's adblock site exceptions. Adding a host that is already excepted is a no-op, reported as changed=false.

-   **POST** `/wd/hub/session/{sessionId}/metadock/adblock-update`

    Selenium adblock update

    Re-download one filter list by id, or every enabled list when id is omitted

-   **POST** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/click`

    Native app click

    Click at a point inside a mounted native app, in the same pixel coordinates as native\_app\_screenshot. Best effort: some apps ignore synthesized clicks, so prefer native\_app\_uia\_act when the element is in the control tree. Works while other windows cover MetaDock. The click is delivered asynchronously, so allow a moment before taking a screenshot to see its effect. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/key`

    Native app press key

    Press a single named key in a mounted native app, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). No modifier combinations such as Ctrl+S. Delivered asynchronously. Not available for games.

-   **GET** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/screenshot`

    Native app screenshot

    Capture the contents of a mounted native app window. At full size, image pixels match native\_app\_uia\_tree rects and native\_app\_click points; when max\_width shrinks the image, divide image coordinates by the returned scale to get window coordinates. On macOS the image is the whole window, title bar included, and needs the Screen Recording permission. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/type`

    Native app type

    Type text into a mounted native app as keyboard character input, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). Unlike native\_app\_uia\_act 'set\_value', rich editors register it as real typing. Use native\_app\_press\_key for Enter, Tab and other named keys. Delivered asynchronously. Not available for games.

-   **GET** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/uia`

    Native app uia tree

    Read the control tree (UI Automation on Windows, Accessibility on macOS) of a mounted native app: buttons, fields, menus and their ids, names, rects and supported actions. Includes the app's open dialogs and menus. Prefer this plus native\_app\_uia\_act over clicking by pixel. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/apps/{uuid}/uia/act`

    Native app uia act

    Perform an action on a control-tree element of a mounted native app, by the id from native\_app\_uia\_tree. Does not move the mouse or use the keyboard. set\_value can bypass rich-text editors (chat boxes, web-based editors) so the app never sees the text; for those, use 'focus' here and then native\_app\_type. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-create`

    Selenium bookmark create

    Create a bookmark

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-create-category`

    Selenium bookmark create category

    Create a bookmark category and return its id, which bookmark\_create and bookmark\_update take as category\_id.

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-delete`

    Selenium bookmark delete

    Delete a bookmark by id

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-delete-category`

    Selenium bookmark delete category

    Delete a bookmark category. Fails if it still holds bookmarks or child categories unless delete\_contents is true.

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-list`

    Selenium bookmark list

    List bookmarks (id, name, url, category\_id, tags). Optional profile filter. Supports limit + offset paging; response includes total.

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-list-categories`

    Selenium bookmark list categories

    List bookmark categories (id, name, parent\_id, color, path, depth)

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-list-tags`

    Selenium bookmark list tags

    List every distinct tag used across saved bookmarks, sorted alphabetically. Call this to discover valid values for the tags parameter on bookmark\_create and bookmark\_update. Unlike bookmark\_list, this is not scoped to a profile - tags are shared across all bookmarks.

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-open`

    Selenium bookmark open

    Open a bookmark in a new browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-rename-category`

    Selenium bookmark rename category

    Rename a bookmark category

-   **POST** `/wd/hub/session/{sessionId}/metadock/bookmark-update`

    Selenium bookmark update

    Update a bookmark's title, url, and/or category by id (unspecified fields keep their current value)

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-batch`

    Selenium browser batch

    Execute multiple browser operations in sequence on one or multiple browsers (100 operations per browser max)

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-clear-cache`

    Selenium browser clear cache

    Clear this browser's HTTP cache (CDP Network.clearBrowserCache). Does not touch cookies.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-clear-console`

    Selenium browser clear console

    Clear console messages for the browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-clear-input`

    Selenium browser clear input

    Clear an input field

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-clear-storage`

    Selenium browser clear storage

    Clear the page's localStorage or sessionStorage. With a key, removes just that key; without, clears the whole store for the origin.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-click`

    Selenium browser click

    Click an element by CSS selector

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-click-at`

    Selenium browser click at

    Click at raw viewport pixel coordinates using a real (trusted) mouse event. Use when you have coordinates rather than a CSS selector (e.g. from a screenshot or element box).

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-delete-cookies`

    Selenium browser delete cookies

    Delete the cookie named name for the current page's URL, or, with all: true, every cookie of the browser's profile on every site (it signs the profile out everywhere). Send exactly one of the two. A key limited to domains cannot delete them all.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-drag`

    Selenium browser drag

    Drag from one element to another using real (trusted) mouse events: press at the source center, move in steps to the target center, release. Works for sliders, sortable lists, and canvas/custom drag handlers.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-execute-js`

    Selenium browser execute js

    Execute JavaScript code in browser. The value of the last expression is returned; a returned promise is awaited and top-level await works. A thrown exception, or a promise still pending at timeout\_ms, is reported as an error.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-extract`

    Selenium browser extract

    Structured, schema-driven extraction. Provide a 'fields' map of {fieldName: {selector, attr, all}} and get back JSON. attr: 'text' (default), 'html', or an attribute name like 'href'. all:true returns an array of matches.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-find`

    Selenium browser find

    Find visible interactive elements whose role or accessible name matches a text query. Returns matches with CSS selectors usable by browser\_click/browser\_set\_value.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-console`

    Selenium browser get console

    Get console messages from the browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-cookies`

    Selenium browser get cookies

    Get the cookies sent to the current page's URL (HttpOnly included), as name and value, or only those named name

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-element`

    Selenium browser get element

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-fingerprint`

    Selenium browser get fingerprint

    Get a browser profile's fingerprint protection config, with its geolocation override under geo (including the last resolved result in auto mode).

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-forms`

    Selenium browser get forms

    Enumerate forms and their fields {name, id, type, label, placeholder, required, options, selector}. Lets you fill forms by known field names instead of guessing selectors. Password/sensitive values are never returned.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-headers`

    Selenium browser get headers

    List the custom request headers currently applied to a browser. Readable counterpart to browser\_set\_headers. These are session-only and do not survive a restart.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-last-dialog`

    Selenium browser get last dialog

    Get the most recent JavaScript dialog captured for this browser (only captured while a non-default dialog policy is active): {policy, kind, message, uri, captured}.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-links`

    Selenium browser get links

    Extract all hyperlinks on the page as a compact list of {text, href, rel}. Deduplicated. A token-cheap navigation map instead of raw HTML.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-metadata`

    Selenium browser get metadata

    Get page metadata: title, description, canonical URL, author, published/modified dates, language, favicon, Open Graph + Twitter cards, word count and reading time.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-network`

    Selenium browser get network

    List the network requests the page has made (from the Resource Timing API): url, type, protocol, size, and duration, plus navigation timing. Note: does NOT include status codes, headers, or response bodies.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-screenshot`

    Selenium browser get screenshot

    Retrieve a saved screenshot by UUID. Use this after browser\_screenshot with save=true. Screenshots expire after 5 minutes.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-source`

    Selenium browser get source

    Get raw page source HTML. Token-heavy - prefer browser\_read for clean content. Supports clean (strip script/style/svg/etc.) and max\_chars + offset paging to avoid dumping the whole document.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-state`

    Selenium browser get state

    Get a browser's full state: identity, navigation, every field browser\_set\_state and browser\_set\_emulation set (zoom, muted, locked, scripts\_enabled, adblock, profile, headless, dialog\_policy, user\_agent, viewport, emulated\_device, offline), whether ads are blocked (adblock\_effective) and custom request headers. The raw geolocation override is not readable.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-storage`

    Selenium browser get storage

    Read the page's localStorage or sessionStorage. With a key, returns that value; without, returns all entries for the origin.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-get-tables`

    Selenium browser get tables

    Extract HTML tables as markdown (default), CSV, or JSON rows. Avoids the model parsing <td> soup.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-go-back`

    Selenium browser go back

    Navigate browser back in history

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-go-forward`

    Selenium browser go forward

    Navigate browser forward in history

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-history-go`

    Selenium browser history go

    Move within the browser's session history by a relative delta (e.g. -1 = back, 1 = forward, -2 = back twice).

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-hover`

    Selenium browser hover

    Hover the pointer over an element (dispatches pointer/mouse enter+over+move events), triggering hover menus and tooltips. Scrolls the element into view first.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-inject`

    Selenium browser inject

    Add CSS (css) or an external script by URL (script\_url, http or https) to the current page. Send exactly one.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-list-gpu-presets`

    Selenium browser list gpu presets

    List the GPU presets browser\_set\_fingerprint accepts as webgl.gpu\_preset, with a description of each.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-navigate`

    Selenium browser navigate

    Navigate a browser to a specific URL

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-press-key`

    Selenium browser press key

    Send a real (trusted) key press to the focused element via native input. Accepts a named key or a single printable character. Named keys (case-insensitive): Enter/Return, Tab, Escape/Esc, Backspace, Delete/Del, Space, Up/ArrowUp, Down/ArrowDown, Left/ArrowLeft, Right/ArrowRight, Home, End, PageUp, PageDown, Insert, and F1-F24 (F1-F20 on macOS, where Home/End also keep their Mac meaning: they scroll instead of moving the caret). Use this for Enter-to-submit / Tab-between-fields where synthetic JS key events do not work. Modifier combos (Ctrl+A etc.) are not yet supported.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-print-pdf`

    Selenium browser print pdf

    Print page to PDF. Output is restricted to your Documents or Downloads folder.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-read`

    Selenium browser read

    Read the page as clean, LLM-friendly content instead of raw HTML. Strips boilerplate (article mode), converts to markdown or plain text, and supports paging via max\_chars + offset. Prefer this over browser\_get\_source.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-reload`

    Selenium browser reload

    Reload the current page

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-right-click`

    Selenium browser right click

    Right-click (context-menu) an element by dispatching mousedown/mouseup/contextmenu with the secondary button. Scrolls the element into view first.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-screenshot`

    Selenium browser screenshot

    Take a screenshot of the page - returns base64-encoded PNG image data. Use save=true for batch operations to reduce token usage (returns UUID instead of image data, use browser\_get\_screenshot to retrieve).

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-screenshot-element`

    Selenium browser screenshot element

    Screenshot a single element (scrolls it into view, captures just its bounding box). Returns an image. Far smaller than a full-page screenshot when you only need one component.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-scroll`

    Selenium browser scroll

    Scroll the page to x, y (page coordinates, not negative), or by x, y when relative is true

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-cookie`

    Selenium browser set cookie

    Set a cookie for the browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-emulation`

    Selenium browser set emulation

    Change a browser's emulation in one call. Only the fields sent change; null clears a field back to the real value. device sets viewport, pixel ratio, touch and user agent together and survives navigation; a docked browser's own viewport snaps back to its dock, so use device for a stable page size. Answers the full state.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-fingerprint`

    Selenium browser set fingerprint

    Change a browser profile's fingerprint protection, including its geolocation override. Only what is sent changes: a section (canvas, webgl, identity, network, ...) is merged field by field into the stored one. Turning canvas, webgl or audio on also turns protection on. A preset is a new baseline: the config restarts from that preset and the other fields sent apply on top. geo sets the geolocation, timezone and locale override (needs protection on; null removes it). reset: true clears the whole config. The config belongs to the browser's profile and applies to every open browser of it. A named GPU card sets platform to that card's OS, unless identity carries an explicit override\_ua (follow\_profile\_ua=false): then the UA's OS is the platform and a card from another OS is reset to Auto. enabled=false also turns the geolocation override off. Answers the config, as browser\_get\_fingerprint does.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-headers`

    Selenium browser set headers

    Add, change or remove custom HTTP request headers sent by this browser on subsequent requests. headers maps each name to its value, or to null to remove it. Every name is checked first; Authorization, Cookie, Host and Proxy-Authorization are refused. Session-only. Answers the headers now applied.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-state`

    Selenium browser set state

    Change any part of a browser's state in one call: locked, muted, zoom, scripts\_enabled, adblock, profile, headless, dialog\_policy, devtools\_enabled, devtools\_open. Only the fields sent change; every field is checked before any changes. Answers the full state, as browser\_get\_state does.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-storage`

    Selenium browser set storage

    Set a key in the page's localStorage or sessionStorage.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-set-value`

    Selenium browser set value

    Set value of an input element

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-snapshot`

    Selenium browser snapshot

    Token-efficient interactive snapshot: a compact list of visible interactive elements (links, buttons, inputs, selects) each with role, accessible name and a CSS selector usable by browser\_click/browser\_set\_value, plus a heading outline. Far cheaper than a screenshot for driving a page.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-stop`

    Selenium browser stop

    Stop loading the current page

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-submit-form`

    Selenium browser submit form

    Submit a form

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-type`

    Selenium browser type

    Type text at current cursor position

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-upload-file`

    Selenium browser upload file

    Attach files to a file <input> element. You supply the file CONTENT as base64 (not a local path), so the tool never reads the machine's disk. Each file is materialized in-page and assigned to the input.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browser-wait`

    Selenium browser wait

    Wait for something on the page. for: element (selector appears; default timeout 5000), load (the page finishes loading; default 30000), or network\_idle (loaded and no new requests for idle\_ms; default 30000). Use after a navigation or an action that loads content, before reading.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browsers-close`

    Selenium browsers close

    Close many browsers at once: every browser, or only those in layout\_uuid, except keep\_browser\_uuid when given

-   **POST** `/wd/hub/session/{sessionId}/metadock/browsers-create-multiple`

    Selenium browsers create multiple

    Create multiple browsers with different configurations

-   **POST** `/wd/hub/session/{sessionId}/metadock/browsers-list`

    Selenium browsers list

    List the open browsers: uuid, url, title, custom title, profile and layout. layout\_uuid narrows it to one layout.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browsers-run`

    Selenium browsers run

    Run one action on many browsers: reload, stop, back, forward, navigate (url), execute (script; answers each result) or screenshot (saved; answers each screenshot\_uuid for browser\_get\_screenshot; needs browser.capture). Selects the listed browser\_uuids, every browser in layout\_uuid, or every browser.

-   **POST** `/wd/hub/session/{sessionId}/metadock/browsers-set-state`

    Selenium browsers set state

    browser\_set\_state for many browsers: the listed browser\_uuids, every browser in layout\_uuid, or every browser when neither is given. Answers one result per browser.

-   **GET** `/wd/hub/session/{sessionId}/metadock/console`

    Get console

    Get console messages from the browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/console/clear`

    Clear console

    Clear console messages for the browser

-   **POST** `/wd/hub/session/{sessionId}/metadock/download-clear`

    Selenium download clear

    Remove finished downloads (completed, cancelled, failed) from the list, or every download, cancelling running ones first, when completed\_only is false

-   **POST** `/wd/hub/session/{sessionId}/metadock/download-list`

    Selenium download list

    List active/recent downloads (uuid, filename, url, status, bytes, speed, profile). Supports limit + offset paging; response includes total. Pass uuid for just that one download, and profile to list only that profile's downloads.

-   **POST** `/wd/hub/session/{sessionId}/metadock/download-perform`

    Selenium download perform

    Act on one download: pause or resume it, cancel it, or remove it from the list (cancelling it first if it is still running)

-   **POST** `/wd/hub/session/{sessionId}/metadock/download-start`

    Selenium download start

    Start a managed download to the app's configured download directory and return its UUID and initial state. The transfer can be observed and controlled with the other download tools. There is intentionally no destination-path parameter, and the request does not use a browser login session. With profile, the download belongs to that profile and goes through its proxy; a key limited to profiles must name one of them.

-   **POST** `/wd/hub/session/{sessionId}/metadock/extension-install`

    Selenium extension install

    Install an extension into a profile, from the Chrome Web Store or Edge Add-ons (store + store\_id), or from an unpacked folder on this machine (folder, which is copied). Send one source, not both. The extension runs on every page of the profile.

-   **POST** `/wd/hub/session/{sessionId}/metadock/extension-list`

    Selenium extension list

    List a profile's browser extensions: id, name, enabled, and whether it has an options page.

-   **POST** `/wd/hub/session/{sessionId}/metadock/extension-remove`

    Selenium extension remove

    Uninstall one of a profile's extensions and delete its files.

-   **POST** `/wd/hub/session/{sessionId}/metadock/extension-set-state`

    Selenium extension set state

    Enable or disable one of a profile's extensions.

-   **GET** `/wd/hub/session/{sessionId}/metadock/gpu-presets`

    List gpu presets

    List the GPU presets browser\_set\_fingerprint accepts as webgl.gpu\_preset, with a description of each.

-   **POST** `/wd/hub/session/{sessionId}/metadock/history-clear`

    Selenium history clear

    Clear browsing history: one profile's, a time range's, or both. With no arguments, clears all history across every profile. A profile-limited key must name its profile.

-   **POST** `/wd/hub/session/{sessionId}/metadock/history-delete-visit`

    Selenium history delete visit

    Delete a single history visit by visit\_id

-   **POST** `/wd/hub/session/{sessionId}/metadock/history-list`

    Selenium history list

    List/search browsing history visits (visit\_id, uri, title, host, profile, visit\_time, counts)

-   **POST** `/wd/hub/session/{sessionId}/metadock/history-profiles`

    Selenium history profiles

    List distinct profiles that have history visits

-   **POST** `/wd/hub/session/{sessionId}/metadock/history-remove-uri`

    Selenium history remove uri

    Remove all history for a specific URL

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-close-all`

    Selenium layout close all

    Close all dock widgets of specified types, or exactly the docks dock\_uuids names (any dock uuid from layout\_get\_state). Use to bulk-close browsers, native apps, video players, etc. With dock\_uuids an unknown or closed uuid, or one outside layout\_uuid, refuses the call and nothing closes.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-create`

    Selenium layout create

    Create a new layout/dock

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-delete`

    Selenium layout delete

    Delete a layout/dock

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-get-state`

    Selenium layout get state

    Get a layout's full state: lock, fullscreen, window state, size and fixed resolution, mute, new-dock placement, workspace-switch sync, UI toggles, and every dock with its area, focus, floating, maximized and tabbed state. layout\_set\_state takes the same fields.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-list`

    Selenium layout list

    List all available layouts/docks

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-move-dock`

    Selenium layout move dock

    Move a dock beside its neighbour in a direction (or to that edge of the layout), or send it to another open layout. Send recreates the dock there, so it answers the dock's new uuid. A locked layout refuses both.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-open-dock`

    Selenium layout open dock

    Open a non-browser dock in the layout: downloads, history, bookmarks (the layout's profile), or a new-window panel. Settings is a floating panel, not a dock; change settings with settings\_set. beside\_dock\_uuid opens it next to an open dock of the same layout instead of where new docks normally go. Answers the new dock's dock\_uuid, which layout\_move\_dock and layout\_set\_dock\_state take.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-perform`

    Selenium layout perform

    Run a layout action: equalize (share space evenly between the tiled docks), reset (re-dock everything into the automatic grid) or restore\_closed (reopen the most recently closed browser; answers its browser\_uuid).

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-screenshot`

    Selenium layout screenshot

    Screenshot the layout window at its exact dimensions. Captures dock chrome only - content areas come out black. Use browser\_screenshot for page content.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-set-dock-state`

    Selenium layout set dock state

    Change one dock's state: focus it (also selects its tab), float or re-dock it, maximize it (show it alone), gather its neighbouring areas into tabs (tabbed: true) or split its tabs into panels (tabbed: false), or resize its area (width, height) by moving the splitters beside it; the other docks share the change. Applied in the order floating, tabbed, width, height, maximized, focused; stops at the first that fails. A locked layout refuses floating, tabbed, width and height.

-   **POST** `/wd/hub/session/{sessionId}/metadock/layout-set-state`

    Selenium layout set state

    Change any part of a layout's state in one call. Every field is optional and only the fields sent change. Answers the full state, as layout\_get\_state does.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-click`

    Selenium native app click

    Click at a point inside a mounted native app, in the same pixel coordinates as native\_app\_screenshot. Best effort: some apps ignore synthesized clicks, so prefer native\_app\_uia\_act when the element is in the control tree. Works while other windows cover MetaDock. The click is delivered asynchronously, so allow a moment before taking a screenshot to see its effect. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-dismount`

    Selenium native app dismount

    Dismount (unembed) a native app dock by UUID

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-get-state`

    Selenium native app get state

    Get the state of a mounted native app dock by UUID: process, title, layout, lock and whether it is still running

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-list`

    Selenium native app list

    List native app docks mounted in a layout (full JSON)

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-list-processes`

    Selenium native app list processes

    List visible top-level OS windows that can be mounted as native app docks, including process name, PID, window title and whether the process is a game

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-mount`

    Selenium native app mount

    Mount a running native window as a dock in a layout

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-press-key`

    Selenium native app press key

    Press a single named key in a mounted native app, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). No modifier combinations such as Ctrl+S. Delivered asynchronously. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-screenshot`

    Selenium native app screenshot

    Capture the contents of a mounted native app window. At full size, image pixels match native\_app\_uia\_tree rects and native\_app\_click points; when max\_width shrinks the image, divide image coordinates by the returned scale to get window coordinates. On macOS the image is the whole window, title bar included, and needs the Screen Recording permission. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-set-state`

    Selenium native app set state

    Set a native app dock's lock and custom title. Pass only the fields to change; answers the resulting state

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-type`

    Selenium native app type

    Type text into a mounted native app as keyboard character input, sent to whichever control has focus inside the app (focus one first with native\_app\_uia\_act 'focus'). Unlike native\_app\_uia\_act 'set\_value', rich editors register it as real typing. Use native\_app\_press\_key for Enter, Tab and other named keys. Delivered asynchronously. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-uia-act`

    Selenium native app uia act

    Perform an action on a control-tree element of a mounted native app, by the id from native\_app\_uia\_tree. Does not move the mouse or use the keyboard. set\_value can bypass rich-text editors (chat boxes, web-based editors) so the app never sees the text; for those, use 'focus' here and then native\_app\_type. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/native-app-uia-tree`

    Selenium native app uia tree

    Read the control tree (UI Automation on Windows, Accessibility on macOS) of a mounted native app: buttons, fields, menus and their ids, names, rects and supported actions. Includes the app's open dialogs and menus. Prefer this plus native\_app\_uia\_act over clicking by pixel. Not available for games.

-   **POST** `/wd/hub/session/{sessionId}/metadock/pdf`

    Print pdf

    Print page to PDF. Output is restricted to your Documents or Downloads folder.

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-clear`

    Selenium permission clear

    Forget every remembered permission decision of a profile, for all hosts

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-list`

    Selenium permission list

    List a profile's remembered site permission decisions (profile, host, permission\_type, label, allowed). Decisions are per profile.

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-list-types`

    Selenium permission list types

    List every permission type that can be granted or denied, with a human-readable label. Call this to discover valid permission\_type values for permission\_set and permission\_remove.

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-remove`

    Selenium permission remove

    Forget one of a profile's remembered permission decisions for a host. permission\_type is the stored value from permission\_list or permission\_list\_types

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-remove-host`

    Selenium permission remove host

    Forget every one of a profile's remembered permission decisions for a host

-   **POST** `/wd/hub/session/{sessionId}/metadock/permission-set`

    Selenium permission set

    Remember a profile's permission decision for a host, as if the user had answered a prompt with 'remember this choice'. Takes effect immediately, without a restart.

-   **GET** `/wd/hub/session/{sessionId}/metadock/permissions`

    List site permissions

    List a profile's remembered site permission decisions (profile, host, permission\_type, label, allowed). Decisions are per profile.

-   **POST** `/wd/hub/session/{sessionId}/metadock/permissions/clear`

    Clear site permissions

    Forget every remembered permission decision of a profile, for all hosts

-   **POST** `/wd/hub/session/{sessionId}/metadock/permissions/remove`

    Remove site permission

    Forget one of a profile's remembered permission decisions for a host. permission\_type is the stored value from permission\_list or permission\_list\_types

-   **POST** `/wd/hub/session/{sessionId}/metadock/permissions/remove-host`

    Remove site host permissions

    Forget every one of a profile's remembered permission decisions for a host

-   **POST** `/wd/hub/session/{sessionId}/metadock/profile-create`

    Selenium profile create

    Create a new browser profile. temporary: true makes one that MetaDock removes when it exits (or, after a crash, when it next starts).

-   **POST** `/wd/hub/session/{sessionId}/metadock/profile-delete`

    Selenium profile delete

    Delete a browser profile and everything stored under it. Refused for the last permanent profile and for a profile an open browser uses; close its browsers first

-   **POST** `/wd/hub/session/{sessionId}/metadock/profile-get-state`

    Selenium profile get state

    Get a profile's state, including one locked by the plan's profile limit: default, temporary, locked, colour, fingerprint protection, the sites it was recorded as signed in to, and its proxy with any credentials stripped.

-   **POST** `/wd/hub/session/{sessionId}/metadock/profile-list`

    Selenium profile list

    List the usable browser profiles: which one is the default, which are temporary, and which have a proxy configured; locked names the profiles the plan's profile limit locks. Does not return proxy values - the stored form embeds credentials.

-   **POST** `/wd/hub/session/{sessionId}/metadock/profile-set-state`

    Selenium profile set state

    Change a profile in one call: new\_name (rename), default (true makes it the default profile), proxy or proxy\_id, color, fingerprint, active (unlock a profile the plan's limit locks). Only the fields sent change; every field is checked first. A proxy applies to browsers opened after every browser on the profile is closed. Answers the state.

-   **POST** `/wd/hub/session/{sessionId}/metadock/proxy-create`

    Selenium proxy create

    Save a proxy to the library without binding it to a profile (profile\_set\_state proxy\_id binds one). Saving an address the library already has answers that entry. Pro only.

-   **POST** `/wd/hub/session/{sessionId}/metadock/proxy-delete`

    Selenium proxy delete

    Delete a saved proxy. Every profile bound to it is left with no proxy (answered as unbound); their open browsers keep it until they are all closed.

-   **POST** `/wd/hub/session/{sessionId}/metadock/proxy-list`

    Selenium proxy list

    List the saved proxy library, the entries the proxy dialog offers: id, label, address with credentials stripped, and the profiles bound to each.

-   **POST** `/wd/hub/session/{sessionId}/metadock/search`

    Selenium search

    Run a search query in a new browser using the default (or specified) search engine

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-alias-delete`

    Selenium search alias delete

    Delete a website alias

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-alias-list`

    Selenium search alias list

    List website aliases (short keyword -> URL shortcuts used in the omnibox)

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-alias-resolve`

    Selenium search alias resolve

    Resolve a website alias to its URL

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-alias-set`

    Selenium search alias set

    Create or update a website alias

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-engine-create`

    Selenium search engine create

    Add a search engine. The URL must contain the {searchTerms} placeholder where the query is inserted. A bare host gains an https:// prefix. Both name and URL must be unique.

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-engine-delete`

    Selenium search engine delete

    Remove a search engine. Refused for the engine currently set as default - point default\_search\_engine\_id at another engine first.

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-engine-list`

    Selenium search engine list

    List configured search engines (id, name, url). The id is what settings\_set writes to default\_search\_engine\_id and what search accepts as engine\_id.

-   **POST** `/wd/hub/session/{sessionId}/metadock/search-engine-update`

    Selenium search engine update

    Rename a search engine, change its URL, or both. Omit a field to leave it unchanged. A changed URL must still contain the {searchTerms} placeholder.

-   **POST** `/wd/hub/session/{sessionId}/metadock/settings-get`

    Selenium settings get

    Get current values of application settings (the readable counterpart to settings\_set) - behaviour/features, appearance, browsing, and API-surface flags. The API key/secret is never returned.

-   **POST** `/wd/hub/session/{sessionId}/metadock/settings-list`

    Selenium settings list

    List every application setting with its type, whether it is writable, its current value, permitted values and bounds. Use this to discover valid keys before calling settings\_set.

-   **POST** `/wd/hub/session/{sessionId}/metadock/settings-set`

    Selenium settings set

    Set an application setting by key. Call settings\_list first for each key's type, permitted values, bounds and whether it is writable.

-   **POST** `/wd/hub/session/{sessionId}/metadock/theme-create`

    Selenium theme create

    Add a custom theme copied from from\_theme\_id (default: the active theme), with any colours given replacing the copied ones. Select it with settings\_set theme\_id. Window, input, button, tooltip and selection text must keep 3:1 contrast with their background; a colour that breaks a pair is refused.

-   **POST** `/wd/hub/session/{sessionId}/metadock/theme-delete`

    Selenium theme delete

    Delete a custom theme. Built-in themes are refused. Deleting the active theme switches to the first built-in theme.

-   **POST** `/wd/hub/session/{sessionId}/metadock/theme-get-state`

    Selenium theme get state

    Get one theme: its name, dark flag, whether it is built in or active, and its 21 palette colours (#rrggbb).

-   **POST** `/wd/hub/session/{sessionId}/metadock/theme-list`

    Selenium theme list

    List available themes (id, name, is\_dark, is\_core). The id is what settings\_set writes to theme\_id.

-   **POST** `/wd/hub/session/{sessionId}/metadock/theme-set-state`

    Selenium theme set state

    Rename a custom theme, change some of its colours, or its dark flag. Omitted fields stay as they are. Built-in themes are refused: copy one with theme\_create first. Applies live when the theme is active. Window, input, button, tooltip and selection text must keep 3:1 contrast with their background; a colour that breaks a pair is refused.

-   **POST** `/wd/hub/session/{sessionId}/metadock/video-get-state`

    Selenium video get state

    One video player's state, or every player's when uuid is omitted: source, playing, position, duration, volume, muted, loop.

-   **POST** `/wd/hub/session/{sessionId}/metadock/video-open`

    Selenium video open

    Open a video player dock and start playing a stream URL or a media file on this machine. Send url or path, not both.

-   **POST** `/wd/hub/session/{sessionId}/metadock/video-set-state`

    Selenium video set state

    Change a video player in one call: playing, position\_ms (seek), volume, muted, loop. Only the fields sent change; every field is checked first. Answers the state.

-   **POST** `/wd/hub/session/{sessionId}/metadock/video-snapshot`

    Selenium video snapshot

    Capture the frame a video player is showing, as a PNG image.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-create`

    Selenium workspace create

    Create a new workspace. temporary: true makes one that is deleted when a window switches away from it.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-delete`

    Selenium workspace delete

    Delete a workspace

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-export`

    Selenium workspace export

    Export a workspace as text, the same content as an exported .mws file. Pass data to workspace\_import to recreate it. No file is written.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-get-state`

    Selenium workspace get state

    Get a workspace's full state: name, homepage, startup, temporary, current, and its layouts (one per window, by app\_index).

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-import`

    Selenium workspace import

    Create a workspace from exported text (workspace\_export's data, or an .mws file's content). Profiles it names that do not exist become the default profile. A browser dock whose page the ad blocker blocks is left out and listed in skipped. Use workspace\_switch to open it.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-list`

    Selenium workspace list

    List every workspace, marking the current, startup and temporary ones

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-perform`

    Selenium workspace perform

    Run a workspace action. save: write every open window's workspace now. install\_presets: install the bundled preset workspaces; an existing preset is overwritten only with overwrite: true.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-set-state`

    Selenium workspace set state

    Change a workspace in one call: name, homepage, startup. Only the fields sent change; every field is checked before any changes. Answers the full state, as workspace\_get\_state does.

-   **POST** `/wd/hub/session/{sessionId}/metadock/workspace-switch`

    Selenium workspace switch

    Switch the windows to a different workspace. Every open dock is closed and the workspace's docks are loaded.

-   **POST** `/wd/hub/session/{sessionId}/refresh`

    Refresh

    Reload the current page

-   **GET** `/wd/hub/session/{sessionId}/screenshot`

    Take screenshot

    Take a screenshot of the page - returns base64-encoded PNG image data. Use save=true for batch operations to reduce token usage (returns UUID instead of image data, use browser\_get\_screenshot to retrieve).

-   **GET** `/wd/hub/session/{sessionId}/source`

    Get page source

    Get raw page source HTML. Token-heavy - prefer browser\_read for clean content. Supports clean (strip script/style/svg/etc.) and max\_chars + offset paging to avoid dumping the whole document.

-   **GET** `/wd/hub/session/{sessionId}/timeouts`

    Get timeouts

    Navigate a browser to a specific URL

-   **POST** `/wd/hub/session/{sessionId}/timeouts`

    Set timeouts

    Navigate a browser to a specific URL

-   **GET** `/wd/hub/session/{sessionId}/title`

    Get title

    Get a browser's full state: identity, navigation, every field browser\_set\_state and browser\_set\_emulation set (zoom, muted, locked, scripts\_enabled, adblock, profile, headless, dialog\_policy, user\_agent, viewport, emulated\_device, offline), whether ads are blocked (adblock\_effective) and custom request headers. The raw geolocation override is not readable.

-   **GET** `/wd/hub/session/{sessionId}/url`

    Get current url

    Get a browser's full state: identity, navigation, every field browser\_set\_state and browser\_set\_emulation set (zoom, muted, locked, scripts\_enabled, adblock, profile, headless, dialog\_policy, user\_agent, viewport, emulated\_device, offline), whether ads are blocked (adblock\_effective) and custom request headers. The raw geolocation override is not readable.

-   **POST** `/wd/hub/session/{sessionId}/url`

    Navigate to

    Navigate a browser to a specific URL

-   **DELETE** `/wd/hub/session/{sessionId}/window`

    Close window

    Close a browser instance

-   **GET** `/wd/hub/session/{sessionId}/window`

    Get window handle

    Navigate a browser to a specific URL

-   **GET** `/wd/hub/session/{sessionId}/window/handles`

    Get all window handles

    Navigate a browser to a specific URL

-   **GET** `/wd/hub/session/{sessionId}/window/rect`

    Get window rect

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **POST** `/wd/hub/session/{sessionId}/window/rect`

    Set window rect

    Read the first element matching a CSS selector in one call: text content, whether it is visible, its viewport box and key computed styles, and the value of attribute when one is named.

-   **GET** `/wd/hub/status`

    Get status

### CDP

Chrome DevTools Protocol: HTTP discovery endpoints (/json/...) and WebSocket upgrade endpoints (/devtools/...) speaking CDP JSON-RPC.

-   **GET** `/json`

    Get target list alias

-   **GET** `/json/close/{targetId}`

    Close target

-   **GET** `/json/list`

    Get target list

-   **GET** `/json/new`

    Create target

-   **GET** `/json/protocol`

    Get protocol

-   **GET** `/json/version`

    Get version

### Other

-   **POST** `/api/docks/{uuid}/move`

    Execute dock action

    Move a dock beside its neighbour in a direction (or to that edge of the layout), or send it to another open layout. Send recreates the dock there, so it answers the dock's new uuid. A locked layout refuses both.

-   **POST** `/api/docks/{uuid}/state`

    Execute dock action

    Change one dock's state: focus it (also selects its tab), float or re-dock it, maximize it (show it alone), gather its neighbouring areas into tabs (tabbed: true) or split its tabs into panels (tabbed: false), or resize its area (width, height) by moving the splitters beside it; the other docks share the change. Applied in the order floating, tabbed, width, height, maximized, focused; stops at the first that fails. A locked layout refuses floating, tabbed, width and height.

### Extension

-   **GET** `/api/extensions/{profile}`

    List extensions

    List a profile's browser extensions: id, name, enabled, and whether it has an options page.

-   **POST** `/api/extensions/{profile}/install`

    Install extension

    Install an extension into a profile, from the Chrome Web Store or Edge Add-ons (store + store\_id), or from an unpacked folder on this machine (folder, which is copied). Send one source, not both. The extension runs on every page of the profile.

-   **POST** `/api/extensions/{profile}/remove`

    Remove extension

    Uninstall one of a profile's extensions and delete its files.

-   **POST** `/api/extensions/{profile}/state`

    Set extension state

    Enable or disable one of a profile's extensions.

### Video

-   **GET** `/api/videos`

    List video players

    One video player's state, or every player's when uuid is omitted: source, playing, position, duration, volume, muted, loop.

-   **POST** `/api/videos`

    Open video

    Open a video player dock and start playing a stream URL or a media file on this machine. Send url or path, not both.

-   **GET** `/api/videos/{uuid}`

    Get video state

    One video player's state, or every player's when uuid is omitted: source, playing, position, duration, volume, muted, loop.

-   **GET** `/api/videos/{uuid}/snapshot`

    Get video snapshot

    Capture the frame a video player is showing, as a PNG image.

-   **POST** `/api/videos/{uuid}/state`

    Set video state

    Change a video player in one call: playing, position\_ms (seek), volume, muted, loop. Only the fields sent change; every field is checked first. Answers the state.

Loading interactive API tools. [Browse the endpoint reference above](https://metadock.app/api-docs#endpoint-reference) or [download the specification](https://metadock.app/openapi.yaml).
