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 List Scans endpoint returns an array of scan records stored in your Webhood instance. You can filter results by any scan field, control sort order, and paginate through large result sets using the limit and offset parameters. All query parameters follow PocketBase filter and sort syntax.

Request

GET /api/v1/scans

Authentication

All requests require a valid Bearer token in the Authorization header.
Authorization: Bearer <token>

Query Parameters

filter
string
A PocketBase filter expression to narrow results. Fields available for filtering include status, url, slug, created, updated, and final_url.Example: status = "done" or url ~ "example.com"
sort
string
Field name to sort results by. Prefix with - for descending order, or omit the prefix for ascending order.Example: -created (newest first) or created (oldest first)
limit
integer
Maximum number of scan records to return in a single response. Use together with offset to paginate through results.
offset
integer
Number of records to skip before returning results. Use together with limit to implement pagination.

Response

Returns an array of scan record objects. Each object contains the full scan metadata including status, URL, timestamps, and file references.

Response Fields

id
string
Unique identifier for the scan record.
slug
string
Human-readable identifier in hostname-timestamp format, e.g. example.com-1714000000.
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
Error description, populated only when status is error.
html
array
Array of file IDs for captured HTML and trace files. Index 0 is the HTML file; index 1 is the network trace.
screenshots
array
Array of file IDs for captured PNG screenshots.
files
array
Array of additional file IDs associated with the scan.
done_at
string
ISO 8601 timestamp of when the scan completed. Null if not yet finished.
final_url
string
The final URL after all redirects were followed. May differ from the submitted url.
options
object
The ScanOptions that were applied to this scan.
scanData
object
Structured scan metadata including document details, initial request/response, and scanner configuration. Matches the ScanDataV1_1 schema.

Examples

Request

curl 'http://localhost:8000/api/v1/scans?filter=status%20%3D%20%22done%22&sort=-created&limit=2' \
  -H 'Authorization: Bearer <token>'

Response

[
  {
    "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": ["abc123_index.html", "abc123_trace.json"],
    "screenshots": ["abc123_screenshot.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": null,
      "response": null,
      "scanOptions": { "rate": "balanced" },
      "scannerConfig": { "ua": "Mozilla/5.0 ...", "lang": "en-US" },
      "meta": {
        "initiatedBy": "user123",
        "initiatedByType": "user",
        "startedAt": "2024-04-25T10:00:10.000Z",
        "completedAt": "2024-04-25T10:00:45.000Z",
        "duration": 35000
      }
    }
  },
  {
    "id": "z9y8x7w6v5u4t3s2",
    "slug": "suspicious-login.net-1714000800",
    "url": "http://suspicious-login.net/verify",
    "status": "done",
    "created": "2024-04-25T09:53:20.000Z",
    "updated": "2024-04-25T09:54:05.000Z",
    "errorMessage": "",
    "html": ["def456_index.html", "def456_trace.json"],
    "screenshots": ["def456_screenshot.png"],
    "files": [],
    "done_at": "2024-04-25T09:54:05.000Z",
    "final_url": "https://phishing-redirect.example/login",
    "options": {
      "rate": "slow",
      "screenshotSize": { "width": "1280", "height": "800" }
    },
    "scanData": {
      "version": "1.1",
      "document": {
        "title": "Account Verification",
        "url": "https://phishing-redirect.example/login",
        "origin": "https://phishing-redirect.example",
        "protocol": "https:",
        "links": []
      },
      "request": null,
      "response": null,
      "scanOptions": { "rate": "slow" },
      "scannerConfig": { "useStealth": true },
      "meta": {
        "initiatedByType": "api",
        "startedAt": "2024-04-25T09:53:30.000Z",
        "completedAt": "2024-04-25T09:54:05.000Z",
        "duration": 35000
      }
    }
  }
]
Use limit and offset together to page through large scan histories. For example, limit=25&offset=50 returns records 51–75. Sort by -created to retrieve the most recent scans first.

Build docs developers (and LLMs) love