Skill: Retrieve Site

Fetch the HTML of a public web page by its address, sanitized by default and capped in size, so the Web Builder can read a reference page or a site you don't host on Horizon.

Retrieve Site fetches the HTML of a public web page, such as a page a person points the Web Builder to as a reference. To read the source of one of your organization’s own sites, the Web Builder uses Read Site instead.

Parameters

ParameterTypeDescription
urlstringThe page’s absolute http or https address. Required
sanitizeboolean or nulltrue or null (the default) strips scripts, iframes, object, embed and base tags, inline event handlers and javascript: links. Only false returns the HTML as fetched

Response

FieldDescription
successtrue
urlThe address fetched
htmlThe page’s HTML, sanitized unless sanitize was false
raw_lengthThe length of the page as fetched, in characters
truncatedtrue when the page was longer than max_bytes and was cut to it
max_bytes153600 (150 KB)
sanitizedWhether the HTML was sanitized

Behavior

  • One page, no crawling. The skill fetches the one address it is given, following redirects. It doesn’t fetch the page’s images, stylesheets or linked pages.
  • Public addresses only. Horizon checks every request against the address it resolves to and refuses private and internal networks. Only http and https are allowed.
  • Size cap. Anything past the first 153,600 characters is cut off, and truncated says so.
  • One retry. A failed request is tried once more before the skill reports an error.

Related skills: Read Site | Create Site