{
  "openapi": "3.0.1",
  "info": {
    "title": "DC DDOT TOPS Permits - Construction & Occupancy",
    "description": "Washington DC DDOT right-of-way permits (public open data): 543k construction permits and 983k occupancy permits, 2005-present. Fees broken out by kind, three named parties, ward/ANC/SMD/ZIP, district overlays and pre-computed cycle times. Search by address, owner, permittee, ward or status.",
    "version": "0.0",
    "x-build-id": "cZTebU3r3CzN82duU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~dc-tops-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-dc-tops-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-tops-permits/runs": {
      "post": {
        "operationId": "runs-sync-j0401-dc-tops-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-tops-permits/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-dc-tops-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"
          },
          "corpus": {
            "title": "Permit register",
            "enum": [
              "construction",
              "occupancy"
            ],
            "type": "string",
            "description": "construction = DDOT right-of-way construction permits (543,201). occupancy = occupancy permits for work in the public space (982,887). The two registers carry different fields; see each input's note.",
            "default": "construction"
          },
          "permitNumber": {
            "title": "Permit number",
            "type": "string",
            "description": "Exact permit number, e.g. 'PA444553-R1'. Blank = any.",
            "default": ""
          },
          "trackingNumber": {
            "title": "Tracking number",
            "type": "string",
            "description": "Exact internal tracking number. Blank = any.",
            "default": ""
          },
          "address": {
            "title": "Work location address",
            "type": "string",
            "description": "Work-site address substring, e.g. 'OAK STREET'. Blank = any.",
            "default": ""
          },
          "owner": {
            "title": "Owner name",
            "type": "string",
            "description": "Property owner name substring. Blank = any.",
            "default": ""
          },
          "permittee": {
            "title": "Permittee name",
            "type": "string",
            "description": "Permittee name substring - the party the permit is issued to. Blank = any.",
            "default": ""
          },
          "applicant": {
            "title": "Applicant company",
            "type": "string",
            "description": "Applicant company name substring. 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, e.g. '2A'. Blank = any.",
            "default": ""
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Work-site ZIP, matched as a prefix (e.g. '200' for all 200xx ZIPs). Blank = any.",
            "default": ""
          },
          "quadrant": {
            "title": "Quadrant",
            "enum": [
              "",
              "NW",
              "NE",
              "SW",
              "SE"
            ],
            "type": "string",
            "description": "DC quadrant. Blank = any.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "Exact status as the District records it. Construction corpus uses e.g. 'Issued', 'Permit Expired', 'Cancel/Withdrawn', 'Not Paid'; occupancy corpus uses e.g. 'ISSUED', 'EXPIRED', 'NOTPAID', 'WITHDRAWN', 'REJECTED'. Blank = any.",
            "default": ""
          },
          "permitType": {
            "title": "Permit type",
            "enum": [
              "",
              "New",
              "Replace",
              "Repair"
            ],
            "type": "string",
            "description": "Construction corpus only. The District stores this as a code; it is decoded to New / Replace / Repair here. Blank = any.",
            "default": ""
          },
          "eventType": {
            "title": "Event type",
            "type": "string",
            "description": "Occupancy corpus only, exact value - e.g. 'Block Party', 'Construction Staging Area', 'Banner and Seasonal Display', 'Moving Truck', 'Wedding'. 34 values in all. Blank = any.",
            "default": ""
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "type": "string",
            "description": "District fiscal year, e.g. '2026'. Blank = any.",
            "default": ""
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Earliest issue date (YYYY-MM-DD), e.g. '2025-01-01'. Blank = any.",
            "default": ""
          },
          "issuedTo": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Latest issue date (YYYY-MM-DD), inclusive. Blank = any.",
            "default": ""
          },
          "groupBy": {
            "title": "Group by",
            "enum": [
              "status",
              "permitType",
              "eventType",
              "ward",
              "anc",
              "zip",
              "quadrant",
              "fiscalYear"
            ],
            "type": "string",
            "description": "aggregate mode only. 'permitType' exists on the construction corpus and 'eventType' on the occupancy corpus; asking for the wrong one for your corpus is rejected with a clear error rather than ignored.",
            "default": "ward"
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}