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
| Parameter | Type | Description |
|---|---|---|
url | string | The page’s absolute http or https address. Required |
sanitize | boolean or null | true 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
| Field | Description |
|---|---|
success | true |
url | The address fetched |
html | The page’s HTML, sanitized unless sanitize was false |
raw_length | The length of the page as fetched, in characters |
truncated | true when the page was longer than max_bytes and was cut to it |
max_bytes | 153600 (150 KB) |
sanitized | Whether 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
httpandhttpsare allowed. - Size cap. Anything past the first 153,600 characters is cut off, and
truncatedsays so. - One retry. A failed request is tried once more before the skill reports an error.
Related skills: Read Site | Create Site