{
  "openapi": "3.0.1",
  "info": {
    "title": "🛡️ Site Governance Monitor",
    "description": "Track deployment regressions and structural drift across your website. Automate robots.txt, sitemap, and schema checks immediately after code pushes.",
    "version": "0.1",
    "x-build-id": "LsFVgMNcuE6PEJDKQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~site-governance-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-site-governance-monitor",
        "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/taroyamada~site-governance-monitor/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-site-governance-monitor",
        "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/taroyamada~site-governance-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-site-governance-monitor",
        "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": [
          "domains"
        ],
        "properties": {
          "domains": {
            "title": "Sites or domains to monitor",
            "type": "array",
            "description": "Starter quickstart: begin with 1-3 sites for a lightweight first success. Homepage-first runs stay intentionally small, while larger recurring watches can expand to broader portfolios without changing the one-summary-per-domain value unit. Maximum 200 per run.",
            "items": {
              "type": "string"
            }
          },
          "samplePaths": {
            "title": "Sample paths for release QA",
            "type": "array",
            "description": "Path-only routes to validate on every domain. Keep the starter quickstart homepage-first with [\"/\"], then add /pricing and /docs when you want broader release-QA template coverage. Defaults to [\"/\"] when omitted.",
            "items": {
              "type": "string"
            }
          },
          "delivery": {
            "title": "Delivery mode",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "Starter path: dataset keeps the first run low-friction and still writes the full summary-first payload to OUTPUT. Advanced path: webhook sends the same meta/alerts/results payload to your endpoint for release-QA, platform-ops, or agency handoff.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Advanced delivery only: required when delivery is webhook. Must be a valid http(s) URL. The payload includes the executive summary, flattened alerts, workflow metadata, and per-domain governance results."
          },
          "snapshotKey": {
            "title": "Snapshot key for recurring checks",
            "type": "string",
            "description": "Keep this stable when you move from the homepage-first quickstart to recurring release-QA, portfolio, or webhook workflows so governance drift stays comparable run to run.",
            "default": "site-governance-monitor-snapshots"
          },
          "checkAiBots": {
            "title": "Robots.txt monitor",
            "type": "boolean",
            "description": "Monitor robots.txt for missing files, AI crawler allow/block rules, and drift after releases.",
            "default": true
          },
          "checkSchema": {
            "title": "Schema validator monitor",
            "type": "boolean",
            "description": "Validate JSON-LD and Microdata on homepage, pricing, docs, and other release-sensitive templates.",
            "default": true
          },
          "checkSitemap": {
            "title": "Sitemap monitor",
            "type": "boolean",
            "description": "Monitor sitemap.xml reachability, freshness, robots.txt declarations, and URL inventory drift.",
            "default": true
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Follow redirects before grading sitemap and sampled page responses so canonical properties are scored correctly.",
            "default": true
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Starter runs usually only need 1-3 parallel checks. Increase it for broader recurring portfolios when you want more properties covered in one run.",
            "default": 3
          },
          "batchDelayMs": {
            "title": "Batch delay (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Pause between batches to keep recurring sweeps polite and stable across portfolios and platform estates.",
            "default": 250
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout used for robots.txt, sitemap, and sampled page fetches during each recurring governance check.",
            "default": 15
          },
          "maxSitemapUrls": {
            "title": "Max sitemap URLs",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of sitemap URLs to parse when expanding sitemap indexes for larger sites or portfolios.",
            "default": 5000
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Preview the governance bundle without saving snapshots, dataset rows, or sending webhooks. Useful for validation, not for capturing a recurring baseline.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}