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 Get Scan endpoint retrieves a single scan record by its unique ID. The HTTP status code reflects the scan’s current state: while the scan is pending or running, the server responds with 202 Accepted and sets a Location header pointing back to the same URL, signalling that the client should continue polling. Once the scan reaches done or error, the server responds with 200 OK and returns the fully populated record including all artifacts and metadata.

Request

GET /api/v1/scans/:id

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 to retrieve. This is the id field returned when the scan was created.

Response

HTTP 200 OK — Scan Complete

Returned when status is done or error. The response body contains the full scan record with all fields populated.

HTTP 202 Accepted — Scan In Progress

Returned when status is pending or running. The response body contains the partial scan record, and the Location response header is set to the same endpoint URL. Poll again after a short delay.
HeaderValue
Location/api/beta/scans/<id> — retry this URL to check for completion

Response Fields

id
string
Unique identifier for the scan record.
slug
string
Human-readable identifier in hostname-timestamp format. Useful for display and logging purposes.
url
string
The original URL that was submitted for scanning.
status
string
Current scan status. One of pending, running, done, or error.
created
string
ISO 8601 timestamp of when the scan record was created.
updated
string
ISO 8601 timestamp of when the scan record was last updated.
errorMessage
string
Human-readable error description. Populated only when status is error.
html
array
Array of file IDs for captured files. Index 0 is the HTML source; index 1 is the network trace JSON. Empty until the scan completes.
screenshots
array
Array of file IDs for captured PNG screenshots. Empty until the scan completes.
files
array
Array of additional file IDs associated with the scan.
done_at
string
ISO 8601 timestamp of when the scan completed. Empty string until the scan finishes.
final_url
string
The final URL reached after all redirects were followed. May differ significantly from the submitted url.
options
object
The ScanOptions applied to this scan.
scanData
object
Fully structured scan metadata. Follows the ScanDataV1_1 schema.

Examples

Request

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

Response — HTTP 200 OK (Scan Done)

{
  "id": "a1b2c3d4e5f6g7h8",
  "slug": "example.com-1714001200",
  "url": "https://example.com",
  "status": "done",
  "created": "2024-04-25T10:00:00.000Z",
  "updated": "2024-04-25T10:00:45.000Z",
  "errorMessage": "",
  "html": ["a1b2c3d4e5f6g7h8_abc123index.html", "a1b2c3d4e5f6g7h8_def456trace.json"],
  "screenshots": ["a1b2c3d4e5f6g7h8_ghi789screenshot.png"],
  "files": [],
  "done_at": "2024-04-25T10:00:45.000Z",
  "final_url": "https://example.com/",
  "options": {
    "rate": "balanced",
    "screenshotSize": "full"
  },
  "scanData": {
    "version": "1.1",
    "document": {
      "title": "Example Domain",
      "url": "https://example.com/",
      "origin": "https://example.com",
      "protocol": "https:",
      "links": ["https://www.iana.org/domains/reserved"]
    },
    "request": {
      "type": "request",
      "url": "https://example.com/",
      "headers": {
        "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36",
        "accept": "text/html,application/xhtml+xml"
      },
      "method": "GET",
      "resourceType": "document",
      "redirectChain": [],
      "ts": 1714001210000
    },
    "response": {
      "type": "response",
      "url": "https://example.com/",
      "ts": 1714001210850,
      "status": 200,
      "remoteAddress": {
        "ip": "93.184.216.34",
        "port": 443
      },
      "timing": null,
      "headers": {
        "content-type": "text/html; charset=UTF-8",
        "cache-control": "max-age=604800"
      }
    },
    "scanOptions": { "rate": "balanced", "screenshotSize": "full" },
    "scannerConfig": {
      "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36",
      "lang": "en-US",
      "useStealth": false,
      "useSkipCookiePrompt": false
    },
    "meta": {
      "scannedByScanner": "scanner-primary",
      "initiatedBy": "user123",
      "initiatedByType": "user",
      "initiatedAt": "2024-04-25T10:00:00.000Z",
      "startedAt": "2024-04-25T10:00:10.000Z",
      "completedAt": "2024-04-25T10:00:45.000Z",
      "duration": 35000
    }
  }
}

Response — HTTP 202 Accepted (Scan Pending)

{
  "id": "a1b2c3d4e5f6g7h8",
  "slug": "example.com-1714001200",
  "url": "https://example.com",
  "status": "pending",
  "created": "2024-04-25T10:00:00.000Z",
  "updated": "2024-04-25T10:00:00.000Z",
  "errorMessage": "",
  "html": [],
  "screenshots": [],
  "files": [],
  "done_at": "",
  "final_url": "",
  "options": { "rate": "balanced" },
  "scanData": null
}
The slug field provides a stable human-readable label in hostname-timestamp format (e.g. malicious-site.example-1714001200). Use it when displaying scan results in logs or dashboards where raw IDs are difficult to interpret at a glance.

Build docs developers (and LLMs) love