Extract HTML

Node catalog Transformations
On this page

Extract multiple named fields from HTML using CSS selectors

Usage and specifics

Each rule maps an output name to a CSS selector and extraction mode. Choose text, HTML or an attribute for the required data.

Technical type : extract_html. Runtime : nodulz.

Credentials and prerequisites

This node defines no dedicated external credential. Remote sources or execution targets may still need their own access credentials.

See the credentials guide if a remote source or execution target requires access.

Parameters

Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.

Parameter Type Default Values / limits
field string "body" -
rules array [{"name":"title","selector":"h1","mode":"text","attribute":"href","multiple":false},{"name":"links","selector":"a","mode":"attribute","attribute":"href","multiple":true}] -
rules[].name string "title" -
rules[].selector string "h1" -
rules[].mode enum "text" text, html, outer_html, attribute
rules[].attribute string "href" -
rules[].multiple boolean false -
selector string "" -
mode enum "text" text, html, outer_html, attribute
attribute string "href" -
multiple boolean true -

Configuration help

field
Field
JavaScript expression or path: input.body.title, Object.keys(input.body.meta), nodes.http1.body.data.length.

Examples

  • HTML field: nodes.http1.body
  • Rules: title → h1 · links → a[href] (all matches)
  • Output: nodes.extract1.extracted.title and .extracted.links

Initial configuration

Initial catalog configuration example, to adapt before running. Keep secrets in credentials.

json
{
  "field": "body",
  "rules": [
    {
      "name": "title",
      "selector": "h1",
      "mode": "text",
      "attribute": "href",
      "multiple": false
    },
    {
      "name": "links",
      "selector": "a",
      "mode": "attribute",
      "attribute": "href",
      "multiple": true
    }
  ]
}

Verification

Test with representative data. Check node output in the inspector and logs, then use editor mapping for downstream fields. A trigger test with a simulated payload does not validate external service delivery.

See also : Expressions and data, Executions, Node catalog.