{
  "openapi": "3.0.3",
  "info": {
    "title": "BuildData - Canadian Construction Data API",
    "description": "Canada-wide construction data API across ten datasets: building permits, building inspections, business licences, new business openings, development permits, planning applications, property assessments, contractor profiles, and zoning, covering dozens of Canadian cities and provinces. Normalized, geocoded, and updated daily. /opening is the licence a business held first, renewals excluded, joined to the building permit pulled at the same address before it opened, so a fit-out is visible months ahead of the business. /opening_soon is the inverse: work underway at an address that holds no active licence, which is a business that has not opened yet. It carries the permit facts and no business name, because the name does not exist until the licence is issued. Record datasets support search, statistics, per-city coverage, and lookup by ID; zoning resolves the district at any coordinate (/zone) or lists a city's zones (/zoning); /geocode resolves a Canadian address to coordinates and postal code; /reverse-geocode returns the nearest address and postal code for any lat/lng pair. Call /{entity_type}/coverage and /{entity_type}/stats for live record counts and the current list of covered cities.",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "/health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/zone": {
      "get": {
        "summary": "Get Zone",
        "operationId": "/zone",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "title": "Lat"
            },
            "example": 43.65
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "title": "Lng"
            },
            "example": -79.38
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "city": "toronto",
                  "zone_code": "CR",
                  "zone_description": "Commercial Residential",
                  "zone_category": "4"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/geocode": {
      "get": {
        "summary": "Geocode a Canadian street address to coordinates and postal code",
        "operationId": "/geocode",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Street address, e.g. '123 MAIN ST SW'",
              "title": "Address"
            },
            "description": "Street address, e.g. '123 MAIN ST SW'",
            "example": "133 MICMAC DR"
          },
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug, e.g. 'calgary', 'toronto'. If omitted, inferred from the address.",
            "example": "halifax"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Alias for municipality."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "address": "133 MICMAC DR",
                  "municipality": "halifax",
                  "province": "NS",
                  "lat": 44.6501,
                  "lng": -63.6223,
                  "postal_code": "B3M 2A5",
                  "normalized_address": "133 MICMAC DR",
                  "match_type": "oda",
                  "confidence": 1.0,
                  "source": "oda"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/reverse-geocode": {
      "get": {
        "summary": "Reverse geocode coordinates to the nearest Canadian address and postal code",
        "operationId": "/reverse-geocode",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "maximum": 84.0,
              "minimum": 41.0,
              "description": "Latitude",
              "title": "Lat"
            },
            "description": "Latitude",
            "example": 43.6511
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "maximum": -52.0,
              "minimum": -141.0,
              "description": "Longitude",
              "title": "Lng"
            },
            "description": "Longitude",
            "example": -79.3832
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "lat": 43.6511,
                  "lng": -79.3832,
                  "address": "90 RICHMOND ST W",
                  "city": "Toronto",
                  "province": "ON",
                  "postal_code": "M5H 2A4",
                  "distance_m": 12.4
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/zoning": {
      "get": {
        "summary": "List zoning districts for a city, or zoning coverage across cities",
        "operationId": "/zoning",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug, e.g. 'toronto'. Omit to get the per-city zoning coverage.",
            "example": "toronto"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sources": {
      "get": {
        "summary": "List all data sources",
        "operationId": "/sources",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "count": 6,
                  "sources": [
                    {
                      "source_id": "canada_contracts",
                      "entity_type": "contract",
                      "records": 2100000,
                      "last_updated": "2026-04-01T04:08:14+00:00",
                      "earliest_date": "2009-01-05",
                      "latest_date": "2026-03-28"
                    },
                    {
                      "source_id": "canada_tenders",
                      "entity_type": "tender",
                      "records": 650000,
                      "last_updated": "2026-03-30T02:01:27+00:00",
                      "earliest_date": "2009-01-05",
                      "latest_date": "2026-03-27"
                    },
                    {
                      "source_id": "seao",
                      "entity_type": "tender",
                      "records": 140000,
                      "last_updated": "2026-04-01T10:00:00+00:00",
                      "earliest_date": "2021-03-01",
                      "latest_date": "2026-03-29"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sources/coverage": {
      "get": {
        "summary": "Per-source coverage: totals, open tenders, last-30-day activity",
        "operationId": "source_coverage_sources_coverage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/estimate": {
      "post": {
        "summary": "Pro: estimated construction value for 1..N permits (by record id or attributes)",
        "operationId": "permit_estimate_permit_estimate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PermitEstimateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contractor/stats": {
      "get": {
        "summary": "Contractor aggregate stats",
        "operationId": "contractor_stats_contractor_stats_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contractor/coverage": {
      "get": {
        "summary": "Contractor count per city",
        "operationId": "contractor_coverage_contractor_coverage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contractor": {
      "get": {
        "summary": "Search Canadian contractor profiles",
        "operationId": "search_contractors_contractor_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Search by contractor name",
            "example": "mattamy"
          },
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city"
          },
          {
            "name": "trade_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by trade type (partial match)"
          },
          {
            "name": "is_licensed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Filter to licensed contractors only"
          },
          {
            "name": "min_permit_count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "nullable": true
            },
            "description": "Only contractors with at least this many permits"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/property": {
      "get": {
        "summary": "Every BuildData record at one address",
        "operationId": "property_dossier_property_get",
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Street address, e.g. '3 Briarcliffe Drive'. Canonicalized server-side, so you do not need to know the exact stored form.",
              "title": "Address"
            },
            "description": "Street address, e.g. '3 Briarcliffe Drive'. Canonicalized server-side, so you do not need to know the exact stored form.",
            "example": "7236 10 Street NE"
          },
          {
            "name": "municipality",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "City slug, e.g. 'ottawa', 'calgary', 'toronto'.",
              "title": "Municipality"
            },
            "description": "City slug, e.g. 'ottawa', 'calgary', 'toronto'.",
            "example": "calgary"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/address/normalize": {
      "get": {
        "summary": "Canonical form of a street address",
        "operationId": "address_normalize_address_normalize_get",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Raw street address to canonicalize.",
              "title": "Q"
            },
            "description": "Raw street address to canonicalize.",
            "example": "7236 10 St NE"
          },
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug. When given, also reports whether the address has records and lists near matches.",
            "example": "calgary"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/opening_soon": {
      "get": {
        "summary": "Addresses where a business is likely opening soon",
        "operationId": "business_search_opening_soon_get",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug, e.g. vancouver",
            "example": "lethbridge"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "opening_soon, active or closed. Forced on /opening endpoints."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized category"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Search business name or address"
          },
          {
            "name": "opened_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Earliest opening date YYYY-MM-DD"
          },
          {
            "name": "opened_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Latest opening date YYYY-MM-DD"
          },
          {
            "name": "preceded_by_permit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a building permit at the same address"
          },
          {
            "name": "is_contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only contractors"
          },
          {
            "name": "has_address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a street address. Home-based sole proprietors have none, so set this when the address is the point."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "date, opened_on, permit_date, permit_value",
              "default": "date",
              "title": "Sort By"
            },
            "description": "date, opened_on, permit_date, permit_value"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "desc",
              "title": "Sort Order"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/opening": {
      "get": {
        "summary": "New business openings",
        "operationId": "business_search_opening_get",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug, e.g. vancouver",
            "example": "vancouver"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "opening_soon, active or closed. Forced on /opening endpoints."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized category"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Search business name or address"
          },
          {
            "name": "opened_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Earliest opening date YYYY-MM-DD"
          },
          {
            "name": "opened_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Latest opening date YYYY-MM-DD"
          },
          {
            "name": "preceded_by_permit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a building permit at the same address"
          },
          {
            "name": "is_contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only contractors"
          },
          {
            "name": "has_address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a street address. Home-based sole proprietors have none, so set this when the address is the point.",
            "example": true
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "date, opened_on, permit_date, permit_value",
              "default": "date",
              "title": "Sort By"
            },
            "description": "date, opened_on, permit_date, permit_value"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "desc",
              "title": "Sort Order"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/business": {
      "get": {
        "summary": "Canadian businesses: opened, active, closed, opening soon",
        "operationId": "business_search_business_get",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "City slug, e.g. vancouver",
            "example": "vancouver"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "opening_soon, active or closed. Forced on /opening endpoints.",
            "example": "active"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized category"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Search business name or address"
          },
          {
            "name": "opened_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Earliest opening date YYYY-MM-DD"
          },
          {
            "name": "opened_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Latest opening date YYYY-MM-DD"
          },
          {
            "name": "preceded_by_permit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a building permit at the same address"
          },
          {
            "name": "is_contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only contractors"
          },
          {
            "name": "has_address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Only businesses with a street address. Home-based sole proprietors have none, so set this when the address is the point."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "date, opened_on, permit_date, permit_value",
              "default": "date",
              "title": "Sort By"
            },
            "description": "date, opened_on, permit_date, permit_value"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "desc",
              "title": "Sort Order"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/business/stats": {
      "get": {
        "summary": "Business counts by status and category",
        "operationId": "business_stats_endpoint_business_stats_get",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/business/coverage": {
      "get": {
        "summary": "Business count per city",
        "operationId": "business_coverage_endpoint_business_coverage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/feed": {
      "get": {
        "summary": "Pro: matched permit-lead feed (curated, deduplicated, new-since window)",
        "description": "Requires a paid plan. On the free (BASIC) tier this returns 403 with an upgrade link; it is listed here so you can see the shape of what a paid plan unlocks. Returns building permits in your cities, deduplicated, limited to those new within the `days_back` window, so each pull is only the leads you have not seen.",
        "operationId": "permit_feed_permit_feed_get",
        "parameters": [
          {
            "name": "cities",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Comma-separated city slugs, e.g. toronto,vaughan,mississauga",
              "title": "Cities"
            },
            "description": "Comma-separated city slugs, e.g. toronto,vaughan,mississauga",
            "example": "toronto,vaughan,mississauga"
          },
          {
            "name": "permit_types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Comma-separated permit_type_canonical filters (optional)"
          },
          {
            "name": "min_value",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum construction value (optional)"
          },
          {
            "name": "days_back",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "description": "New-since window in days (the lead delta)",
              "default": 7,
              "title": "Days Back"
            },
            "description": "New-since window in days (the lead delta)",
            "example": 7
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 200,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/contractor/{name_normalized}": {
      "get": {
        "summary": "Get contractor profile by normalized name",
        "operationId": "/contractor/{name_normalized}",
        "parameters": [
          {
            "name": "name_normalized",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Name Normalized"
            },
            "example": "mattamy homes"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "name_normalized": "mattamy homes",
                  "display_name": "Mattamy Homes",
                  "municipalities": [
                    "brampton",
                    "ottawa",
                    "toronto"
                  ],
                  "trade_types": [],
                  "is_licensed": false,
                  "permit_count": 4347,
                  "permit_value_total": 95976543.15,
                  "last_permit_date": "2024-11-20",
                  "licence_status": null,
                  "recent_permits": [
                    {
                      "record_id": "brampton-12345",
                      "municipality": "brampton",
                      "event_date": "2024-11-20",
                      "permit_type": "Building",
                      "description": "New Residential"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit": {
      "get": {
        "summary": "Search building permits",
        "operationId": "/permit",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "permit_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by normalized permit type (exact match): new_construction, renovation, addition, demolition, change_of_use, other. Matches the permit_type_canonical field, not the raw per-city permit_type string."
          },
          {
            "name": "trade",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter trade sub-permits by trade (exact match): electrical, plumbing, mechanical, gas, sprinkler, sign, trade_other. A trade permit is pulled for work on one system rather than the building, so this is the field for replacement-cycle work: a furnace swap is trade=mechanical, a rewire is trade=electrical. Only cities that publish trade permits separately carry it; combine with permit_type, which every permit has."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermitRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inspection": {
      "get": {
        "summary": "Search building inspections",
        "operationId": "/inspection",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "brampton"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/licence": {
      "get": {
        "summary": "Search business licences",
        "operationId": "/licence",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "vancouver"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "is_active",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Business licences: true returns only currently active licences, false only inactive ones. Most licence records are historical, so this is usually what you want."
          },
          {
            "name": "is_opening",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Business licences: true returns only business openings, meaning the first licence this business ever held in this city. Renewals reuse the name and are excluded. Pair with opened_from to get the businesses that opened in a period."
          },
          {
            "name": "preceded_by_permit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "nullable": true
            },
            "description": "Business licences: true returns only openings that had a building permit at the same address in the two years before they opened, meaning the fit-out is on record. false returns openings that took space needing no work."
          },
          {
            "name": "opened_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Business licences: earliest opening date, YYYY-MM-DD. Filters on when the business was first licensed here, not on when this particular licence was issued."
          },
          {
            "name": "opened_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Business licences: latest opening date, YYYY-MM-DD."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LicenceRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/development_permit": {
      "get": {
        "summary": "Search development permits",
        "operationId": "/development_permit",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "calgary"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevelopmentPermitRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/planning_application": {
      "get": {
        "summary": "Search planning applications",
        "operationId": "/planning_application",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: issued, in_review, completed, expired, cancelled, unknown"
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanningApplicationRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assessment": {
      "get": {
        "summary": "Search property assessments",
        "operationId": "/assessment",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "calgary"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssessmentRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/major_project": {
      "get": {
        "summary": "Search major capital projects",
        "operationId": "/major_project",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. This is the city filter for BuildData datasets (permits, development permits, planning applications, inspections); call /{entity_type}/coverage for the list of valid slugs. The 'city' param is accepted as an alias here. (For the US liquor/healthcare/tank datasets, 'city' is instead a distinct filter and 'municipality' does not apply.)",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, including names (business, establishment, vendor, contractor) wherever the dataset carries them, e.g. q=brewery or q=\"Iron Hill\". This is the name search: there is no separate name= parameter, and it works on every plan including free. It matches the BUSINESS or trade name, the address, city, county and licence/permit number. It does NOT match an owner, licensee or applicant's personal name: these datasets carry public business records only and never store an individual's name, so searching for a person returns nothing. Space-separated words require all terms (e.g. \"wood panel\"). Use OR to match any term (\"wood OR panel OR acoustic\"), quotes for exact phrases (\"supply arrangement\"), and a leading minus to exclude (\"software -hardware\")."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Procurement category: CNST, GD, SRV, SRVTGD. For recalls: product category (e.g. 'Baby products', 'Toys and games'). For healthcare: facility category (acute, long_term, home, behavioral, outpatient, specialty). For storage tanks: record type (tank or release)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by status. Contracts/tenders: Active, Expired, Cancelled, Open (exact). Permits: use a status_canonical value instead (issued, in_review, completed, expired, cancelled, unknown)."
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Canonical sector (major_project): transit, roads_bridges, education, healthcare, residential, energy, industrial, infrastructure, municipal, recreation_culture, commercial, institutional. Spans both official languages and every source inventory."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by city. For the US liquor/healthcare/storage-tank datasets this is a distinct filter (exact, case-insensitive). For all other datasets it is an alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value, applied to the entity's value field (construction_value for permits, contract_value for contracts, agreement_value for grants, monetary_amount for contributions, total_co2e for emissions, assessed_value for assessments). Ignored for entity types with no monetary field."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value; same per-entity field mapping as value_min. Ignored for entity types with no monetary field."
          },
          {
            "name": "issued_after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date >= YYYY-MM-DD (issued_date). Aliases: date_from, date_after"
          },
          {
            "name": "issued_before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by date <= YYYY-MM-DD. Aliases: date_to, date_before"
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude for proximity search. Send with lng."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude for proximity search. Send with lat."
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 25.0,
              "minimum": 0.1,
              "nullable": true
            },
            "description": "Radius in km, 0.1 to 25. Optional: lat and lng with no radius search 1 km around the point. The radius actually applied is returned as radius_km in the response, so a default is never silent. For every record at one street address rather than everything near it, use /property."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: published (publication_date, tenders only), date (event date; this is award_date for contracts/awards), value (the entity's value field), closing (closing_date for tenders)"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort order: asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "Sort order: asc or desc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Pagination cursor from next_cursor in a previous response. Use instead of offset for deep pagination."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MajorProjectRecordPage"
                },
                "example": {
                  "entity_type": "permit",
                  "count": 1,
                  "offset": 0,
                  "results": [
                    {
                      "record_id": "24 223023 PLB:00",
                      "municipality": "toronto",
                      "lat": 43.65401,
                      "lng": -79.42376,
                      "work": "Building Permit Related(PS)",
                      "status": "Permit Issued",
                      "address": "865 COLLEGE ST",
                      "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                      "issued_date": "2025-01-29",
                      "permit_type": "Plumbing(PS)",
                      "application_date": "2024-10-07",
                      "construction_value": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/stats": {
      "get": {
        "summary": "Building permit statistics",
        "operationId": "/permit/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inspection/stats": {
      "get": {
        "summary": "Building inspection statistics",
        "operationId": "/inspection/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/licence/stats": {
      "get": {
        "summary": "Business licence statistics",
        "operationId": "/licence/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/development_permit/stats": {
      "get": {
        "summary": "Development permit statistics",
        "operationId": "/development_permit/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/planning_application/stats": {
      "get": {
        "summary": "Planning application statistics",
        "operationId": "/planning_application/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assessment/stats": {
      "get": {
        "summary": "Property assessment statistics",
        "operationId": "/assessment/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/major_project/stats": {
      "get": {
        "summary": "Major project statistics",
        "operationId": "/major_project/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            }
          },
          {
            "name": "group_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to group by"
          },
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "A number and a unit: 30d, 2w, 6mo, 1y. The unit may be spelled out (7days, 6months, 1year), or use 'all' for everything. Defaults to all for static registries (healthcare, liquor); 30d otherwise."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum (e.g. contract_value)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "entity_type": "permit",
                  "municipality": "toronto",
                  "period_days": 30,
                  "total_in_db": 234452,
                  "by_permit_type": [
                    {
                      "value": "Small Residential Projects",
                      "count": 52016
                    },
                    {
                      "value": "Building Additions/Alterations",
                      "count": 36534
                    },
                    {
                      "value": "New Houses",
                      "count": 14308
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/coverage": {
      "get": {
        "summary": "Building permit count per city",
        "operationId": "/permit/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inspection/coverage": {
      "get": {
        "summary": "Inspection count per city",
        "operationId": "/inspection/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/licence/coverage": {
      "get": {
        "summary": "Business licence count per city",
        "operationId": "/licence/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/development_permit/coverage": {
      "get": {
        "summary": "Development permit count per city",
        "operationId": "/development_permit/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/planning_application/coverage": {
      "get": {
        "summary": "Planning application count per city",
        "operationId": "/planning_application/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assessment/coverage": {
      "get": {
        "summary": "Property assessment count per city",
        "operationId": "/assessment/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/major_project/coverage": {
      "get": {
        "summary": "Major project count per city",
        "operationId": "/major_project/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/{record_id}/history": {
      "get": {
        "summary": "Planning + development application history for a permit",
        "operationId": "permit_history_permit__record_id__history_get",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/permit/{record_id}": {
      "get": {
        "summary": "Get permit by ID",
        "operationId": "/permit/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "26-131081-000-00"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inspection/{record_id}": {
      "get": {
        "summary": "Get inspection by ID",
        "operationId": "/inspection/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "26631005"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/licence/{record_id}": {
      "get": {
        "summary": "Get licence by ID",
        "operationId": "/licence/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "LVR0188"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/development_permit/{record_id}": {
      "get": {
        "summary": "Get development permit by ID",
        "operationId": "/development_permit/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "DP088788"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/planning_application/{record_id}": {
      "get": {
        "summary": "Get planning application by ID",
        "operationId": "/planning_application/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "2026 131217 000 00 TREE"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assessment/{record_id}": {
      "get": {
        "summary": "Get property assessment by ID",
        "operationId": "/assessment/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "01000625700|2027"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/major_project/{record_id}": {
      "get": {
        "summary": "Get major project by ID",
        "operationId": "/major_project/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "12202"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {},
                "example": {
                  "record_id": "24 223023 PLB:00",
                  "municipality": "toronto",
                  "lat": 43.65401,
                  "lng": -79.42376,
                  "work": "Building Permit Related(PS)",
                  "status": "Permit Issued",
                  "address": "865 COLLEGE ST",
                  "description": "Plumbing - INTERIOR ALTERNATION OF 3RD FLOOR SUITE",
                  "issued_date": "2025-01-29",
                  "permit_type": "Plumbing(PS)"
                }
              }
            }
          },
          "400": {
            "description": "The request is understood but cannot be served as asked, e.g. offset above 9500, or cursor combined with sort_by=value. The message names the fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing or invalid API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such endpoint, or no record with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid: an unknown city slug, an impossible date, a limit above 500, an unrecognised sort field, or a misspelled parameter name. The message names the parameter and, where there is one, the nearest valid value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or plan quota exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "The query took too long. Narrow it with a municipality or a date range.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PermitEstimateRequest": {
        "properties": {
          "record_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "nullable": true
          },
          "permits": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array",
            "nullable": true
          }
        },
        "type": "object",
        "title": "PermitEstimateRequest"
      },
      "PermitRecord": {
        "type": "object",
        "description": "One permit record. Measured over 6,000 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Always present.",
            "example": "260  8E AVENUE",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Populated in 53% of sampled records.",
            "example": "2026-06-15",
            "nullable": true
          },
          "area_m2": {
            "type": "number",
            "description": "Populated in 11% of sampled records.",
            "example": 151.52,
            "nullable": true
          },
          "building_type": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "Habitation",
            "nullable": true
          },
          "construction_value": {
            "type": "number",
            "description": "Populated in 58% of sampled records.",
            "example": 719452.9,
            "nullable": true
          },
          "contractor": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "TR\u00c9VI PISCINE",
            "nullable": true
          },
          "contractor_name": {
            "type": "string",
            "description": "Populated in 22% of sampled records.",
            "example": "Fine Line Builders",
            "nullable": true
          },
          "contractor_name_normalized": {
            "type": "string",
            "description": "Populated in 22% of sampled records.",
            "example": "fine line builders",
            "nullable": true
          },
          "current_use": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "Bifamilial",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 50% of sampled records.",
            "example": "A new, two storey, 4 unit townhouse, with secondary suites,\u2026",
            "nullable": true
          },
          "dwelling_units_created": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": 0,
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-06T00:20:37.120618+00:00"
          },
          "geocode_failed": {
            "type": "boolean",
            "description": "Populated in 67% of sampled records.",
            "example": true,
            "nullable": true
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 95% of sampled records.",
            "example": "2026-07-27",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 75% of sampled records.",
            "example": "45.56533",
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 75% of sampled records.",
            "example": "-73.69703",
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "montreal"
          },
          "neighborhood": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "Lachine",
            "nullable": true
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 29% of sampled records.",
            "example": "Montgomery",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Always present.",
            "example": "260 8 AVENUE",
            "nullable": true
          },
          "normalized_business_name": {
            "type": "string",
            "description": "Business name normalized for joining the same business across datasets. Populated in 24% of sampled records.",
            "example": "FINE LINE BUILDERS",
            "nullable": true
          },
          "opening_soon": {
            "type": "boolean",
            "description": "Populated in 99% of sampled records.",
            "example": false,
            "nullable": true
          },
          "permit_number": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "3001953722",
            "nullable": true
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 91% of sampled records.",
            "example": "Certificat Autre",
            "nullable": true
          },
          "permit_type_canonical": {
            "type": "string",
            "description": "Permit type mapped onto a shared vocabulary. This is what the permit_type filter matches. Always present.",
            "example": "other"
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 24% of sampled records.",
            "example": "M9N",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 93% of sampled records.",
            "example": "QC",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "3001953722"
          },
          "status": {
            "type": "string",
            "description": "Populated in 90% of sampled records.",
            "example": "Issued",
            "nullable": true
          },
          "status_canonical": {
            "type": "string",
            "description": "Status mapped onto a shared vocabulary. This is what the status_canonical filter matches. Always present.",
            "example": "issued"
          },
          "storeys": {
            "type": "integer",
            "description": "Populated in 11% of sampled records.",
            "example": 2,
            "nullable": true
          },
          "structure_type": {
            "type": "string",
            "description": "Populated in 21% of sampled records.",
            "example": "R\u00e9sidentiel",
            "nullable": true
          },
          "trade_canonical": {
            "type": "string",
            "description": "The trade a sub-permit covers (electrical, plumbing, mechanical, gas, sprinkler, sign, trade_other). This is what the trade filter matches. Only cities that publish trade permits separately carry it, so it is absent nationally but present on every permit from those cities. Populated in 2% of sampled records.",
            "example": "mechanical",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "W0521",
            "nullable": true
          },
          "work": {
            "type": "string",
            "description": "Populated in 85% of sampled records.",
            "example": "AM\u00c9NAGEMENT D'UNE AIRE DE STATIONNEMENT, SANS AUTRES TRAVAUX\u2026",
            "nullable": true
          },
          "work_type": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "Alteration to a single family building",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "actual_use": {
            "type": "string",
            "fill_rate": 0.024
          },
          "address_details": {
            "type": "string",
            "fill_rate": 0.0058
          },
          "applicant": {
            "type": "string",
            "fill_rate": 0.0332
          },
          "applicant_name": {
            "type": "string",
            "fill_rate": 0.0763
          },
          "application_number": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "area": {
            "type": "integer",
            "fill_rate": 0.0058
          },
          "area_ft2": {
            "type": "string",
            "fill_rate": 0.0
          },
          "auc_group": {
            "type": "string",
            "fill_rate": 0.0297
          },
          "bedrooms": {
            "type": "integer",
            "fill_rate": 0.0027
          },
          "builder": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "builder_name": {
            "type": "string",
            "fill_rate": 0.043
          },
          "building_category": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "building_use": {
            "type": "string",
            "fill_rate": 0.0667
          },
          "category": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "city": {
            "type": "string",
            "fill_rate": 0.0667
          },
          "community": {
            "type": "string",
            "fill_rate": 0.0985
          },
          "completed_date": {
            "type": "string",
            "fill_rate": 0.0193
          },
          "construction_type": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "dataset": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "demolition": {
            "type": "boolean",
            "fill_rate": 0.0333
          },
          "district": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "domain": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "dwelling_units": {
            "type": "integer",
            "fill_rate": 0.085
          },
          "dwelling_units_lost": {
            "type": "string",
            "fill_rate": 0.0262
          },
          "dwellings_created": {
            "type": "string",
            "fill_rate": 0.0127
          },
          "entered_date": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "est_const_cost_cents": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "existing_gfa_m2": {
            "type": "string",
            "fill_rate": 0.0
          },
          "existing_units": {
            "type": "integer",
            "fill_rate": 0.0095
          },
          "expiry_date": {
            "type": "string",
            "fill_rate": 0.0675
          },
          "file_type": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "floor_area_commercial": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "floor_area_industrial": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "floor_area_institutional": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "floor_area_residential": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "footprint_area": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "former_city": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "gfa": {
            "type": "number",
            "fill_rate": 0.0047
          },
          "height": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "inspection_outcome": {
            "type": "string",
            "fill_rate": 0.0043
          },
          "land_use": {
            "type": "string",
            "fill_rate": 0.0308
          },
          "land_use_district": {
            "type": "string",
            "fill_rate": 0.0312
          },
          "latitude": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "legal_description": {
            "type": "string",
            "fill_rate": 0.0323
          },
          "longitude": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "lots": {
            "type": "string",
            "fill_rate": 0.0667
          },
          "matricule": {
            "type": "string",
            "fill_rate": 0.0298
          },
          "most_recent_inspection": {
            "type": "string",
            "fill_rate": 0.0043
          },
          "net_new_units": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "new_floor_area_sqft": {
            "type": "number",
            "fill_rate": 0.005
          },
          "occupancy_type": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "parent_permit_number": {
            "type": "string",
            "fill_rate": 0.0077
          },
          "permit_cost": {
            "type": "number",
            "fill_rate": 0.0148
          },
          "permit_fee": {
            "type": "number",
            "fill_rate": 0.0312
          },
          "permit_group": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "permit_type_code": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "permit_type_description": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "pid": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "processed_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "proposed_gfa": {
            "type": "string",
            "fill_rate": 0.0
          },
          "proposed_use": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "received_date": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "revision": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "second_unit": {
            "type": "string",
            "fill_rate": 0.0002
          },
          "structure": {
            "type": "string",
            "fill_rate": 0.0035
          },
          "subdivision": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "subject": {
            "type": "string",
            "fill_rate": 0.0125
          },
          "total_units": {
            "type": "integer",
            "fill_rate": 0.0412
          },
          "units_created": {
            "type": "integer",
            "fill_rate": 0.0667
          },
          "units_lost": {
            "type": "integer",
            "fill_rate": 0.0023
          },
          "units_net_change": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "work_class": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "work_scope": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "zoning": {
            "type": "string",
            "fill_rate": 0.0667
          }
        }
      },
      "PermitRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "permit"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PermitRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "InspectionRecord": {
        "type": "object",
        "description": "One inspection record. Measured over 600 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Populated in 33% of sampled records.",
            "example": "4038A 7 ST SE",
            "nullable": true
          },
          "checklist": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "All Directives",
            "nullable": true
          },
          "created_date": {
            "type": "string",
            "description": "Populated in 33% of sampled records.",
            "example": "2026-07-28",
            "nullable": true
          },
          "deficiencies": {
            "type": "boolean",
            "description": "Populated in 18% of sampled records.",
            "example": false,
            "nullable": true
          },
          "deficiency": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "No deficiencies noted. No further building inspections are r\u2026",
            "nullable": true
          },
          "discipline_type": {
            "type": "string",
            "description": "Populated in 33% of sampled records.",
            "example": "Building Deficiencies",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-01T06:08:18.465738+00:00"
          },
          "inspection_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-09-01"
          },
          "inspection_type": {
            "type": "string",
            "description": "Always present.",
            "example": "Start of Construction - HVAC"
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "2025-02-10",
            "nullable": true
          },
          "job_type": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "Commercial / Multi Family Project",
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 22% of sampled records.",
            "example": 51.01805022529488,
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 22% of sampled records.",
            "example": -114.04526893150208,
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "brampton"
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 33% of sampled records.",
            "example": "4038A 7 STREET SE",
            "nullable": true
          },
          "permit_close_date": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "2026-07-30",
            "nullable": true
          },
          "permit_name": {
            "type": "string",
            "description": "Populated in 33% of sampled records.",
            "example": "Mixed Use & Commercial Building Permit",
            "nullable": true
          },
          "permit_number": {
            "type": "string",
            "description": "Always present.",
            "example": "2266070"
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "Contractor's Furnace Replacement Permit",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "26631005"
          },
          "result": {
            "type": "string",
            "description": "Always present.",
            "example": "In Progress"
          },
          "status": {
            "type": "string",
            "description": "Populated in 33% of sampled records.",
            "example": "COMP",
            "nullable": true
          },
          "work_class": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "Improvement",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "deficiency_resolved": {
            "type": "boolean",
            "fill_rate": 0.02
          },
          "general_contractor": {
            "type": "string",
            "fill_rate": 0.0
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.0017
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "permit_holder": {
            "type": "string",
            "fill_rate": 0.0217
          },
          "resolved_date": {
            "type": "string",
            "fill_rate": 0.02
          }
        }
      },
      "InspectionRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "inspection"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InspectionRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "LicenceRecord": {
        "type": "object",
        "description": "One licence record. Measured over 5,446 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Populated in 89% of sampled records.",
            "example": "1211A-750 W BROADWAY",
            "nullable": true
          },
          "business_name": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "YS CLINIC INC.",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "Health Care Professionals and Services",
            "nullable": true
          },
          "category_canonical": {
            "type": "string",
            "description": "Licence category mapped onto a shared vocabulary. Always present.",
            "example": "health_wellness"
          },
          "city": {
            "type": "string",
            "description": "Always present.",
            "example": "Vancouver"
          },
          "expiry_date": {
            "type": "string",
            "description": "Populated in 34% of sampled records.",
            "example": "2026-12-31",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-06T07:05:30.013174+00:00"
          },
          "first_licensed_at": {
            "type": "string",
            "description": "Populated in 95% of sampled records.",
            "example": "2026-07-26T07:05:29.912695+00:00",
            "nullable": true
          },
          "geocode_failed": {
            "type": "boolean",
            "description": "Populated in 14% of sampled records.",
            "example": true,
            "nullable": true
          },
          "is_active": {
            "type": "boolean",
            "description": "Always present.",
            "example": true
          },
          "is_contractor": {
            "type": "boolean",
            "description": "Always present.",
            "example": false
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 67% of sampled records.",
            "example": "2026-10-01",
            "nullable": true
          },
          "last_updated": {
            "type": "string",
            "description": "Populated in 20% of sampled records.",
            "example": "2026-08-04",
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 33% of sampled records.",
            "example": 49.2630145309513,
            "nullable": true
          },
          "legal_name": {
            "type": "string",
            "description": "Populated in 24% of sampled records.",
            "example": "YS CLINIC INC.",
            "nullable": true
          },
          "licence_number": {
            "type": "string",
            "description": "Populated in 89% of sampled records.",
            "example": "26-258507",
            "nullable": true
          },
          "licence_type": {
            "type": "string",
            "description": "Populated in 85% of sampled records.",
            "example": "Area Extension",
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 33% of sampled records.",
            "example": -123.121054317485,
            "nullable": true
          },
          "months_permit_to_open": {
            "type": "number",
            "description": "Populated in 11% of sampled records.",
            "example": 11.6,
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "vancouver"
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 47% of sampled records.",
            "example": "Fairview",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 87% of sampled records.",
            "example": "750 BROADWAY W",
            "nullable": true
          },
          "normalized_business_name": {
            "type": "string",
            "description": "Business name normalized for joining the same business across datasets. Populated in 96% of sampled records.",
            "example": "YS CLINIC",
            "nullable": true
          },
          "opened_on": {
            "type": "string",
            "description": "Populated in 63% of sampled records.",
            "example": "2026-10-01",
            "nullable": true
          },
          "opened_on_precision": {
            "type": "string",
            "description": "Populated in 63% of sampled records.",
            "example": "day",
            "nullable": true
          },
          "permit_lookback_date": {
            "type": "string",
            "description": "Populated in 11% of sampled records.",
            "example": "2025-10-17",
            "nullable": true
          },
          "permit_lookback_type": {
            "type": "string",
            "description": "Populated in 11% of sampled records.",
            "example": "addition",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Populated in 30% of sampled records.",
            "example": "4166317338",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 36% of sampled records.",
            "example": "V5Z 1H2",
            "nullable": true
          },
          "preceded_by_permit": {
            "type": "boolean",
            "description": "True when a building permit at this address preceded the licence. Populated in 59% of sampled records.",
            "example": true,
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 96% of sampled records.",
            "example": "BC",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "5003077:00"
          },
          "status": {
            "type": "string",
            "description": "Always present.",
            "example": "Issued"
          }
        },
        "x-sparse-fields": {
          "area_m2": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "cancel_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "description": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "is_opening": {
            "type": "boolean",
            "fill_rate": 0.0711
          },
          "licence_year": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "naics_code": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "num_employees": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "number_of_employees": {
            "type": "number",
            "fill_rate": 0.0367
          },
          "operation_start_date": {
            "type": "string",
            "fill_rate": 0.0367
          },
          "permit_lookback_value": {
            "type": "string",
            "fill_rate": 0.0577
          },
          "ward": {
            "type": "string",
            "fill_rate": 0.0347
          },
          "zone": {
            "type": "string",
            "fill_rate": 0.0367
          }
        }
      },
      "LicenceRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "licence"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LicenceRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "DevelopmentPermitRecord": {
        "type": "object",
        "description": "One development_permit record. Measured over 2,192 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "#105 1100 140 AV NE",
            "nullable": true
          },
          "applicant_name": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": "PRIORITY PERMITS",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-07-30"
          },
          "application_subtype": {
            "type": "string",
            "description": "Populated in 80% of sampled records.",
            "example": "Signs - Permitted Use with Relaxation",
            "nullable": true
          },
          "community": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "Riel",
            "nullable": true
          },
          "completed_date": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "2026-07-30",
            "nullable": true
          },
          "decision_date": {
            "type": "string",
            "description": "Populated in 26% of sampled records.",
            "example": "2026-07-30",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 73% of sampled records.",
            "example": "NEW: SIGN - CLASS A (DIRECTIONAL SIGNS - 2), SIGN - CLASS B\u2026",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-01T06:28:33.497247+00:00"
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "2026-07-31",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 29% of sampled records.",
            "example": "51.181",
            "nullable": true
          },
          "legal_description": {
            "type": "string",
            "description": "Populated in 27% of sampled records.",
            "example": "Plan 8621657 Blk 22 Lot 13",
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 29% of sampled records.",
            "example": "-114.038",
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "calgary"
          },
          "neighborhood": {
            "type": "string",
            "description": "Populated in 39% of sampled records.",
            "example": "Lewisburg",
            "nullable": true
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 31% of sampled records.",
            "example": "Broadmoor Centre",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 88% of sampled records.",
            "example": "105 1100 140 AVENUE NE",
            "nullable": true
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 48% of sampled records.",
            "example": "Minor Development Permit",
            "nullable": true
          },
          "pipeline_stage": {
            "type": "string",
            "description": "Populated in 96% of sampled records.",
            "example": "proposed",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 84% of sampled records.",
            "example": "AB",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "DP2026-04437"
          },
          "record_number": {
            "type": "string",
            "description": "Always present.",
            "example": "DP2026-04437",
            "nullable": true
          },
          "roll_number": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "2043805490001",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Always present.",
            "example": "New"
          },
          "status_canonical": {
            "type": "string",
            "description": "Status mapped onto a shared vocabulary. This is what the status_canonical filter matches. Always present.",
            "example": "other"
          },
          "ward": {
            "type": "string",
            "description": "Populated in 36% of sampled records.",
            "example": "3",
            "nullable": true
          },
          "work_type": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "30 Days",
            "nullable": true
          },
          "zoning": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "RS",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "application_url": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "category": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "construction_cost": {
            "type": "number",
            "fill_rate": 0.0912
          },
          "district": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "dwelling_units_created": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "dwelling_units_lost": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "expiration_date": {
            "type": "string",
            "fill_rate": 0.0534
          },
          "fee": {
            "type": "number",
            "fill_rate": 0.0912
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.021
          },
          "hamlet": {
            "type": "string",
            "fill_rate": 0.0224
          },
          "housing_type": {
            "type": "string",
            "fill_rate": 0.0237
          },
          "inspection_outcome": {
            "type": "string",
            "fill_rate": 0.0005
          },
          "land_use_district": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "land_use_district_description": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "latitude": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "legal": {
            "type": "string",
            "fill_rate": 0.0867
          },
          "longitude": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "municipality_name": {
            "type": "string",
            "fill_rate": 0.0899
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "permit_name": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "permitted_or_discretionary": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "plan_block_lot": {
            "type": "string",
            "fill_rate": 0.0721
          },
          "postal_code": {
            "type": "string",
            "fill_rate": 0.0871
          },
          "primary_work_scope": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "proposed_use_code": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "proposed_use_description": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "published_date": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "quadrant": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "related_record_numbers": {
            "type": "array",
            "fill_rate": 0.0005
          },
          "stats_can_code": {
            "type": "string",
            "fill_rate": 0.0
          },
          "structure_description": {
            "type": "string",
            "fill_rate": 0.0903
          },
          "structure_type": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "subcategory": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "subdivision": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "total_units": {
            "type": "integer",
            "fill_rate": 0.0237
          },
          "type_of_structure": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "units_created": {
            "type": "string",
            "fill_rate": 0.0068
          },
          "updated_date": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "use": {
            "type": "string",
            "fill_rate": 0.0433
          },
          "variance_required": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "zoning_overlay": {
            "type": "string",
            "fill_rate": 0.0912
          }
        }
      },
      "DevelopmentPermitRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "development_permit"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DevelopmentPermitRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "PlanningApplicationRecord": {
        "type": "object",
        "description": "One planning_application record. Measured over 5,867 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Populated in 96% of sampled records.",
            "example": "75 RUE AUGUSTIN-DELISLE QU\u00c9BEC QU\u00c9BEC G2G2G4",
            "nullable": true
          },
          "applicant": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "10000469464 Ontario Inc. c/o Mingxing Xue",
            "nullable": true
          },
          "applicant_name": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "QATEST CONSULTANT",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "2026-07-24",
            "nullable": true
          },
          "application_subtype": {
            "type": "string",
            "description": "Always present.",
            "example": "other"
          },
          "application_type": {
            "type": "string",
            "description": "Populated in 31% of sampled records.",
            "example": "Certificat d'autorisation",
            "nullable": true
          },
          "application_type_code": {
            "type": "string",
            "description": "Populated in 10% of sampled records.",
            "example": "SA",
            "nullable": true
          },
          "application_url": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": "None",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "RESIDENTIAL",
            "nullable": true
          },
          "decision_date": {
            "type": "string",
            "description": "Populated in 11% of sampled records.",
            "example": "2026-07-06",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 84% of sampled records.",
            "example": "Abattage d'arbre",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-01T09:51:52.721404+00:00"
          },
          "folder_type": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "TREE",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": 46.76630659450344,
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": -71.39208892795442,
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "quebec_city"
          },
          "neighborhood": {
            "type": "string",
            "description": "Populated in 20% of sampled records.",
            "example": "West Maple Ridge",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 96% of sampled records.",
            "example": "75 AUGUSTIN-DELISLE QUEBEC QUEBEC RUE",
            "nullable": true
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 26% of sampled records.",
            "example": "Exercer un nouvel usage, ajouter un usage ou modifier un usa\u2026",
            "nullable": true
          },
          "pipeline_stage": {
            "type": "string",
            "description": "Populated in 89% of sampled records.",
            "example": "permitted",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Always present.",
            "example": "QC"
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "20260527-094D"
          },
          "record_number": {
            "type": "string",
            "description": "Populated in 93% of sampled records.",
            "example": "20260527-094D",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "Issued",
            "nullable": true
          },
          "status_canonical": {
            "type": "string",
            "description": "Status mapped onto a shared vocabulary. This is what the status_canonical filter matches. Populated in 97% of sampled records.",
            "example": "approved",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 24% of sampled records.",
            "example": "WARD 6",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "additional_scope": {
            "type": "string",
            "fill_rate": 0.0007
          },
          "agent": {
            "type": "string",
            "fill_rate": 0.0005
          },
          "agent_name": {
            "type": "string",
            "fill_rate": 0.0324
          },
          "appealed": {
            "type": "string",
            "fill_rate": 0.0053
          },
          "application_number": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "application_scope": {
            "type": "string",
            "fill_rate": 0.0319
          },
          "application_type_fr": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "approval_date": {
            "type": "string",
            "fill_rate": 0.0121
          },
          "approved_date": {
            "type": "string",
            "fill_rate": 0.0114
          },
          "approved_total_units": {
            "type": "integer",
            "fill_rate": 0.0153
          },
          "benchmark_days": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "benchmark_met": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "character_area": {
            "type": "string",
            "fill_rate": 0.0337
          },
          "city_planner": {
            "type": "string",
            "fill_rate": 0.029
          },
          "city_web": {
            "type": "string",
            "fill_rate": 0.017
          },
          "community": {
            "type": "string",
            "fill_rate": 0.0682
          },
          "community_meeting_date": {
            "type": "string",
            "fill_rate": 0.0075
          },
          "community_plan": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "condo_number": {
            "type": "string",
            "fill_rate": 0.0005
          },
          "construction_type": {
            "type": "string",
            "fill_rate": 0.0198
          },
          "contact": {
            "type": "string",
            "fill_rate": 0.0174
          },
          "contact_name": {
            "type": "string",
            "fill_rate": 0.0324
          },
          "council_decision_date": {
            "type": "string",
            "fill_rate": 0.0072
          },
          "council_meeting_date": {
            "type": "string",
            "fill_rate": 0.0315
          },
          "council_report_url": {
            "type": "string",
            "fill_rate": 0.0026
          },
          "current_land_use": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "current_zoning": {
            "type": "string",
            "fill_rate": 0.0319
          },
          "days_to_process": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "deemed_complete_date": {
            "type": "string",
            "fill_rate": 0.0516
          },
          "demand_id": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "detail_url": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "district": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "documents_link": {
            "type": "string",
            "fill_rate": 0.0049
          },
          "domain": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "dwelling_units_created": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "dwelling_units_lost": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "engage_url": {
            "type": "string",
            "fill_rate": 0.0278
          },
          "existing_zoning": {
            "type": "string",
            "fill_rate": 0.0092
          },
          "folder_description": {
            "type": "string",
            "fill_rate": 0.0682
          },
          "folder_name": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "folder_rsn": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "folderrsn": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.0053
          },
          "gis_link": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "heritage_designation": {
            "type": "string",
            "fill_rate": 0.0015
          },
          "inside_mtsa": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "inspector": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "intended_use": {
            "type": "string",
            "fill_rate": 0.021
          },
          "issue_date": {
            "type": "string",
            "fill_rate": 0.002
          },
          "issued_date": {
            "type": "string",
            "fill_rate": 0.013
          },
          "latitude": {
            "type": "string",
            "fill_rate": 0.0337
          },
          "layer": {
            "type": "string",
            "fill_rate": 0.0682
          },
          "legal_description": {
            "type": "string",
            "fill_rate": 0.0339
          },
          "longitude": {
            "type": "string",
            "fill_rate": 0.0337
          },
          "lots": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "major_use": {
            "type": "string",
            "fill_rate": 0.0222
          },
          "max_storeys": {
            "type": "integer",
            "fill_rate": 0.0167
          },
          "meeting_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "mtsa_name": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "municipality_name": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "neighbourhood": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "non_residential_gfa_m2": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "opa_number": {
            "type": "string",
            "fill_rate": 0.0099
          },
          "parent_folder_number": {
            "type": "string",
            "fill_rate": 0.015
          },
          "planner": {
            "type": "string",
            "fill_rate": 0.067
          },
          "planner_email": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "planner_name": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "postal": {
            "type": "string",
            "fill_rate": 0.0489
          },
          "proposed_land_use": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "proposed_total_units": {
            "type": "integer",
            "fill_rate": 0.0295
          },
          "proposed_use": {
            "type": "string",
            "fill_rate": 0.0598
          },
          "proposed_use_code": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "proposed_zoning": {
            "type": "string",
            "fill_rate": 0.0319
          },
          "public_meeting_date": {
            "type": "string",
            "fill_rate": 0.0015
          },
          "public_status_description": {
            "type": "string",
            "fill_rate": 0.0281
          },
          "published_date": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "record_type": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "reference_file": {
            "type": "string",
            "fill_rate": 0.0031
          },
          "regional_number": {
            "type": "string",
            "fill_rate": 0.0015
          },
          "registered_residential_lots": {
            "type": "string",
            "fill_rate": 0.0
          },
          "residential_units": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "sector": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "status_date": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "subcategory": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "subdivision_number": {
            "type": "string",
            "fill_rate": 0.0019
          },
          "title": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "updated_date": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "ward_id": {
            "type": "integer",
            "fill_rate": 0.0337
          },
          "ward_name": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "ward_number": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "web_link": {
            "type": "string",
            "fill_rate": 0.0095
          },
          "weblink": {
            "type": "string",
            "fill_rate": 0.0337
          },
          "year_of_application": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "year_quarter": {
            "type": "string",
            "fill_rate": 0.0199
          },
          "zba_number": {
            "type": "string",
            "fill_rate": 0.0266
          },
          "zone": {
            "type": "string",
            "fill_rate": 0.0341
          }
        }
      },
      "PlanningApplicationRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "planning_application"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlanningApplicationRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "AssessmentRecord": {
        "type": "object",
        "description": "One assessment record. Measured over 6,000 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Always present.",
            "example": "286 50TH AVE E",
            "nullable": true
          },
          "assessed_value": {
            "type": "number",
            "description": "Always present.",
            "example": 1915000.0,
            "nullable": true
          },
          "assessment_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-01-01"
          },
          "assessment_year": {
            "type": "integer",
            "description": "Always present.",
            "example": 2026
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-06-16T05:09:08.544318+00:00"
          },
          "improvement_value": {
            "type": "number",
            "description": "Populated in 55% of sampled records.",
            "example": 200000.0,
            "nullable": true
          },
          "land_value": {
            "type": "number",
            "description": "Populated in 70% of sampled records.",
            "example": 1715000.0,
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 18% of sampled records.",
            "example": "51.1324",
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 18% of sampled records.",
            "example": "-113.96057",
            "nullable": true
          },
          "lot_size_sf": {
            "type": "number",
            "description": "Populated in 76% of sampled records.",
            "example": 190986.0,
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "vancouver"
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Always present.",
            "example": "286 50 AVENUE E",
            "nullable": true
          },
          "pid": {
            "type": "string",
            "description": "Populated in 30% of sampled records.",
            "example": "002-396-220",
            "nullable": true
          },
          "previous_assessed_value": {
            "type": "number",
            "description": "Populated in 60% of sampled records.",
            "example": 2022000.0,
            "nullable": true
          },
          "property_class": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "Residential Inclusive",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Always present.",
            "example": "BC"
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "002-396-220|2026"
          },
          "roll_number": {
            "type": "string",
            "description": "Always present.",
            "example": "791190860000"
          },
          "use_code": {
            "type": "string",
            "description": "Populated in 53% of sampled records.",
            "example": "9100",
            "nullable": true
          },
          "year_built": {
            "type": "integer",
            "description": "Populated in 46% of sampled records.",
            "example": 1987,
            "nullable": true
          },
          "zoning": {
            "type": "string",
            "description": "Populated in 23% of sampled records.",
            "example": "R1-1",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "aan": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "building_use": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "community": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "dwelling_units": {
            "type": "integer",
            "fill_rate": 0.0327
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.0008
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "square_footage": {
            "type": "number",
            "fill_rate": 0.0295
          },
          "taxing_authority": {
            "type": "string",
            "fill_rate": 0.0667
          }
        }
      },
      "AssessmentRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "assessment"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssessmentRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "MajorProjectRecord": {
        "type": "object",
        "description": "One major_project record. Measured over 2,742 live records sampled across municipalities. Percentages say how often each field is populated: sources publish different columns, so a field missing from a given record is normal rather than an error.",
        "properties": {
          "address": {
            "type": "string",
            "description": "Populated in 46% of sampled records.",
            "example": "13 Winchester Street",
            "nullable": true
          },
          "approval_status": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "Approved",
            "nullable": true
          },
          "architect": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "GGA Architecture",
            "nullable": true
          },
          "area": {
            "type": "string",
            "description": "Populated in 61% of sampled records.",
            "example": "Toronto",
            "nullable": true
          },
          "clean_energy": {
            "type": "boolean",
            "description": "Populated in 15% of sampled records.",
            "example": false,
            "nullable": true
          },
          "completion_date": {
            "type": "string",
            "description": "Populated in 85% of sampled records.",
            "example": "22-Dec",
            "nullable": true
          },
          "construction_subtype": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "Health",
            "nullable": true
          },
          "construction_type": {
            "type": "string",
            "description": "Always present.",
            "example": "Communities"
          },
          "cost_band": {
            "type": "string",
            "description": "Populated in 74% of sampled records.",
            "example": "5m_20m",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 85% of sampled records.",
            "example": "35 units geared towards  homeless",
            "nullable": true
          },
          "developer": {
            "type": "string",
            "description": "Populated in 38% of sampled records.",
            "example": "Toronto Water/Transportation Services",
            "nullable": true
          },
          "estimated_cost": {
            "type": "number",
            "description": "Populated in 74% of sampled records.",
            "example": 5250000.0,
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-07-26T16:28:21.701456+00:00"
          },
          "first_entry_date": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "2025-03-01",
            "nullable": true
          },
          "geocode_precision": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "city",
            "nullable": true
          },
          "green_building": {
            "type": "boolean",
            "description": "Populated in 15% of sampled records.",
            "example": true,
            "nullable": true
          },
          "indigenous_involvement": {
            "type": "boolean",
            "description": "Populated in 15% of sampled records.",
            "example": false,
            "nullable": true
          },
          "last_update": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "2025-03-01",
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 97% of sampled records.",
            "example": 43.66644,
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 97% of sampled records.",
            "example": -79.36605,
            "nullable": true
          },
          "ministry": {
            "type": "string",
            "description": "Populated in 70% of sampled records.",
            "example": "Municipal Affairs and Housing",
            "nullable": true
          },
          "municipalities": {
            "type": "array",
            "description": "Populated in 15% of sampled records.",
            "nullable": true
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "toronto"
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 46% of sampled records.",
            "example": "13 WINCHESTER STREET",
            "nullable": true
          },
          "normalized_business_name": {
            "type": "string",
            "description": "Business name normalized for joining the same business across datasets. Populated in 38% of sampled records.",
            "example": "TORONTO WATER/TRANSPORTATION",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 57% of sampled records.",
            "example": "M4X 1A6",
            "nullable": true
          },
          "project_category": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "Public Services",
            "nullable": true
          },
          "project_name": {
            "type": "string",
            "description": "Always present.",
            "example": "Affordable Housing on Winchester Street"
          },
          "project_status": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "Complete",
            "nullable": true
          },
          "project_status_canonical": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "complete",
            "nullable": true
          },
          "project_subtype": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "Other Tourism/Recreation",
            "nullable": true
          },
          "project_type": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "Health Care and Social Assistance",
            "nullable": true
          },
          "project_website": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "https://www.metrolinx.com/en/projects-and-programs/ontario-l\u2026",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Always present.",
            "example": "ON"
          },
          "public_funding": {
            "type": "boolean",
            "description": "Populated in 15% of sampled records.",
            "example": true,
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "005abd583733a6b8"
          },
          "region": {
            "type": "string",
            "description": "Populated in 84% of sampled records.",
            "example": "Central",
            "nullable": true
          },
          "result": {
            "type": "string",
            "description": "Populated in 52% of sampled records.",
            "example": "Apartments with 1, Bachelor bedroom geared towards homeless",
            "nullable": true
          },
          "sector_canonical": {
            "type": "string",
            "description": "Always present.",
            "example": "municipal"
          },
          "start_date": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "2027",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "change_notes": {
            "type": "string",
            "fill_rate": 0.0861
          },
          "clean_technology": {
            "type": "boolean",
            "fill_rate": 0.004
          },
          "clean_technology_type": {
            "type": "string",
            "fill_rate": 0.0026
          },
          "construction_jobs": {
            "type": "integer",
            "fill_rate": 0.0036
          },
          "contract_number": {
            "type": "string",
            "fill_rate": 0.0051
          },
          "contract_term_months": {
            "type": "string",
            "fill_rate": 0.0073
          },
          "contractor": {
            "type": "string",
            "fill_rate": 0.0343
          },
          "delivery_division": {
            "type": "string",
            "fill_rate": 0.0073
          },
          "environmental_assessment_stage": {
            "type": "string",
            "fill_rate": 0.0004
          },
          "estimated_cost_range": {
            "type": "string",
            "fill_rate": 0.0113
          },
          "federal_funding": {
            "type": "string",
            "fill_rate": 0.0
          },
          "indigenous_nations": {
            "type": "string",
            "fill_rate": 0.0011
          },
          "infrastructure_name": {
            "type": "string",
            "fill_rate": 0.0861
          },
          "location": {
            "type": "string",
            "fill_rate": 0.0901
          },
          "manager": {
            "type": "string",
            "fill_rate": 0.0861
          },
          "municipal_funding": {
            "type": "string",
            "fill_rate": 0.0
          },
          "neighbourhood": {
            "type": "string",
            "fill_rate": 0.0029
          },
          "operating_jobs": {
            "type": "integer",
            "fill_rate": 0.0044
          },
          "other_funding": {
            "type": "string",
            "fill_rate": 0.0
          },
          "parent_company": {
            "type": "string",
            "fill_rate": 0.0022
          },
          "partner_funding": {
            "type": "number",
            "fill_rate": 0.0266
          },
          "power_capacity_mw": {
            "type": "number",
            "fill_rate": 0.0004
          },
          "project_stage": {
            "type": "string",
            "fill_rate": 0.0985
          },
          "provincial_funding": {
            "type": "number",
            "fill_rate": 0.0434
          },
          "sourcing_type": {
            "type": "string",
            "fill_rate": 0.0073
          },
          "target_award_year": {
            "type": "string",
            "fill_rate": 0.0073
          },
          "target_sourcing_year": {
            "type": "string",
            "fill_rate": 0.0073
          },
          "transit_line": {
            "type": "string",
            "fill_rate": 0.0354
          },
          "update_activity": {
            "type": "string",
            "fill_rate": 0.0135
          },
          "work_type": {
            "type": "string",
            "fill_rate": 0.0861
          }
        }
      },
      "MajorProjectRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "major_project"
          },
          "count": {
            "type": "integer",
            "description": "Records in this page."
          },
          "offset": {
            "type": "integer"
          },
          "next_cursor": {
            "type": "string",
            "nullable": true,
            "description": "Pass back as `cursor` for the next page. Null on the last page."
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MajorProjectRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-08-06."
      },
      "Error": {
        "type": "object",
        "description": "Every 4xx and 5xx response has this shape.",
        "properties": {
          "detail": {
            "type": "string",
            "description": "A sentence naming what was wrong and, where possible, the fix.",
            "example": "limit must be at most 500 (got 1000). Use offset, or cursor for deep pagination, to retrieve more."
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://hv1nforwhi.execute-api.ca-central-1.amazonaws.com"
    }
  ]
}