Title: Get a page's HTML Upstream: POST /webhook/scrape-wp with formats: ["html"]

Fetches the HTML of a single URL. Use it when you have no selectors yet and need to see the markup to decide what to target. By default the document is condensed for reading and capped in size, and an html_meta block reports exactly what was done.

Parameters

  • apiKey (string, required).
  • url (string, required) — the page to fetch.
  • mode ("browser" \| "http") — browser for JavaScript-rendered pages, http for static ones.
  • wait_until ("load" \| "domcontentloaded" \| "networkidle") — lifecycle event to wait for before capturing.
  • actions (Action array) — interactions performed before capturing.
  • strip (boolean, default true) — remove executable <script>, <style>, <svg> and comments. Scripts that carry JSON (JSON-LD, __NEXT_DATA__) are always kept.
  • max_chars (integer, default 150000, minimum 1000) — cap on returned characters, applied after stripping.
  • options (Options object) — same as on scrape_unblocker.

Example

{
  "name": "get_html",
  "arguments": {
    "apiKey": "js_YOUR_API_KEY",
    "url": "https://shop.example.com/c/dresses",
    "mode": "http"
  }
}
{
  "html": "<!DOCTYPE html><html><head><title>Dresses</title>...",
  "html_meta": {
    "chars_received": 496486,
    "chars_returned": 150000,
    "sha256": "3f1c…9a2e",
    "stripped": true,
    "truncated": true,
    "note": "Executable <script>, <style>, <svg> and comments removed (496486 -> 212310 chars); JSON-LD and __NEXT_DATA__ scripts were kept. Cut to the first 150000 chars of 212310. …"
  }
}

The html_meta block

  • chars_received — size of the document as received, before any processing.
  • chars_returned — size of what you got.
  • sha256 — fingerprint of the received document. A different hash for the same URL means the site served a different page.
  • stripped — whether scripts, styles, SVGs and comments were removed.
  • truncated — whether max_chars cut the text.
  • note — a plain-language summary of the above and what to do next.

Why stripping is on by default

On a modern single-page application, scripts and inline CSS are most of the bytes and none of the information. One measured page carried 120 KB of inline CSS in <head> alone. Returned verbatim it would overflow the agent's context before any of it could be read. Set strip: false only when you need the byte-for-byte document.

get_html and scrape_unblocker are separate fetchers against separate services. A site can serve them different documents for the same URL. Seeing an element here is not proof a selector will match in a scrape; confirm with a real scrape_unblocker call and its diagnostics.

If a page does not fit even after stripping, stop reading whole pages. Extract fields with scrape_unblocker, or find the page's JSON API with discover_api_endpoints, rather than raising max_chars.

Last updated: September 22, 2026