{
  "openapi": "3.0.1",
  "info": {
    "title": "Niagara Falls Building Permits 2015–2023 API",
    "description": "All 8,182 City of Niagara Falls, Ontario completed building permits (2015-01-05 to 2023-12-15): permit number, date, type, work type, status, street and ~1 km location. JSON/CSV, Open Government Licence – Niagara Falls. $0.003 per permit; the full set is about $24.55.",
    "version": "0.1",
    "x-build-id": "XsPyv2KtKcSI0mGCa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loudtzu~niagara-falls-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loudtzu-niagara-falls-permits",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/loudtzu~niagara-falls-permits/runs": {
      "post": {
        "operationId": "runs-sync-loudtzu-niagara-falls-permits",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/loudtzu~niagara-falls-permits/run-sync": {
      "post": {
        "operationId": "run-sync-loudtzu-niagara-falls-permits",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "permitTypes": {
            "title": "Permit types",
            "type": "array",
            "description": "Keep only these permit types.",
            "items": {
              "type": "string",
              "enum": [
                "Residential",
                "Sewer",
                "Commercial",
                "Pools",
                "Government / Institutional",
                "Industrial",
                "Miscellaneous Structures",
                "Plumbing",
                "Residential-Multiple",
                "Agricultural"
              ]
            }
          },
          "workType": {
            "title": "Work type contains",
            "type": "string",
            "description": "e.g. Single Family, Restaurant, Deck."
          },
          "street": {
            "title": "Street contains",
            "type": "string",
            "description": "e.g. LUNDY'S LN."
          },
          "dateFrom": {
            "title": "Permit date from",
            "type": "string",
            "description": "YYYY-MM-DD. Filters on permitDate."
          },
          "dateTo": {
            "title": "Permit date to",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive. Filters on permitDate."
          },
          "yearFrom": {
            "title": "Year from",
            "minimum": 2015,
            "type": "integer",
            "description": "Source year field, e.g. 2018."
          },
          "yearTo": {
            "title": "Year to",
            "minimum": 2015,
            "type": "integer",
            "description": "e.g. 2023."
          },
          "status": {
            "title": "Status contains",
            "type": "string",
            "description": "All current records are Final."
          },
          "issuedFrom": {
            "title": "Permit date from (old name)",
            "type": "string",
            "description": "Older alias kept for existing users; use the date range above."
          },
          "issuedTo": {
            "title": "Permit date to (old name)",
            "type": "string",
            "description": "Older alias kept for existing users; use the date range above."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many records (default 1000, at most 50,000). Ignored when 'Fetch all' is on. Each record is billed.",
            "default": 1000
          },
          "fetchAll": {
            "title": "Fetch all matching records",
            "type": "boolean",
            "description": "Off by default. Turn on to return every matching record, up to 50,000 per run. Each record is billed; split larger pulls by date or filters.",
            "default": false
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "live",
              "changesSince",
              "asOf",
              "history",
              "archiveExport"
            ],
            "type": "string",
            "description": "live = normal query. The other modes read the archive (snapshot Oct 17, 2026 03:08 ADT).",
            "default": "live"
          },
          "since": {
            "title": "Since (changesSince)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Records added, changed or removed on or after this day. Removed records come back as ID + deleted-on only. From the snapshot Oct 17, 2026 03:08 ADT."
          },
          "asOf": {
            "title": "As of (asOf)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "YYYY-MM-DD. Each record as it stood at the end of this day. From the snapshot Oct 17, 2026 03:08 ADT."
          },
          "ids": {
            "title": "Record IDs (history)",
            "type": "array",
            "description": "Up to 1,000 permit numbers. Every archived version, oldest first. From the snapshot Oct 17, 2026 03:08 ADT.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}