The HTML Source endpoint serves the raw HTML file captured by the headless browser at the end of a completed scan. The file reflects the fully rendered DOM state of the page — after JavaScript execution and dynamic content injection — making it especially valuable for offline analysis of phishing pages, malicious redirects, and obfuscated markup. This endpoint readsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/webhood-io/webhood/llms.txt
Use this file to discover all available pages before exploring further.
html[0] from the scan record; html[1] holds the network trace and is served by the /trace endpoint.
Request
GET /api/v1/scans/:id/html
Authentication
All requests require a valid Bearer token in theAuthorization header.
Path Parameters
The unique identifier of the scan record whose captured HTML you want to download. Must correspond to a scan with
status of done.Response
Returns the raw HTML file captured during the scan. The responseContent-Type reflects the stored file type (text/html). The content represents the page’s serialized DOM at the point when the scanner finished — not the original server-sent source — so inline scripts, injected nodes, and dynamically loaded content are all included.
The html array on the scan record stores up to two file IDs:
| Index | Content |
|---|---|
html[0] | Captured HTML source — served by this endpoint |
html[1] | Network trace JSON — served by GET /api/v1/scans/:id/trace |
Examples
Download and Save the HTML
Inspect Inline Scripts from the Command Line
After saving the file, you can use standard Unix tools to search the markup:Verify a Successful Download
This endpoint returns HTTP 404 if no HTML was captured for the scan. This can occur when the scan errored before the browser could serialize the DOM, or if the scan has not yet completed. Verify the scan’s
status is done and that the html array contains at least one entry before calling this endpoint.