{
  "openapi": "3.0.1",
  "info": {
    "title": "DC Building Permits - 2009 to Present",
    "description": "Washington DC building permits (public open data, year layers 2009-2026): type/subtype/category, status, work description, applicant and owner, fees, address with ward/ANC/SMD, zoning and the SSL parcel key that joins to DC property records.",
    "version": "0.0",
    "x-build-id": "ZRpimpfRNs1em3QRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~dc-building-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-dc-building-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/j0401~dc-building-permits/runs": {
      "post": {
        "operationId": "runs-sync-j0401-dc-building-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/j0401~dc-building-permits/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-dc-building-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = permits matching your filters (default). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "year": {
            "title": "Permit year",
            "enum": [
              "2026",
              "2025",
              "2024",
              "2023",
              "2022",
              "2021",
              "2020",
              "2019",
              "2018",
              "2017",
              "2016",
              "2015",
              "2014",
              "2013",
              "2012",
              "2011",
              "2010",
              "2009"
            ],
            "type": "string",
            "description": "The District publishes one layer per calendar year; this selects which one is queried. Default = the current year (live). Query past years one at a time to trace an address across the decade.",
            "default": "2026"
          },
          "permitId": {
            "title": "Permit ID",
            "type": "string",
            "description": "Exact permit number, e.g. 'P2612157'. Blank = any.",
            "default": ""
          },
          "ssl": {
            "title": "SSL (parcel key)",
            "type": "string",
            "description": "Exact Square-Suffix-Lot parcel identifier - the key that joins this register to DC's CAMA property tables. Blank = any.",
            "default": ""
          },
          "address": {
            "title": "Address",
            "type": "string",
            "description": "Full-address substring, e.g. 'MASSACHUSETTS AVE'. Blank = any.",
            "default": ""
          },
          "applicant": {
            "title": "Applicant",
            "type": "string",
            "description": "Applicant name substring. Blank = any.",
            "default": ""
          },
          "owner": {
            "title": "Owner name",
            "type": "string",
            "description": "Owner name substring. Blank = any.",
            "default": ""
          },
          "permitType": {
            "title": "Permit type",
            "type": "string",
            "description": "Exact type, e.g. 'CONSTRUCTION', 'SUPPLEMENTAL', 'POST CARD', 'HOME OCCUPATION'. Blank = any.",
            "default": ""
          },
          "category": {
            "title": "Permit category",
            "type": "string",
            "description": "Exact category name as the District records it. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Exact application status, e.g. 'PERMIT ISSUED', 'COMPLETED', 'EXPIRED', 'PERMIT CANCELED'. Blank = any.",
            "default": ""
          },
          "ward": {
            "title": "Ward",
            "type": "string",
            "description": "DC ward, e.g. '2'. Blank = any.",
            "default": ""
          },
          "anc": {
            "title": "ANC",
            "type": "string",
            "description": "Advisory Neighborhood Commission as the District stores it, e.g. 'ANC 2A' (the prefix is part of the value). Blank = any.",
            "default": ""
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Work-site ZIP, digits only, e.g. '20002'. The District stores no ZIP column here, so this matches the ZIP inside the address string. Blank = any.",
            "default": ""
          },
          "zoning": {
            "title": "Zoning",
            "type": "string",
            "description": "Exact zoning code, e.g. 'R-1B'. Codes were re-written over the years, so an old code (e.g. 'R-4') only matches the layers it was current in. Blank = any.",
            "default": ""
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Earliest issue date (YYYY-MM-DD). Blank = any.",
            "default": ""
          },
          "issuedTo": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Latest issue date (YYYY-MM-DD), inclusive. Blank = any.",
            "default": ""
          },
          "minFee": {
            "title": "Minimum fees paid",
            "type": "number",
            "description": "Only permits with at least this much in fees paid (USD). Blank = any."
          },
          "groupBy": {
            "title": "Group by",
            "enum": [
              "status",
              "permitType",
              "category",
              "ward",
              "anc",
              "district",
              "zoning"
            ],
            "type": "string",
            "description": "aggregate mode only: the dimension to count by, within the selected year.",
            "default": "permitType"
          },
          "maxResults": {
            "title": "Max results",
            "type": "integer",
            "description": "Maximum rows to return in rows mode (1-2000). Default 50.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}