CrawlCheck Whatif API

The Whatif API from CrawlCheck — 1 operation(s) for whatif.

GitHub OpenAPI

Operations 2

GET /api/whatif Recompute the score and letter for a record with any set of failing rows… #
POST /api/whatif The same, with rows to fix: {id, fix:[{section_id,row}], clear:[codes]} #

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/crawlcheck-io:crawlcheck-io-whatif-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

crawlcheck-io-whatif-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Crawlcheck Io Whatif API
  version: '1'
  contact:
    name: CrawlCheck
    url: https://crawlcheck.io/policy
    email: hello@crawlcheck.io
  license:
    name: Terms
    url: https://crawlcheck.io/policy
  x-core-contract:
    promise: 'These operations are the core contract. They stay at /api/v1 and keep answering for at least 180 days after any /api/v2 is announced; their stable fields change only in a new major version, and their provisional fields only after 30 days'' notice, per /docs/api/compatibility. Verifying what they return needs none of these calls: crawlcheck-verify.mjs checks a document on your machine against the published keys (/.well-known/http-message-signatures-directory) and the rotation record, read once with --online or saved for --keys. Everything else documented here is useful but secondary, and may change with the notice its fields'' tags promise.'
    operations:
    - method: GET
      path: /api/v1/resolve
      operationId: resolveDomainV1
    - method: POST
      path: /api/v1/resolve
      operationId: resolveBatchV1
    - method: POST
      path: /api/v1/preflight
      operationId: preflightV1
    - method: GET
      path: /api/v1/decisions/{sha256}
      operationId: decisionCheckV1
    - method: GET
      path: /api/v1/revocations
      operationId: revocations
    - method: GET
      path: /api/v1/visitor
      operationId: visitorResolveV1
    - method: POST
      path: /api/v1/visitor
      operationId: visitorResolveBatchV1
    - method: GET
      path: /api/v1/mcp/scan
      operationId: mcpScanUrl
    - method: POST
      path: /api/v1/mcp/lock/check
      operationId: mcpLockCheck
    list: https://crawlcheck.io/api/v1/core
  description: 'Operations tagged Whatif across 2 of this provider''s published API definitions: crawlcheck-io-openapi.json, crawlcheck-io-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://crawlcheck.io
tags:
- name: Whatif
paths:
  /api/whatif:
    get:
      operationId: whatIf
      summary: Recompute the score and letter for a record with any set of failing rows…
      parameters:
      - name: id
        in: query
        schema:
          type: string
      - name: domain
        in: query
        schema:
          type: string
      - name: clear
        in: query
        schema:
          type: string
        description: 'comma-separated finding codes or d1: ids'
      responses:
        '200':
          description: what-if
          content:
            application/json:
              examples:
                worked:
                  summary: The formula rerun with the finding cleared; nothing is summed. Licence or owner session only, otherwise 403. Produced by the production Worker code against a stored copy of a real record; ids, keys and tokens are placeholders.
                  value:
                    ok: true
                    kind: crawlcheck-whatif
                    subject:
                      domain: crawlcheck.io
                      report_id: qfk9rgfwyg
                      scanned_at: '2026-10-01T00:20:26.380Z'
                    now:
                      score: 98
                      letter: A
                      cap: null
                    asked:
                      fix: []
                      clear:
                      - HSTS_MISSING
                    result:
                      score: 98
                      letter: A
                      cap: null
                      capped: false
                      held_at_reach: false
                      rows_applied: 0
                      findings_cleared: 0
                    not_applied:
                      rows: []
                      findings:
                      - HSTS_MISSING
                    next_letter:
                      target: null
                      why: already an A
                    combined:
                      all_rows_fixed:
                        score: 100
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 3
                        findings_cleared: 0
                      all_findings_cleared:
                        score: 98
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 0
                        findings_cleared: 0
                      both:
                        score: 100
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 3
                        findings_cleared: 0
                    rows:
                    - section_id: vitals
                      row: Lab LCP — synthetic, not field data
                      points: 1
                      why: null
                    - section_id: vitals
                      row: Lab Total Blocking Time
                      points: 1
                      why: null
                    - section_id: vitals
                      row: Time to First Byte (p75, your visitors)
                      points: 1
                      why: null
                    method: the score recomputed with the chosen rows passing and the chosen findings removed, the Reach + 15 ceiling and rounding included; nothing is summed
              schema:
                type:
                - object
                - 'null'
                properties:
                  ok:
                    type:
                    - boolean
                    - 'null'
                  kind:
                    type:
                    - string
                    - 'null'
                  subject:
                    type:
                    - object
                    - 'null'
                    properties:
                      domain:
                        type:
                        - string
                        - 'null'
                      report_id:
                        type:
                        - string
                        - 'null'
                      scanned_at:
                        type:
                        - string
                        - 'null'
                    additionalProperties: true
                  now:
                    type:
                    - object
                    - 'null'
                    properties:
                      score:
                        type:
                        - number
                        - 'null'
                      letter:
                        type:
                        - string
                        - 'null'
                      cap: {}
                    additionalProperties: true
                  asked:
                    type:
                    - object
                    - 'null'
                    properties:
                      fix:
                        type:
                        - array
                        - 'null'
                        items: {}
                      clear:
                        type:
                        - array
                        - 'null'
                        items:
                          type:
                          - string
                          - 'null'
                    additionalProperties: true
                  result:
                    type:
                    - object
                    - 'null'
                    properties:
                      score:
                        type:
                        - number
                        - 'null'
                      letter:
                        type:
                        - string
                        - 'null'
                      cap: {}
                      capped:
                        type:
                        - boolean
                        - 'null'
                      held_at_reach:
                        type:
                        - boolean
                        - 'null'
                      rows_applied:
                        type:
                        - number
                        - 'null'
                      findings_cleared:
                        type:
                        - number
                        - 'null'
                    additionalProperties: true
                  not_applied:
                    type:
                    - object
                    - 'null'
                    properties:
                      rows:
                        type:
                        - array
                        - 'null'
                        items: {}
                      findings:
                        type:
                        - array
                        - 'null'
                        items:
                          type:
                          - string
                          - 'null'
                    additionalProperties: true
                  next_letter:
                    type:
                    - object
                    - 'null'
                    properties:
                      target: {}
                      why:
                        type:
                        - string
                        - 'null'
                    additionalProperties: true
                  combined:
                    type:
                    - object
                    - 'null'
                    properties:
                      all_rows_fixed:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                      all_findings_cleared:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                      both:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                    additionalProperties: true
                  rows:
                    type:
                    - array
                    - 'null'
                    items:
                      type:
                      - object
                      - 'null'
                      properties:
                        section_id:
                          type:
                          - string
                          - 'null'
                        row:
                          type:
                          - string
                          - 'null'
                        points:
                          type:
                          - number
                          - 'null'
                        why: {}
                      additionalProperties: true
                  method:
                    type:
                    - string
                    - 'null'
                additionalProperties: true
                x-schema-source: worked-example
        '403':
          description: needs a licence or the owner's session
        '404':
          description: no record
      x-codeSamples:
      - lang: Shell
        label: curl
        source: "curl -s \\\n  -H \"x-crawlcheck-key: $CRAWLCHECK_KEY\" \\\n  'https://crawlcheck.io/api/whatif?id=qfk9rgfwyg&clear=HSTS_MISSING'"
      security: []
      x-auth: public; no credential read
      tags:
      - Whatif
    post:
      operationId: whatIfPost
      summary: 'The same, with rows to fix: {id, fix:[{section_id,row}], clear:[codes]}'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                domain:
                  type: string
                fix:
                  type: array
                  items:
                    type: object
                    properties:
                      section_id:
                        type: string
                      row:
                        type: string
                clear:
                  type: array
                  items:
                    type: string
            examples:
              worked:
                summary: The request behind the worked response
                value:
                  id: qfk9rgfwyg
                  fix:
                  - section_id: vitals
                    row: Lab LCP — synthetic, not field data
                  clear: []
      responses:
        '200':
          description: what-if
          content:
            application/json:
              examples:
                worked:
                  summary: Rows named by section_id and row text; anything that does not match comes back under not_applied. Produced by the production Worker code against a stored copy of a real record; ids, keys and tokens are placeholders.
                  value:
                    ok: true
                    kind: crawlcheck-whatif
                    subject:
                      domain: crawlcheck.io
                      report_id: qfk9rgfwyg
                      scanned_at: '2026-10-01T00:20:26.380Z'
                    now:
                      score: 98
                      letter: A
                      cap: null
                    asked:
                      fix:
                      - id: vitals
                        k: Lab LCP — synthetic, not field data
                      - id: vitals
                        k: Lab Total Blocking Time
                      clear: []
                    result:
                      score: 99
                      letter: A
                      cap: null
                      capped: false
                      held_at_reach: false
                      rows_applied: 2
                      findings_cleared: 0
                    not_applied:
                      rows: []
                      findings: []
                    next_letter:
                      target: null
                      why: already an A
                    combined:
                      all_rows_fixed:
                        score: 100
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 3
                        findings_cleared: 0
                      all_findings_cleared:
                        score: 98
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 0
                        findings_cleared: 0
                      both:
                        score: 100
                        letter: A
                        cap: null
                        capped: false
                        held_at_reach: false
                        rows_applied: 3
                        findings_cleared: 0
                    rows:
                    - section_id: vitals
                      row: Lab LCP — synthetic, not field data
                      points: 1
                      why: null
                    - section_id: vitals
                      row: Lab Total Blocking Time
                      points: 1
                      why: null
                    - section_id: vitals
                      row: Time to First Byte (p75, your visitors)
                      points: 1
                      why: null
                    method: the score recomputed with the chosen rows passing and the chosen findings removed, the Reach + 15 ceiling and rounding included; nothing is summed
              schema:
                type:
                - object
                - 'null'
                properties:
                  ok:
                    type:
                    - boolean
                    - 'null'
                  kind:
                    type:
                    - string
                    - 'null'
                  subject:
                    type:
                    - object
                    - 'null'
                    properties:
                      domain:
                        type:
                        - string
                        - 'null'
                      report_id:
                        type:
                        - string
                        - 'null'
                      scanned_at:
                        type:
                        - string
                        - 'null'
                    additionalProperties: true
                  now:
                    type:
                    - object
                    - 'null'
                    properties:
                      score:
                        type:
                        - number
                        - 'null'
                      letter:
                        type:
                        - string
                        - 'null'
                      cap: {}
                    additionalProperties: true
                  asked:
                    type:
                    - object
                    - 'null'
                    properties:
                      fix:
                        type:
                        - array
                        - 'null'
                        items:
                          type:
                          - object
                          - 'null'
                          properties:
                            id:
                              type:
                              - string
                              - 'null'
                            k:
                              type:
                              - string
                              - 'null'
                          additionalProperties: true
                      clear:
                        type:
                        - array
                        - 'null'
                        items: {}
                    additionalProperties: true
                  result:
                    type:
                    - object
                    - 'null'
                    properties:
                      score:
                        type:
                        - number
                        - 'null'
                      letter:
                        type:
                        - string
                        - 'null'
                      cap: {}
                      capped:
                        type:
                        - boolean
                        - 'null'
                      held_at_reach:
                        type:
                        - boolean
                        - 'null'
                      rows_applied:
                        type:
                        - number
                        - 'null'
                      findings_cleared:
                        type:
                        - number
                        - 'null'
                    additionalProperties: true
                  not_applied:
                    type:
                    - object
                    - 'null'
                    properties:
                      rows:
                        type:
                        - array
                        - 'null'
                        items: {}
                      findings:
                        type:
                        - array
                        - 'null'
                        items: {}
                    additionalProperties: true
                  next_letter:
                    type:
                    - object
                    - 'null'
                    properties:
                      target: {}
                      why:
                        type:
                        - string
                        - 'null'
                    additionalProperties: true
                  combined:
                    type:
                    - object
                    - 'null'
                    properties:
                      all_rows_fixed:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                      all_findings_cleared:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                      both:
                        type:
                        - object
                        - 'null'
                        properties:
                          score:
                            type:
                            - number
                            - 'null'
                          letter:
                            type:
                            - string
                            - 'null'
                          cap: {}
                          capped:
                            type:
                            - boolean
                            - 'null'
                          held_at_reach:
                            type:
                            - boolean
                            - 'null'
                          rows_applied:
                            type:
                            - number
                            - 'null'
                          findings_cleared:
                            type:
                            - number
                            - 'null'
                        additionalProperties: true
                    additionalProperties: true
                  rows:
                    type:
                    - array
                    - 'null'
                    items:
                      type:
                      - object
                      - 'null'
                      properties:
                        section_id:
                          type:
                          - string
                          - 'null'
                        row:
                          type:
                          - string
                          - 'null'
                        points:
                          type:
                          - number
                          - 'null'
                        why: {}
                      additionalProperties: true
                  method:
                    type:
                    - string
                    - 'null'
                additionalProperties: true
                x-schema-source: worked-example
        '403':
          description: needs a licence or the owner's session
      x-codeSamples:
      - lang: Shell
        label: curl
        source: "curl -s -X POST \\\n  -H \"x-crawlcheck-key: $CRAWLCHECK_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\"id\":\"qfk9rgfwyg\",\"fix\":[{\"section_id\":\"vitals\",\"row\":\"Lab LCP — synthetic, not field data\"}],\"clear\":[]}' \\\n  'https://crawlcheck.io/api/whatif'"
      security:
      - licenceKey: []
      - bearer: []
      x-auth: 'a licence key (x-crawlcheck-key or Authorization: Bearer) or the signed-in /manage session; 401 or 403 otherwise'
      x-crawlcheck-budget:
        request_body_max: 1048576
      tags:
      - Whatif
    servers:
    - url: https://crawlcheck.io
components:
  securitySchemes:
    licenceKey:
      type: apiKey
      in: header
      name: x-crawlcheck-key
      description: 'Your licence key: cc_ followed by 32 hex characters. Sent on every keyed call.'
    bearer:
      type: http
      scheme: bearer
      description: The same licence key as a Bearer token. Accepted on /api/v1/* and /api/usage.
externalDocs:
  url: https://crawlcheck.io/docs/api
  description: Human-readable reference
x-refined-from:
- crawlcheck-io-openapi.json
- crawlcheck-io-openapi.yml