Browser CLI icon

Browser CLI

Control a remote browser by talking directly to a browser-cli serve endpoint

Page → Extract HTML

AI-generated

Summary

Extracts raw HTML from the active browser page, optionally scoped to elements matching a CSS selector. The browser-cli serve endpoint must permit page reads (--allow-read-page).

Inputs

  • Selector — Optional CSS selector used to scope the extraction; leave empty to use the whole page.

Output shape

One or more n8n items containing the raw command result as JSON.

The node unwraps the response's data field when present and emits each array element as a separate item; non-object values are wrapped in a result property. This returns the raw extract.html payload without SDK-side rendering.

Examples

Example 1: Extract HTML for a page section

Set Selector to #main or .content; leave it empty to extract the whole page.

Links

Discussion