{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — Consent Mode v2 & Tracking Auditor",
    "description": "Test if GA4, GTM, Google Ads & Meta Pixel fire before consent or after Reject. Loads each site 3 ways (no click, Reject, Accept), decodes Consent Mode v2, finds broken and duplicate tags, scores each site with plain-English fixes.",
    "version": "2.0",
    "x-build-id": "5STJhEh8v9nclc2fr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-tracking-consent-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-tracking-consent-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-tracking-consent-auditor/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-tracking-consent-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-tracking-consent-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-tracking-consent-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Websites to audit",
            "type": "array",
            "description": "Home pages (or any landing pages) to audit. One dataset item and one score per URL. A missing https:// is added automatically.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "scanMode": {
            "title": "Scan mode",
            "enum": [
              "full",
              "quick"
            ],
            "type": "string",
            "description": "Full = 3 browser visits per site (no interaction, Reject, Accept all) - tests what happens after each consent choice. Quick = 1 visit (no interaction only): tag inventory, pre-consent tracking, cookies and broken tags, at a lower price.",
            "default": "full"
          },
          "evidencePack": {
            "title": "Evidence pack (client PDF + request log)",
            "type": "boolean",
            "description": "For each audited site, save a client-ready report (HTML + PDF) with screenshots of the banner and of the page after Reject / Accept, the Consent Mode v2 checklist, CMP-specific fix steps and a timestamped, redacted request log (CSV + JSON) showing what fired before and after each choice. Billed as 'evidence-pack' only when it is produced (full scans of sites that could be audited). Full audits only (quick scans never produce or charge it).",
            "default": true
          },
          "reportAgencyName": {
            "title": "Report: your agency / company name (white-label)",
            "type": "string",
            "description": "Shown at the top of the client report (\"<your name> · powered by SiteVerdict\"). Leave empty for SiteVerdict branding."
          },
          "reportClientName": {
            "title": "Report: client name",
            "type": "string",
            "description": "Optional client name for the report title."
          },
          "maxInternalPages": {
            "title": "Internal pages per site",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Also visit up to this many internal pages (found from home-page links, same host) in each scenario, to check tags on deeper pages and that consent persists across navigation. 0 = home page only. Each extra page is billed as 'extra-page-audited'.",
            "default": 1
          },
          "maxConcurrency": {
            "title": "Max concurrent sites",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many sites are audited in parallel. Each site uses its own browser context. 3 is good for 2 GB memory; raise memory when you raise this.",
            "default": 3
          },
          "settleTimeSecs": {
            "title": "Wait after load (seconds)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Extra time to wait after the page loads (and after each click) so that delayed tags and cookie banners can appear.",
            "default": 3
          },
          "bannerWaitSecs": {
            "title": "Max wait for a late cookie banner (seconds)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "If no banner is visible after the page settles, keep checking for up to this long before concluding there is none. Prevents false 'no banner' results on lazy-loading consent tools.",
            "default": 6
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 10,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for each page to load before the scenario is marked as failed.",
            "default": 35
          },
          "saveScreenshots": {
            "title": "Save first-visit screenshot",
            "type": "boolean",
            "description": "Store a JPEG screenshot of what a first-time visitor sees (usually the cookie banner) in the key-value store, linked from each result.",
            "default": true
          },
          "locale": {
            "title": "Browser language",
            "type": "string",
            "description": "Browser locale (Accept-Language). Banners are often localised; en-GB is the default.",
            "default": "en-GB"
          },
          "timezoneId": {
            "title": "Browser time zone",
            "type": "string",
            "description": "IANA time zone, e.g. Europe/London or Europe/Berlin.",
            "default": "Europe/London"
          },
          "userAgent": {
            "title": "Custom user agent (optional)",
            "type": "string",
            "description": "Leave empty to use a standard desktop Chrome user agent. Note: some consent tools hide the banner for crawler-like user agents."
          },
          "saveRawCapture": {
            "title": "Save raw tag capture (debug)",
            "type": "boolean",
            "description": "Also store the tag-related network requests of every scenario (identifiers redacted) as JSON in the key-value store (record capture-<site>). Useful for debugging or your own analysis.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Cookie banners and tags are often geo-targeted: use Apify Proxy with country GB, DE, FR etc. to see what visitors from that country get.",
            "default": {
              "useApifyProxy": false
            }
          },
          "monitoringMode": {
            "title": "Monitoring mode (compare with the last run)",
            "type": "boolean",
            "description": "Keep a snapshot of each site in a named key-value store and report what changed since the previous run of the same monitor: new trackers before consent or after Reject, new / resolved issues, consent tool or Consent Mode changes. Schedule the Actor (e.g. daily or weekly) to monitor sites continuously.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of this monitor (e.g. a client name). Snapshots are stored in the key-value store 'siteverdict-consent-monitor-<name>' in your account, so different monitors do not mix.",
            "default": "default"
          },
          "onlyChanged": {
            "title": "Output only sites that changed",
            "type": "boolean",
            "description": "In monitoring mode, push a dataset item only for sites that changed (and on the first run). Every site is still audited and billed; the SUMMARY record lists all sites.",
            "default": false
          },
          "alertOn": {
            "title": "Send alerts when",
            "enum": [
              "changes",
              "issues"
            ],
            "type": "string",
            "description": "'changes' (default in monitoring mode): alert when a monitored site changed. 'issues' (default otherwise): alert when a site has critical/high issues confirmed by the audit. One digest message per run and destination."
          },
          "slackWebhookUrl": {
            "title": "Slack incoming webhook URL (optional)",
            "type": "string",
            "description": "https://hooks.slack.com/... URL. Stored as a secret, never logged. Billed as 'alert-sent' per delivered message."
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Any public HTTPS endpoint (Zapier, Make, n8n, your API). Receives a JSON digest. Stored as a secret, never logged. Billed as 'alert-sent' per delivered message."
          },
          "aiFix": {
            "title": "AI fix plan with your own API key",
            "type": "boolean",
            "description": "Off by default. Uses YOUR Anthropic or OpenAI key to draft the exact CMP / GTM changes, a Consent Mode v2 snippet and cookie-policy wording for each site with issues. Only the audit summary is sent (no cookies, no request log). Billed as 'ai-fix-generated' only when a plan is produced; the LLM cost is on your own key.",
            "default": false
          },
          "aiProvider": {
            "title": "AI provider",
            "enum": [
              "anthropic",
              "openai"
            ],
            "type": "string",
            "description": "Which API your key belongs to.",
            "default": "anthropic"
          },
          "aiApiKey": {
            "title": "AI API key",
            "type": "string",
            "description": "Your own Anthropic or OpenAI API key. Stored as a secret, never logged or output."
          },
          "aiModel": {
            "title": "AI model (optional)",
            "type": "string",
            "description": "Leave empty for the default (Anthropic: claude-sonnet-5-5, a mid-priced model; OpenAI: gpt-4.1-mini). Any model your key can use, e.g. claude-sonnet-5-5 for the strongest plans or claude-haiku-5-5 for the cheapest."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}