Skip to main content

Documentation 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.

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 reads 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 the Authorization header.
Authorization: Bearer <token>

Path Parameters

id
string
required
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 response Content-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:
IndexContent
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

curl http://localhost:8000/api/v1/scans/a1b2c3d4e5f6g7h8/html \
  -H 'Authorization: Bearer <token>' \
  --output page.html

Inspect Inline Scripts from the Command Line

After saving the file, you can use standard Unix tools to search the markup:
# Extract all <script> blocks for analysis
grep -o '<script[^>]*>.*</script>' page.html

# Count external resource references
grep -c 'src=' page.html

Verify a Successful Download

curl http://localhost:8000/api/v1/scans/a1b2c3d4e5f6g7h8/html \
  -H 'Authorization: Bearer <token>' \
  --output page.html \
  --write-out "HTTP %{http_code} — %{size_download} bytes\n"
Expected output:
HTTP 200 — 48312 bytes
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.

Build docs developers (and LLMs) love