squirrelscan Rules API

The audit rule catalogue, for building `enabledRulePatterns` and `disabledRulePatterns`.

GitHub OpenAPI

Operations 1

GET /v1/rules List audit rules #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/squirrelscan-com:squirrelscan-com-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

squirrelscan-com-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: squirrelscan Public Rules API
  version: 1.0.0
  summary: Programmatic website-audit API for external clients, agents, and MCP integrations.
  description: 'The public `/v1` REST surface of squirrelscan.


    This document covers the **external-client-facing** routes only — internal

    server-to-server callbacks (`/v1/*/internal/*`), webhook receivers

    (`/v1/webhooks`, `/v1/github`), and admin-only routes (`/v1/admin/*`,

    `/v1/stats`, `/v1/users`) are intentionally out of scope and NOT part of the

    public contract.


    All error responses use a stable typed envelope:

    `{ "error": { "code": string, "message": string, "requestId"?: string } }`.


    Authentication is via a bearer token in the `Authorization` header.

    Organization API keys with an `sq_` prefix (`sq_dev_` in development) are the

    primary mechanism for automated clients and agents; set one as the

    `SQUIRRELSCAN_API_KEY` environment variable and the CLI and this REST API both

    pick it up. CLI login tokens (`sqcli_`) and Clerk dashboard JWTs are also

    accepted. MCP clients can reach these same audit tools over the hosted MCP

    server at https://mcp.squirrelscan.com/mcp.'
  contact:
    name: squirrelscan support
    url: https://squirrelscan.com
  license:
    name: Proprietary
servers:
- url: https://api.squirrelscan.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Rules
  description: The audit rule catalogue, for building `enabledRulePatterns` and `disabledRulePatterns`.
paths:
  /v1/rules:
    get:
      tags:
      - Rules
      summary: List audit rules
      description: 'The rule catalogue, grouped by category and sorted by category priority. Use it to build `enabledRulePatterns` and `disabledRulePatterns` for `POST /v1/agent-runs`: a pattern is a category code (`ax`), a category glob (`ax/*`) or an exact rule `id` (`core/robots-meta`). Each rule says whether it `requiresCloud` (reads a cloud-backed step: slower and credit-metered) and whether it `requiresRender` (reads the render step, so it is skipped on a run with `render: false`). The catalogue is the same for every caller and changes only when a new engine version ships, so the response is cacheable (`Cache-Control: public, max-age=3600`). Opt-in rules (`gaps/*`) are not listed and cannot be selected. The hosted MCP `list_rules` and `get_rule` tools return the same fields as `requires_cloud` and `requires_render`.'
      operationId: listRules
      responses:
        '200':
          description: The rule catalogue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleCatalog'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    Unauthorized:
      description: 'Missing or invalid credentials (including the shared auth middleware: no/invalid bearer token). Typed envelope with code `UNAUTHORIZED`. Branch on the `401` status, not the message.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
  schemas:
    RuleCatalogEntry:
      type: object
      description: One audit rule.
      required:
      - id
      - name
      - description
      - category
      - severity
      - weight
      - cloud
      - requiresCloud
      - requiresRender
      properties:
        id:
          type: string
          description: The rule id (`category/slug`), also an exact pattern for `enabledRulePatterns` and `disabledRulePatterns`.
          examples:
          - core/robots-meta
        name:
          type: string
          description: The rule's title.
        description:
          type: string
          description: What the rule checks.
        category:
          type: string
          description: The category code the rule sits in (the same as its parent category's `code`).
        severity:
          type: string
          enum:
          - error
          - warning
          - info
          description: The rule's default severity.
        weight:
          type: number
          description: The rule's weight in the score.
        solution:
          type: string
          description: How to fix what the rule reports, when the rule has guidance.
        cloud:
          type: boolean
          description: The same as `requiresCloud`, kept for older clients.
        requiresCloud:
          type: boolean
          description: True when the rule reads a cloud-backed step. Such rules are slower and credit-metered.
        requiresRender:
          type: boolean
          description: 'True when the rule reads the render step (a headless-browser pass). It is skipped on a run with `render: false`.'
        creditFeature:
          type: string
          description: The credit feature a cloud-backed rule is billed under. Present only when `requiresCloud` is true.
        creditCost:
          type: number
          description: Credits per unit for `creditFeature`. Present only when `requiresCloud` is true.
        creditUnit:
          type: string
          description: The billing unit for `creditCost` (`page`, `url`, `run`, ...). Present only when `requiresCloud` is true.
    RuleCatalogCategory:
      type: object
      required:
      - code
      - name
      - description
      - priority
      - group
      - rules
      properties:
        code:
          type: string
          description: 'The category code: a bare pattern for `enabledRulePatterns` (`ax`) or a glob with `/*` (`ax/*`).'
        name:
          type: string
        description:
          type: string
        priority:
          type: integer
          description: 'Sort order: categories are listed by descending priority.'
        group:
          type: string
          description: The top-level group the category rolls up into (for example `seo`).
        rules:
          type: array
          items:
            $ref: '#/components/schemas/RuleCatalogEntry'
    Error:
      type: object
      description: Stable error envelope returned by all public routes.
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code (SCREAMING_SNAKE_CASE). Treat unknown codes as opaque.
            message:
              type: string
              description: Human-readable description. May change; do not match on it.
            requestId:
              type: string
              description: Correlation id for support / log lookups, when available.
          additionalProperties: true
    RuleCatalog:
      type: object
      required:
      - totalRules
      - categories
      properties:
        totalRules:
          type: integer
          description: Rules in the catalogue, across all categories.
        categories:
          type: array
          items:
            $ref: '#/components/schemas/RuleCatalogCategory'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token in the `Authorization` header: `Authorization: Bearer <token>`.


        Programmatic API keys are prefixed `sq_` (issue #154; bearer auth lands in #156). The same scheme today also accepts CLI tokens (`sqcli_` prefix) and Clerk dashboard JWTs.'