{
  "openapi": "3.1.0",
  "info": {
    "title": "GovAnswers data API",
    "version": "1.0.0",
    "description": "Read-only access to verified municipal bylaw, ordinance, and policy data. No API key. Every answer page has a JSON twin (append .json). For conversational access, AI agents can use the MCP server at https://mcp.govanswers.org/mcp instead. Unofficial consolidation — the official copy of any document is held by the municipal clerk.",
    "contact": {
      "url": "https://govanswers.org/docs"
    }
  },
  "servers": [
    {
      "url": "https://govanswers.org"
    }
  ],
  "paths": {
    "/munis.json": {
      "get": {
        "operationId": "listMunicipalities",
        "summary": "Flat index of every covered municipality.",
        "responses": {
          "200": {
            "description": "Array of {n:name, j:jurisdiction, p:path}."
          }
        }
      }
    },
    "/{country}/{region}.json": {
      "get": {
        "operationId": "getRegionIndex",
        "summary": "Every covered municipality in a region, with per-topic coverage.",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ca",
                "us"
              ]
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "description": "Two-letter postal code, e.g. 'ns', 'bc', 'ri'.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Region index."
          },
          "404": {
            "description": "No such region."
          }
        }
      }
    },
    "/{country}/{region}/{municipality}/{topic}.json": {
      "get": {
        "operationId": "getBylawTwin",
        "summary": "Verified facts + citations for one municipality and topic.",
        "parameters": [
          {
            "name": "country",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "ca",
                "us"
              ]
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "description": "Two-letter postal code.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "municipality",
            "in": "path",
            "required": true,
            "description": "Municipality slug from /munis.json (the last path segment).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "topic",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "noise",
                "animal-control",
                "short-term-rentals",
                "open-burning",
                "zoning",
                "parking-snow",
                "property-maintenance",
                "atv-snowmobile",
                "fireworks",
                "water-sewer",
                "garbage-recycling",
                "business-licensing",
                "cannabis",
                "fees",
                "property-tax",
                "procurement",
                "grants",
                "facility-use",
                "winter-services",
                "hr-personnel",
                "privacy-records",
                "communications",
                "emergency-management",
                "finance-policy",
                "technology",
                "conduct-ethics",
                "ai-policy"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON twin: documents[] with facts, fact_citations, document_url, snapshot_url. Filter to primary:true for authoritative answers."
          },
          "404": {
            "description": "No page for this municipality + topic."
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Field reference and MCP server",
    "url": "https://govanswers.org/docs"
  }
}