{
  "openapi": "3.0.3",
  "info": {
    "title": "BuildData - Canadian Construction Data API",
    "description": "Canada-wide construction data API: building permits, major capital projects, building inspections, occupancy permits, business licences, new business openings, development permits, planning applications, property assessments, heritage status, contractor profiles and zoning, covering dozens of Canadian cities and provinces. Every record at one address is a single call. 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. Free-tier keys see records first seen more than 30 days ago; responses include a free_tier object naming the cutoff, and a record inside the window returns 403 rather than 404. A paid plan removes the delay.",
    "version": "0.1.0"
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health",
        "operationId": "/health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          }
        }
      }
    },
    "/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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Alias for municipality.",
            "example": "toronto"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Latitude. With lng, returns the zone at that point."
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Longitude. With lat, returns the zone at that point."
          },
          {
            "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\").",
            "example": "mattamy"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Alias for municipality."
          },
          {
            "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": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "asc or desc",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "asc or desc"
          },
          {
            "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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",
        "description": "Every record filed against one street address, grouped by dataset, with counts per dataset. Free keys get the counts and an empty `records` object with a `free_tier` note; paid keys get the records.",
        "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": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
              "title": "Municipality"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "calgary"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\").",
              "title": "Q"
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\").",
            "example": "7236 10 St NE"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "calgary"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "lethbridge"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads).",
              "default": "date",
              "title": "Sort By"
            },
            "description": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "minimum": 1,
              "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "vancouver"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads).",
              "default": "date",
              "title": "Sort By"
            },
            "description": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "minimum": 1,
              "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "vancouver"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it.",
            "example": "active"
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads).",
              "default": "date",
              "title": "Sort By"
            },
            "description": "Sort field: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "minimum": 1,
              "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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",
        "description": "A contractor's profile and their ten most recent permits. On a free key the recent permits are the ten newest that reached us more than 30 days ago.",
        "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"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "units_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this many dwelling units. Reads whichever of units, dwelling_units, total_units or units_created the city publishes."
          },
          {
            "name": "floor_area_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this much floor area, in square metres. Reads floor_area or area_m2, whichever the city publishes. Cities that publish square feet are not converted and are not matched."
          },
          {
            "name": "storeys_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits on a building of at least this many storeys."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "Alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value: construction_value for permits, assessed_value for assessments, estimated_cost for major projects."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value, on the same field as value_min."
          },
          {
            "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "brampton"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "vancouver"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "calgary"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "units_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this many dwelling units. Reads whichever of units, dwelling_units, total_units or units_created the city publishes."
          },
          {
            "name": "floor_area_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this much floor area, in square metres. Reads floor_area or area_m2, whichever the city publishes. Cities that publish square feet are not converted and are not matched."
          },
          {
            "name": "storeys_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits on a building of at least this many storeys."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "units_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this many dwelling units. Reads whichever of units, dwelling_units, total_units or units_created the city publishes."
          },
          {
            "name": "floor_area_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this much floor area, in square metres. Reads floor_area or area_m2, whichever the city publishes. Cities that publish square feet are not converted and are not matched."
          },
          {
            "name": "storeys_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits on a building of at least this many storeys."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "calgary"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value: construction_value for permits, assessed_value for assessments, estimated_cost for major projects."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value, on the same field as value_min."
          },
          {
            "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias.",
            "example": "toronto"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "name": "units_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this many dwelling units. Reads whichever of units, dwelling_units, total_units or units_created the city publishes."
          },
          {
            "name": "floor_area_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this much floor area, in square metres. Reads floor_area or area_m2, whichever the city publishes. Cities that publish square feet are not converted and are not matched."
          },
          {
            "name": "storeys_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits on a building of at least this many storeys."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "Alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value: construction_value for permits, assessed_value for assessments, estimated_cost for major projects."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value, on the same field as value_min."
          },
          {
            "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/heritage_status": {
      "get": {
        "summary": "Search heritage designations",
        "operationId": "/heritage_status",
        "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: 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": "Alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value: construction_value for permits, assessed_value for assessments, estimated_cost for major projects."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value, on the same field as value_min."
          },
          {
            "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeritageStatusRecordPage"
                },
                "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/occupancy_permit": {
      "get": {
        "summary": "Search occupancy permits",
        "operationId": "/occupancy_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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Full-text search across the indexed fields of the record, e.g. q=roofing or q=\"Iron Hill\". Matches business, contractor and project names, the address, the city and the permit or licence number, on every plan including free. It does not match a person's name: these datasets carry business records only. Space-separated words require all terms (\"deck addition\"). Use OR to match any term (\"pool OR spa\"), quotes for an exact phrase (\"secondary suite\"), and a leading minus to exclude (\"renovation -interior\")."
          },
          {
            "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": "contractor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter permits by the firm that pulled them. A whole name is matched exactly against the normalized contractor name and is indexed; a fragment falls back to a substring across the contractor, company and builder fields. Cities file the same firm under several spellings, so the normalized form is the one that groups them."
          },
          {
            "name": "units_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this many dwelling units. Reads whichever of units, dwelling_units, total_units or units_created the city publishes."
          },
          {
            "name": "floor_area_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits with at least this much floor area, in square metres. Reads floor_area or area_m2, whichever the city publishes. Cities that publish square feet are not converted and are not matched."
          },
          {
            "name": "storeys_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "nullable": true
            },
            "description": "Permits on a building of at least this many storeys."
          },
          {
            "name": "structure_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by structure or building type as the city publishes it (exact, case-insensitive), e.g. 'Single Family Dwelling', 'Hotel'. Call /permit/stats for the values in use."
          },
          {
            "name": "neighbourhood",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by neighbourhood (partial match). Matches whichever of neighborhood, neighbourhood or community the city publishes; Calgary calls it community."
          },
          {
            "name": "ward",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by electoral ward as the city publishes it (exact, case-insensitive)."
          },
          {
            "name": "zoning",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Filter by the zoning code on the record (partial match), e.g. 'R-1'. Present on permits, development permits and assessments."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Major projects: the source's own sector wording, e.g. 'Transit'. Use sector for the canonical bucket, which spans both official languages."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Permits: the normalized status (issued, in_review, completed, expired, cancelled, unknown), same as status_canonical. Major projects: proposed, under_construction, complete, on_hold, cancelled. Business licences: the status the city publishes, e.g. APPROVED, case-insensitive. Other datasets: the status as the city publishes it."
          },
          {
            "name": "source_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Only records from one source feed, by its id (exact), e.g. 'gatineau_tenders'."
          },
          {
            "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": "status_canonical",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Normalized permit status: 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": "Alias for municipality."
          },
          {
            "name": "value_min",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Minimum value: construction_value for permits, assessed_value for assessments, estimated_cost for major projects."
          },
          {
            "name": "value_max",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "nullable": true
            },
            "description": "Maximum value, on the same field as value_min."
          },
          {
            "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: date (the record's own date, e.g. issued_date for permits) or value (the field value_min reads)."
          },
          {
            "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,
              "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response.",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page, 1 to 500. Free-tier keys are capped lower; the cap applied is the `count` in the response."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive.",
              "default": 0,
              "title": "Offset"
            },
            "description": "Records to skip. Fine for jumping to a known page; use `cursor` to walk a whole result set, because offset re-reads everything it skips and shifts when new records arrive."
          },
          {
            "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."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "nullable": true
            },
            "description": "Return only these fields on each record, comma-separated or repeated, e.g. fields=address,issued_date,construction_value. record_id is always included. field is accepted as an alias."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OccupancyPermitRecordPage"
                },
                "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/heritage_status/stats": {
      "get": {
        "summary": "Heritage designation statistics",
        "operationId": "/heritage_status/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/occupancy_permit/stats": {
      "get": {
        "summary": "Occupancy permit statistics",
        "operationId": "/occupancy_permit/stats",
        "parameters": [
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Municipality"
            },
            "description": "Filter to one city by its slug, e.g. 'new_westminster', 'toronto', 'north_vancouver_city'. Exact match. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          },
          {
            "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 30d."
          },
          {
            "name": "sum_field",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true
            },
            "description": "Data field to sum, e.g. construction_value."
          },
          {
            "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"
          }
        ],
        "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
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/heritage_status/coverage": {
      "get": {
        "summary": "Heritage designation count per city",
        "operationId": "/heritage_status/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/occupancy_permit/coverage": {
      "get": {
        "summary": "Occupancy permit count per city",
        "operationId": "/occupancy_permit/coverage",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
            }
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "920443"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "24672158"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "26 121495 00"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "DP089303"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "A-25:249"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "01001740500|2027"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "000d84fcd5e24845"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/heritage_status/{record_id}": {
      "get": {
        "summary": "Get heritage designation by ID",
        "operationId": "/heritage_status/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "listed:12243"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/occupancy_permit/{record_id}": {
      "get": {
        "summary": "Get occupancy permit by ID",
        "operationId": "/occupancy_permit/{record_id}",
        "parameters": [
          {
            "name": "record_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Record Id"
            },
            "example": "15259"
          },
          {
            "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. The dataset's /coverage endpoint lists the valid slugs. 'city' is accepted as an alias."
          }
        ],
        "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)"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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; a route that needs a paid plan, called with a free key; or, on a free key, a record first seen inside the last 30 days, asked for by id. The message says which.",
            "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"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per UTC day on this plan.",
                "schema": {
                  "type": "integer",
                  "example": 100
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left today. Zero once the quota is spent.",
                "schema": {
                  "type": "integer",
                  "example": 89
                }
              },
              "X-RateLimit-Reset": {
                "description": "Seconds until the quota resets, which is midnight UTC.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying. Same value as X-RateLimit-Reset.",
                "schema": {
                  "type": "integer",
                  "example": 40000
                }
              }
            }
          },
          "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": "4708  AVENUE PAPINEAU",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Populated in 49% of sampled records.",
            "example": "2026-03-05",
            "nullable": true
          },
          "area_m2": {
            "type": "number",
            "description": "Populated in 11% of sampled records.",
            "example": 279.55,
            "nullable": true
          },
          "building_type": {
            "type": "string",
            "description": "Populated in 21% of sampled records.",
            "example": "Habitation",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "Populated in 21% of sampled records.",
            "example": "Paragon Industries Ltd",
            "nullable": true
          },
          "construction_value": {
            "type": "number",
            "description": "Populated in 55% of sampled records.",
            "example": 1077405.44,
            "nullable": true
          },
          "contractor": {
            "type": "string",
            "description": "Populated in 15% of sampled records.",
            "example": "COUNTRYSIDE RIDGE II (ARH) HOMES LTD.",
            "nullable": true
          },
          "contractor_name": {
            "type": "string",
            "description": "Populated in 22% of sampled records.",
            "example": "Paragon Industries Ltd.",
            "nullable": true
          },
          "contractor_name_normalized": {
            "type": "string",
            "description": "Populated in 24% of sampled records.",
            "example": "paragon industries",
            "nullable": true
          },
          "current_use": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "5 \u00e0 11 Logements",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 49% of sampled records.",
            "example": "5-unit townhouse with 5 secondary suites",
            "nullable": true
          },
          "dwelling_units_created": {
            "type": "string",
            "description": "Populated in 14% 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-09-03T00:20:39.970338+00:00"
          },
          "geocode_failed": {
            "type": "boolean",
            "description": "Populated in 36% of sampled records.",
            "example": true,
            "nullable": true
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 96% of sampled records.",
            "example": "2026-08-24",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 75% of sampled records.",
            "example": "45.53388",
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 75% of sampled records.",
            "example": "-73.57715",
            "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": "Le Plateau-Mont-Royal",
            "nullable": true
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 26% of sampled records.",
            "example": "Ebby\u2013Wentworth",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Always present.",
            "example": "4708 PAPINEAU AVENUE",
            "nullable": true
          },
          "normalized_business_name": {
            "type": "string",
            "description": "Business name normalized for joining the same business across datasets. Populated in 22% of sampled records.",
            "example": "PARAGON INDUSTRIES",
            "nullable": true
          },
          "opening_soon": {
            "type": "boolean",
            "description": "Populated in 82% of sampled records.",
            "example": false,
            "nullable": true
          },
          "permit_number": {
            "type": "string",
            "description": "Populated in 97% of sampled records.",
            "example": "3001966182",
            "nullable": true
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 91% of sampled records.",
            "example": "T1:Transformation ext/PA/PIIA",
            "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": "renovation"
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 27% of sampled records.",
            "example": "J4Y 0K7",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 90% 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": "3001966182"
          },
          "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"
          },
          "structure_type": {
            "type": "string",
            "description": "Populated in 18% 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 in most of the country but present on every permit from those cities. Populated in 2% of sampled records.",
            "example": "plumbing",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "S1027",
            "nullable": true
          },
          "work": {
            "type": "string",
            "description": "Populated in 81% of sampled records.",
            "example": "En fa\u00e7ade, remplacer 3 planchers de balcon par planchers en\u2026",
            "nullable": true
          },
          "work_type": {
            "type": "string",
            "description": "Populated in 16% of sampled records.",
            "example": "Addition to a single family building",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "actual_use": {
            "type": "string",
            "fill_rate": 0.0265
          },
          "address_details": {
            "type": "string",
            "fill_rate": 0.0058
          },
          "application_number": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "area": {
            "type": "integer",
            "fill_rate": 0.0093
          },
          "area_ft2": {
            "type": "string",
            "fill_rate": 0.0
          },
          "auc_group": {
            "type": "string",
            "fill_rate": 0.0317
          },
          "bedrooms": {
            "type": "integer",
            "fill_rate": 0.0003
          },
          "builder": {
            "type": "string",
            "fill_rate": 0.0
          },
          "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.0663
          },
          "completed_date": {
            "type": "string",
            "fill_rate": 0.0208
          },
          "construction_type": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "contact_role": {
            "type": "string",
            "fill_rate": 0.0067
          },
          "contractor_address": {
            "type": "string",
            "fill_rate": 0.0192
          },
          "contractor_phone": {
            "type": "string",
            "fill_rate": 0.0033
          },
          "dataset": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "demolition": {
            "type": "boolean",
            "fill_rate": 0.0333
          },
          "domain": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "dwelling_units": {
            "type": "integer",
            "fill_rate": 0.082
          },
          "dwelling_units_lost": {
            "type": "string",
            "fill_rate": 0.0262
          },
          "dwellings_created": {
            "type": "string",
            "fill_rate": 0.0115
          },
          "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
          },
          "expiry_date": {
            "type": "string",
            "fill_rate": 0.0705
          },
          "file_type": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "floor_area": {
            "type": "number",
            "fill_rate": 0.0282
          },
          "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
          },
          "former_city": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "gfa": {
            "type": "number",
            "fill_rate": 0.0028
          },
          "land_use": {
            "type": "string",
            "fill_rate": 0.0312
          },
          "land_use_district": {
            "type": "string",
            "fill_rate": 0.0313
          },
          "latitude": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "legal_description": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "longitude": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "lots": {
            "type": "string",
            "fill_rate": 0.0663
          },
          "matricule": {
            "type": "string",
            "fill_rate": 0.0303
          },
          "new_floor_area_sqft": {
            "type": "number",
            "fill_rate": 0.008
          },
          "parent_permit_number": {
            "type": "string",
            "fill_rate": 0.0083
          },
          "permit_cost": {
            "type": "number",
            "fill_rate": 0.0148
          },
          "permit_fee": {
            "type": "number",
            "fill_rate": 0.0315
          },
          "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.033
          },
          "processed_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "proposed_gfa": {
            "type": "string",
            "fill_rate": 0.0
          },
          "proposed_use": {
            "type": "string",
            "fill_rate": 0.033
          },
          "received_date": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "revision": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "second_unit": {
            "type": "string",
            "fill_rate": 0.0003
          },
          "storeys": {
            "type": "integer",
            "fill_rate": 0.07
          },
          "structure": {
            "type": "string",
            "fill_rate": 0.0035
          },
          "subdivision": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "subject": {
            "type": "string",
            "fill_rate": 0.0088
          },
          "total_units": {
            "type": "integer",
            "fill_rate": 0.022
          },
          "units": {
            "type": "integer",
            "fill_rate": 0.022
          },
          "units_created": {
            "type": "integer",
            "fill_rate": 0.0667
          },
          "units_lost": {
            "type": "integer",
            "fill_rate": 0.002
          },
          "units_net_change": {
            "type": "integer",
            "fill_rate": 0.0333
          },
          "work_class": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "zoning": {
            "type": "string",
            "fill_rate": 0.0333
          }
        }
      },
      "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-09-03."
      },
      "InspectionRecord": {
        "type": "object",
        "description": "One inspection record. Measured over 800 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 50% of sampled records.",
            "example": "#250 1209 59 AV SE",
            "nullable": true
          },
          "checklist": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "All Directives",
            "nullable": true
          },
          "created_date": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "2026-08-25",
            "nullable": true
          },
          "deficiencies": {
            "type": "boolean",
            "description": "Populated in 19% of sampled records.",
            "example": false,
            "nullable": true
          },
          "deficiency": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "No deficiencies noted.  No further building inspections requ\u2026",
            "nullable": true
          },
          "discipline_type": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "Building Deficiencies",
            "nullable": true
          },
          "enforcement": {
            "type": "boolean",
            "description": "Populated in 25% of sampled records.",
            "example": false,
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-08T06:08:55.541407+00:00"
          },
          "inspection_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-09-01"
          },
          "inspection_id": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "0ec4e0975d2343b3",
            "nullable": true
          },
          "inspection_type": {
            "type": "string",
            "description": "Always present.",
            "example": "Start of Construction - HVAC"
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "2022-05-19",
            "nullable": true
          },
          "job_type": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "Commercial / Multi Family Project",
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 47% of sampled records.",
            "example": 50.99921287263228,
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 47% of sampled records.",
            "example": -114.03677992818056,
            "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 50% of sampled records.",
            "example": "250 1209 59 AVENUE SE",
            "nullable": true
          },
          "permit_close_date": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "2026-08-27",
            "nullable": true
          },
          "permit_name": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "Residential Building Permit",
            "nullable": true
          },
          "permit_number": {
            "type": "string",
            "description": "Populated in 75% of sampled records.",
            "example": "2266070",
            "nullable": true
          },
          "property_type": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "High Rise",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Always present.",
            "example": "ON"
          },
          "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 25% of sampled records.",
            "example": "COMP",
            "nullable": true
          },
          "violation_code": {
            "type": "string",
            "description": "Populated in 13% of sampled records.",
            "example": "2.16.2.1",
            "nullable": true
          },
          "violation_description": {
            "type": "string",
            "description": "Populated in 12% of sampled records.",
            "example": "Installation requirements",
            "nullable": true
          },
          "violation_item": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "1",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "20",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "applicant_type": {
            "type": "string",
            "fill_rate": 0.0587
          },
          "closed_date": {
            "type": "string",
            "fill_rate": 0.0437
          },
          "contractor": {
            "type": "string",
            "fill_rate": 0.055
          },
          "deficiency_resolved": {
            "type": "boolean",
            "fill_rate": 0.0138
          },
          "general_contractor": {
            "type": "string",
            "fill_rate": 0.0
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.055
          },
          "permit_type": {
            "type": "string",
            "fill_rate": 0.0587
          },
          "resolved_date": {
            "type": "string",
            "fill_rate": 0.0138
          },
          "work_class": {
            "type": "string",
            "fill_rate": 0.0587
          }
        }
      },
      "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-09-03."
      },
      "LicenceRecord": {
        "type": "object",
        "description": "One licence 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": "Populated in 90% of sampled records.",
            "example": "1211A-750 W BROADWAY",
            "nullable": true
          },
          "business_name": {
            "type": "string",
            "description": "Populated in 94% 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 28% 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-09-02T07:10:40.034428+00:00"
          },
          "first_licensed_at": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "2026-07-26T07:05:29.912695+00:00",
            "nullable": true
          },
          "geocode_failed": {
            "type": "boolean",
            "description": "Populated in 13% 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 60% of sampled records.",
            "example": "2026-10-01",
            "nullable": true
          },
          "last_updated": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "2026-09-01",
            "nullable": true
          },
          "lat": {
            "type": "number",
            "description": "Populated in 40% of sampled records.",
            "example": 49.2630145309513,
            "nullable": true
          },
          "legal_name": {
            "type": "string",
            "description": "Populated in 21% of sampled records.",
            "example": "YS CLINIC INC.",
            "nullable": true
          },
          "licence_number": {
            "type": "string",
            "description": "Populated in 87% of sampled records.",
            "example": "26-258507",
            "nullable": true
          },
          "licence_type": {
            "type": "string",
            "description": "Populated in 87% of sampled records.",
            "example": "Class 1 with liquor service",
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 40% of sampled records.",
            "example": -123.121054317485,
            "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 50% of sampled records.",
            "example": "Fairview",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 89% 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 94% of sampled records.",
            "example": "YS CLINIC",
            "nullable": true
          },
          "opened_on": {
            "type": "string",
            "description": "Populated in 54% of sampled records.",
            "example": "2026-10-01",
            "nullable": true
          },
          "opened_on_precision": {
            "type": "string",
            "description": "Populated in 54% of sampled records.",
            "example": "day",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Populated in 27% of sampled records.",
            "example": "4168991261",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 43% 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 50% of sampled records.",
            "example": true,
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Populated in 97% 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.0333
          },
          "cancel_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "description": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "email": {
            "type": "string",
            "fill_rate": 0.0312
          },
          "is_opening": {
            "type": "boolean",
            "fill_rate": 0.0643
          },
          "licence_year": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "months_permit_to_open": {
            "type": "number",
            "fill_rate": 0.086
          },
          "naics_code": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "num_employees": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "number_of_employees": {
            "type": "number",
            "fill_rate": 0.0333
          },
          "operation_start_date": {
            "type": "string",
            "fill_rate": 0.0333
          },
          "permit_lookback_date": {
            "type": "string",
            "fill_rate": 0.086
          },
          "permit_lookback_type": {
            "type": "string",
            "fill_rate": 0.086
          },
          "permit_lookback_value": {
            "type": "string",
            "fill_rate": 0.0475
          },
          "ward": {
            "type": "string",
            "fill_rate": 0.0318
          },
          "zone": {
            "type": "string",
            "fill_rate": 0.0333
          }
        }
      },
      "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-09-03."
      },
      "DevelopmentPermitRecord": {
        "type": "object",
        "description": "One development_permit record. Measured over 2,193 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": "850 RIDEAU RD SW",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-27"
          },
          "application_subtype": {
            "type": "string",
            "description": "Populated in 76% of sampled records.",
            "example": "Relaxation - Existing - Compliance Follow-Up",
            "nullable": true
          },
          "community": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "East Kildonan-Transcona",
            "nullable": true
          },
          "completed_date": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "2026-08-27",
            "nullable": true
          },
          "decision_date": {
            "type": "string",
            "description": "Populated in 25% of sampled records.",
            "example": "2026-08-27",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Populated in 72% of sampled records.",
            "example": "Relaxation: Accessory Residential Building (carport) - locat\u2026",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-29T06:28:25.651028+00:00"
          },
          "issued_date": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "2026-08-25",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 29% of sampled records.",
            "example": 51.0250633,
            "nullable": true
          },
          "legal_description": {
            "type": "string",
            "description": "Populated in 27% of sampled records.",
            "example": "Plan 2620109 Blk 44 Lot 39A",
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 29% of sampled records.",
            "example": -114.0769724,
            "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": "Rideau Park",
            "nullable": true
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 31% of sampled records.",
            "example": "Springhill Park",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Populated in 88% of sampled records.",
            "example": "850 RIDEAU ROAD SW",
            "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 97% of sampled records.",
            "example": "under_review",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": "J4Y 0K7",
            "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": "DP2024-04632"
          },
          "record_number": {
            "type": "string",
            "description": "Always present.",
            "example": "DP2024-04632",
            "nullable": true
          },
          "roll_number": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "2086503080001",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Always present.",
            "example": "In Advertising",
            "nullable": true
          },
          "status_canonical": {
            "type": "string",
            "description": "Status mapped onto a shared vocabulary. This is what the status_canonical filter matches. Always present.",
            "example": "pending",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 32% of sampled records.",
            "example": "3",
            "nullable": true
          },
          "work_type": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "90 Days",
            "nullable": true
          },
          "zoning": {
            "type": "string",
            "description": "Populated in 18% of sampled records.",
            "example": "RS",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "advertised_date": {
            "type": "string",
            "fill_rate": 0.0378
          },
          "appeal_filed_date": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "appealed_record_number": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "application_url": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "category": {
            "type": "string",
            "fill_rate": 0.0301
          },
          "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.0488
          },
          "fee": {
            "type": "number",
            "fill_rate": 0.0912
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.021
          },
          "hamlet": {
            "type": "string",
            "fill_rate": 0.0264
          },
          "housing_type": {
            "type": "string",
            "fill_rate": 0.0237
          },
          "inspection_outcome": {
            "type": "string",
            "fill_rate": 0.0005
          },
          "land_use_district": {
            "type": "string",
            "fill_rate": 0.0885
          },
          "land_use_district_description": {
            "type": "string",
            "fill_rate": 0.0506
          },
          "latitude": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "legal": {
            "type": "string",
            "fill_rate": 0.0871
          },
          "longitude": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "municipality_name": {
            "type": "string",
            "fill_rate": 0.0894
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "original_decision": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "permit_name": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "permitted_or_discretionary": {
            "type": "string",
            "fill_rate": 0.0506
          },
          "plan_block_lot": {
            "type": "string",
            "fill_rate": 0.0707
          },
          "primary_work_scope": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "property_type": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "proposed_use_code": {
            "type": "string",
            "fill_rate": 0.0506
          },
          "proposed_use_description": {
            "type": "string",
            "fill_rate": 0.0534
          },
          "published_date": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "quadrant": {
            "type": "string",
            "fill_rate": 0.0506
          },
          "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.0907
          },
          "structure_type": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "subcategory": {
            "type": "string",
            "fill_rate": 0.0301
          },
          "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.0036
          },
          "updated_date": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "use": {
            "type": "string",
            "fill_rate": 0.0392
          },
          "variance_required": {
            "type": "string",
            "fill_rate": 0.0912
          },
          "year": {
            "type": "string",
            "fill_rate": 0.0027
          },
          "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-09-03."
      },
      "PlanningApplicationRecord": {
        "type": "object",
        "description": "One planning_application record. Measured over 5,872 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": "4775 RUE DU GOLF QU\u00c9BEC QU\u00c9BEC G2A3Z4",
            "nullable": true
          },
          "application_date": {
            "type": "string",
            "description": "Populated in 94% of sampled records.",
            "example": "2026-08-21",
            "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": "http://app.toronto.ca/AIC/index.do?folderRsn=v6Yf1O7LFxECVOS\u2026",
            "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-08-02",
            "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-29T10:33:09.074996+00:00"
          },
          "folder_type": {
            "type": "string",
            "description": "Populated in 14% of sampled records.",
            "example": "HE",
            "nullable": true
          },
          "lat": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": 46.853341241889495,
            "nullable": true
          },
          "lng": {
            "type": "string",
            "description": "Populated in 17% of sampled records.",
            "example": -71.38705100776578,
            "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": "4775 DU GOLF QUEBEC QUEBEC RUE",
            "nullable": true
          },
          "permit_type": {
            "type": "string",
            "description": "Populated in 26% of sampled records.",
            "example": "P.I.I.A. Modification ou transformation (r\u00e9sidentiel)",
            "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": "20250715-056D"
          },
          "record_number": {
            "type": "string",
            "description": "Populated in 93% of sampled records.",
            "example": "20250715-056D",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Populated in 96% 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 96% of sampled records.",
            "example": "approved",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Populated in 24% of sampled records.",
            "example": "WARD 9",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "additional_scope": {
            "type": "string",
            "fill_rate": 0.0007
          },
          "appealed": {
            "type": "string",
            "fill_rate": 0.002
          },
          "application_number": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "application_scope": {
            "type": "string",
            "fill_rate": 0.0318
          },
          "application_type_fr": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "approval_date": {
            "type": "string",
            "fill_rate": 0.0152
          },
          "approved_date": {
            "type": "string",
            "fill_rate": 0.0109
          },
          "approved_total_units": {
            "type": "integer",
            "fill_rate": 0.0148
          },
          "benchmark_days": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "benchmark_met": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "character_area": {
            "type": "string",
            "fill_rate": 0.0335
          },
          "city_web": {
            "type": "string",
            "fill_rate": 0.017
          },
          "community": {
            "type": "string",
            "fill_rate": 0.0681
          },
          "community_meeting_date": {
            "type": "string",
            "fill_rate": 0.006
          },
          "community_plan": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "condo_number": {
            "type": "string",
            "fill_rate": 0.0005
          },
          "construction_type": {
            "type": "string",
            "fill_rate": 0.0198
          },
          "council_decision_date": {
            "type": "string",
            "fill_rate": 0.0068
          },
          "council_meeting_date": {
            "type": "string",
            "fill_rate": 0.0308
          },
          "council_report_url": {
            "type": "string",
            "fill_rate": 0.0046
          },
          "current_land_use": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "current_zoning": {
            "type": "string",
            "fill_rate": 0.0324
          },
          "days_to_process": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "deemed_complete_date": {
            "type": "string",
            "fill_rate": 0.0513
          },
          "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.0036
          },
          "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.0082
          },
          "folder_description": {
            "type": "string",
            "fill_rate": 0.0681
          },
          "folder_name": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "folder_rsn": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "folderrsn": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "general_location": {
            "type": "string",
            "fill_rate": 0.0218
          },
          "geocode_failed": {
            "type": "boolean",
            "fill_rate": 0.0058
          },
          "gis_link": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "heritage_designation": {
            "type": "string",
            "fill_rate": 0.0014
          },
          "ici_industrial": {
            "type": "number",
            "fill_rate": 0.0027
          },
          "ici_institutional": {
            "type": "number",
            "fill_rate": 0.0002
          },
          "ici_office": {
            "type": "number",
            "fill_rate": 0.0015
          },
          "ici_retail": {
            "type": "number",
            "fill_rate": 0.0068
          },
          "inside_mtsa": {
            "type": "string",
            "fill_rate": 0.0123
          },
          "inspector": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "intended_use": {
            "type": "string",
            "fill_rate": 0.0209
          },
          "issue_date": {
            "type": "string",
            "fill_rate": 0.002
          },
          "issued_date": {
            "type": "string",
            "fill_rate": 0.0128
          },
          "latitude": {
            "type": "string",
            "fill_rate": 0.032
          },
          "layer": {
            "type": "string",
            "fill_rate": 0.0681
          },
          "legal_description": {
            "type": "string",
            "fill_rate": 0.0339
          },
          "longitude": {
            "type": "string",
            "fill_rate": 0.032
          },
          "lots": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "major_use": {
            "type": "string",
            "fill_rate": 0.0221
          },
          "max_storeys": {
            "type": "integer",
            "fill_rate": 0.0043
          },
          "meeting_date": {
            "type": "string",
            "fill_rate": 0.0
          },
          "mtsa_name": {
            "type": "string",
            "fill_rate": 0.0123
          },
          "municipality_name": {
            "type": "string",
            "fill_rate": 0.0327
          },
          "neighbourhood": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "non_residential_gfa_m2": {
            "type": "number",
            "fill_rate": 0.0242
          },
          "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.0162
          },
          "postal": {
            "type": "string",
            "fill_rate": 0.0443
          },
          "postal_code": {
            "type": "string",
            "fill_rate": 0.0003
          },
          "proposed_land_use": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "proposed_total_units": {
            "type": "integer",
            "fill_rate": 0.0293
          },
          "proposed_use": {
            "type": "string",
            "fill_rate": 0.038
          },
          "proposed_use_code": {
            "type": "string",
            "fill_rate": 0.0123
          },
          "proposed_zoning": {
            "type": "string",
            "fill_rate": 0.0324
          },
          "public_meeting_date": {
            "type": "string",
            "fill_rate": 0.0015
          },
          "public_status_description": {
            "type": "string",
            "fill_rate": 0.0269
          },
          "published_date": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "record_type": {
            "type": "string",
            "fill_rate": 0.0341
          },
          "reference_file": {
            "type": "string",
            "fill_rate": 0.0043
          },
          "regional_number": {
            "type": "string",
            "fill_rate": 0.0012
          },
          "registered_residential_lots": {
            "type": "string",
            "fill_rate": 0.0
          },
          "res_apartments": {
            "type": "number",
            "fill_rate": 0.0087
          },
          "res_detached": {
            "type": "number",
            "fill_rate": 0.0007
          },
          "res_other_apartments": {
            "type": "number",
            "fill_rate": 0.0003
          },
          "res_rows": {
            "type": "number",
            "fill_rate": 0.0029
          },
          "res_semis": {
            "type": "number",
            "fill_rate": 0.0012
          },
          "residential_units": {
            "type": "number",
            "fill_rate": 0.0245
          },
          "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.0097
          },
          "weblink": {
            "type": "string",
            "fill_rate": 0.0339
          },
          "year_of_application": {
            "type": "integer",
            "fill_rate": 0.0341
          },
          "year_quarter": {
            "type": "string",
            "fill_rate": 0.0158
          },
          "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-09-03."
      },
      "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": "49.224407",
            "nullable": true
          },
          "lng": {
            "type": "number",
            "description": "Populated in 18% of sampled records.",
            "example": "-123.0999711",
            "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-09-03."
      },
      "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": "Seika 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 45% 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 Industrial",
            "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": "2026",
            "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.0328
          },
          "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.0966
          },
          "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.0405
          },
          "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-09-03."
      },
      "HeritageStatusRecord": {
        "type": "object",
        "description": "One heritage_status record. Measured over 2,673 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": "609 A COLLEGE ST"
          },
          "architectural_description": {
            "type": "string",
            "description": "Populated in 30% of sampled records.",
            "example": "Red brick building with irregular plan and projecting bays.\u2026",
            "nullable": true
          },
          "architectural_style": {
            "type": "string",
            "description": "Populated in 22% of sampled records.",
            "example": "Queen Anne Revival",
            "nullable": true
          },
          "building_name": {
            "type": "string",
            "description": "Populated in 49% of sampled records.",
            "example": "The Duncannon",
            "nullable": true
          },
          "building_name_fr": {
            "type": "string",
            "description": "Populated in 11% of sampled records.",
            "example": "Le Duncannon",
            "nullable": true
          },
          "built_as": {
            "type": "string",
            "description": "Populated in 19% of sampled records.",
            "example": "Detached House",
            "nullable": true
          },
          "bylaw": {
            "type": "string",
            "description": "Populated in 30% of sampled records.",
            "example": "28-2011",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-20T20:58:29.417833+00:00"
          },
          "heritage_meaning": {
            "type": "string",
            "description": "Always present.",
            "example": "Listed on the municipal heritage register but not designated\u2026"
          },
          "heritage_status": {
            "type": "string",
            "description": "Always present.",
            "example": "listed"
          },
          "lat": {
            "type": "number",
            "description": "Always present.",
            "example": 43.654919
          },
          "lng": {
            "type": "number",
            "description": "Always present.",
            "example": -79.414431
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "toronto"
          },
          "neighbourhood": {
            "type": "string",
            "description": "Populated in 27% of sampled records.",
            "example": "Centretown",
            "nullable": true
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Always present.",
            "example": "609 A COLLEGE STREET"
          },
          "permit_required": {
            "type": "boolean",
            "description": "Always present.",
            "example": false
          },
          "province": {
            "type": "string",
            "description": "Populated in 88% of sampled records.",
            "example": "ON",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "1"
          },
          "status": {
            "type": "string",
            "description": "Populated in 72% of sampled records.",
            "example": "Listed",
            "nullable": true
          },
          "year_built": {
            "type": "string",
            "description": "Populated in 37% of sampled records.",
            "example": "c.1869",
            "nullable": true
          }
        },
        "x-sparse-fields": {
          "architect": {
            "type": "string",
            "fill_rate": 0.0872
          },
          "builder": {
            "type": "string",
            "fill_rate": 0.0696
          },
          "city": {
            "type": "string",
            "fill_rate": 0.0748
          },
          "city_reference_url": {
            "type": "string",
            "fill_rate": 0.073
          },
          "cladding": {
            "type": "string",
            "fill_rate": 0.0456
          },
          "current_use": {
            "type": "string",
            "fill_rate": 0.04
          },
          "designation_act": {
            "type": "string",
            "fill_rate": 0.0748
          },
          "designation_part": {
            "type": "string",
            "fill_rate": 0.043
          },
          "district": {
            "type": "string",
            "fill_rate": 0.0412
          },
          "heritage_attributes": {
            "type": "string",
            "fill_rate": 0.0748
          },
          "heritage_comment": {
            "type": "string",
            "fill_rate": 0.0236
          },
          "heritage_detail": {
            "type": "string",
            "fill_rate": 0.0801
          },
          "heritage_theme": {
            "type": "string",
            "fill_rate": 0.0183
          },
          "in_district": {
            "type": "string",
            "fill_rate": 0.0748
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.034
          },
          "part_iv": {
            "type": "string",
            "fill_rate": 0.0872
          },
          "part_v": {
            "type": "string",
            "fill_rate": 0.015
          },
          "postal_code": {
            "type": "string",
            "fill_rate": 0.0707
          },
          "resource_grade": {
            "type": "string",
            "fill_rate": 0.0748
          },
          "roofline": {
            "type": "string",
            "fill_rate": 0.0441
          },
          "second_address": {
            "type": "string",
            "fill_rate": 0.0037
          },
          "storeys": {
            "type": "string",
            "fill_rate": 0.0449
          },
          "year_listed": {
            "type": "string",
            "fill_rate": 0.0127
          }
        }
      },
      "HeritageStatusRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "heritage_status"
          },
          "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/HeritageStatusRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "OccupancyPermitRecord": {
        "type": "object",
        "description": "One occupancy_permit record. Measured over 200 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": "270R CORNERSTONE MR NE"
          },
          "application_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2025-10-10",
            "nullable": true
          },
          "business_name": {
            "type": "string",
            "description": "Always present.",
            "example": "ALI, FOUZIA",
            "nullable": true
          },
          "fetched_at": {
            "type": "string",
            "description": "When Nimbus last ingested this record. Bookkeeping, not source data. Always present.",
            "example": "2026-08-29T07:45:35.833331+00:00"
          },
          "issued_date": {
            "type": "string",
            "description": "Always present.",
            "example": "2026-08-27"
          },
          "lat": {
            "type": "number",
            "description": "Always present.",
            "example": 51.16250161093554
          },
          "lng": {
            "type": "number",
            "description": "Always present.",
            "example": -113.93615456505903
          },
          "municipality": {
            "type": "string",
            "description": "City slug. Call /{entity_type}/coverage for every slug in this dataset. Always present.",
            "example": "calgary"
          },
          "neighbourhood": {
            "type": "string",
            "description": "Always present.",
            "example": "Cornerstone"
          },
          "normalized_address": {
            "type": "string",
            "description": "Address normalized for joining the same property across datasets. Always present.",
            "example": "270R CORNERSTONE MANOR NE"
          },
          "permit_type": {
            "type": "string",
            "description": "Always present.",
            "example": "Tenancy Change Job"
          },
          "pipeline_stage": {
            "type": "string",
            "description": "Always present.",
            "example": "approved",
            "nullable": true
          },
          "proposed_use": {
            "type": "string",
            "description": "Populated in 99% of sampled records.",
            "example": "CHILD CARE SERVICE",
            "nullable": true
          },
          "province": {
            "type": "string",
            "description": "Always present.",
            "example": "AB"
          },
          "quadrant": {
            "type": "string",
            "description": "Always present.",
            "example": "NE",
            "nullable": true
          },
          "record_id": {
            "type": "string",
            "description": "Stable identifier for this record. Pass it to the /{entity_type}/{record_id} endpoint. Always present.",
            "example": "TC2025-03973"
          },
          "record_number": {
            "type": "string",
            "description": "Always present.",
            "example": "TC2025-03973"
          },
          "status": {
            "type": "string",
            "description": "Always present.",
            "example": "Approved",
            "nullable": true
          },
          "status_canonical": {
            "type": "string",
            "description": "Status mapped onto a shared vocabulary. This is what the status_canonical filter matches. Always present.",
            "example": "approved",
            "nullable": true
          },
          "ward": {
            "type": "string",
            "description": "Always present.",
            "example": "5"
          }
        },
        "x-sparse-fields": {
          "building_address": {
            "type": "string",
            "fill_rate": 0.005
          },
          "completion_date": {
            "type": "string",
            "fill_rate": 0.005
          },
          "inspection_date": {
            "type": "string",
            "fill_rate": 0.005
          },
          "normalized_business_name": {
            "type": "string",
            "fill_rate": 0.0
          },
          "sticker_number": {
            "type": "string",
            "fill_rate": 0.005
          }
        }
      },
      "OccupancyPermitRecordPage": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "example": "occupancy_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/OccupancyPermitRecord"
            }
          }
        },
        "description": "Field coverage measured 2026-09-03."
      },
      "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."
          },
          "docs": {
            "type": "string",
            "description": "The documentation page for this product."
          },
          "did_you_mean": {
            "type": "string",
            "description": "The nearest valid value, when the error is a misspelling."
          },
          "valid": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The values the parameter accepts, when the list is short."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.builddata.ca"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}