Actions72
- Tab Actions
- Page Actions
- DOM Actions
- Group Actions
- Window Actions
- Session Actions
- Storage Actions
- Performance Actions
- Extension Actions
- Client Actions
- Command Actions
Page → Extract HTML
AI-generatedSummary
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
datafield when present and emits each array element as a separate item; non-object values are wrapped in aresultproperty. This returns the rawextract.htmlpayload 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.