{
  "openapi": "3.0.1",
  "info": {
    "title": "Seattle Building Permits Scraper",
    "description": "Scrape live building, trade, and land-use permit records from the City of Seattle's official permit portal. Filter by date range, permit type, status, and address.",
    "version": "1.0",
    "x-build-id": "aae0wRxrZqK3SPB9u"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~seattle-building-permits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-seattle-building-permits-scraper",
        "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/crawlerbros~seattle-building-permits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-seattle-building-permits-scraper",
        "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/crawlerbros~seattle-building-permits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-seattle-building-permits-scraper",
        "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": {
          "createDateFrom": {
            "title": "Created date - from",
            "type": "string",
            "description": "Only include permit records created on or after this date (YYYY-MM-DD). Leave blank to default to 2015-01-01."
          },
          "createDateTo": {
            "title": "Created date - to",
            "type": "string",
            "description": "Only include permit records created on or before this date (YYYY-MM-DD). Leave blank to default to today."
          },
          "recordNumber": {
            "title": "Record / permit number",
            "type": "string",
            "description": "Exact or partial permit record number to look up, e.g. `7156800-EL` or `6821791`. Leave blank to browse all permits in the date range."
          },
          "permitType": {
            "title": "Permit / record type",
            "enum": [
              "",
              "DPDPermits/Land Use/Address Request/NA",
              "DPDPermits/General/Amendment/Application Intake",
              "DPDPermits/Trade/Billboard/NA",
              "DPDPermits/Equipment/Billboard/NA",
              "DPDPermits/Building/BlanketTI/NA",
              "DPDPermits/Building/Blanket/NA",
              "DPDPermits/Trade/Boiler-Pressure Vessel/NA",
              "DPDPermits/General/Pre-Application/NA",
              "DPDPermits/Building/Amendment/Construction Intake",
              "DPDPermits/Building/Construction/NA",
              "DPDPermits/General/Amendment/Contractor Disclosure",
              "DPDPermits/Trade/Conveyance/NA",
              "DPDPermits/Trade/Amendment/CY Revision",
              "DPDPermits/Building/Demolition/NA",
              "DPDPermits/Building/Amendment/Incentive Zoning Tracking",
              "DPDPermits/SPUE/Amendment/DWW Director Determination",
              "DPDPermits/SPUE/Amendment/DWW Manager Determination",
              "DPDPermits/SPUE/Amendment/DWW Upload Documents",
              "DPDPermits/Land Use/Early Design Guidance/NA",
              "DPDPermits/General/Amendment/Exemption",
              "DPDPermits/Trade/Electrical OTC/NA",
              "DPDPermits/Trade/Electrical Plan Review/NA",
              "DPDPermits/Building/Amendment/Energy Storage System",
              "DPDPermits/Land Use/EIS/NA",
              "DPDPermits/Trade/Fire Sprinkler/NA",
              "DPDPermits/Building/Grading/NA",
              "DPDPermits/Building/Amendment/Grading Season Extension",
              "DPDPermits/Land Use/Analysis/NA",
              "DPDPermits/Land Use/Interpretation/NA",
              "DPDPermits/Land Use/Master Use Permit/NA",
              "DPDPermits/Trade/Mechanical/NA",
              "DPDPermits/Building/Noise Variance/NA",
              "DPDPermits/Building/Amendment/Phased Intake",
              "DPDPermits/Building/Amendment/Phased Corrections",
              "DPDPermits/Building/Construction/Phased",
              "DPDPermits/General/PreSubCoaching/NA",
              "DPDPermits/Land Use/Public School Departure/NA",
              "DPDPermits/General/Publications/NA",
              "DPDPermits/Trade/Refrigeration/NA",
              "DPDPermits/Trade/Amendment/RF Revision",
              "DPDPermits/General/Amendment/Renewal",
              "DPDPermits/Building/Reroofing/NA",
              "DPDPermits/Building/Amendment/Revision",
              "DPDPermits/Land Use/Amendment/Revision",
              "DPDPermits/Building/Amendment/Shop Drawing",
              "DPDPermits/Trade/Side Sewer/NA",
              "DPDPermits/Trade/Sign-Awning/NA",
              "DPDPermits/Trade/Furnace/NA",
              "DPDPermits/Building/Amendment/Special Inspection",
              "DPDPermits/General/Hazardous Tree/NA",
              "DPDPermits/General/Amendment/Contacts",
              "DPDPermits/General/Amendment/Upload Documents",
              "DPDPermits/Building/Amendment/Waste Diversion",
              "DPDPermits/General/Amendment/Withdrawal"
            ],
            "type": "string",
            "description": "Restrict results to one permit/record type from Seattle's official list.",
            "default": ""
          },
          "recordStatuses": {
            "title": "Record status (filter)",
            "type": "array",
            "description": "Only keep permits whose status matches one of the selected values. Leave empty to include every status.",
            "items": {
              "type": "string",
              "enum": [
                "Additional Info Requested",
                "Application Completed",
                "Approved to Occupy",
                "Awaiting Information",
                "Canceled",
                "Closed",
                "Completed",
                "Corrections Required",
                "Corrections Submitted",
                "Expired",
                "In Process",
                "Initiated",
                "Inspections Completed",
                "Intake Scheduled",
                "Intake Scheduled and Submitted",
                "Issued",
                "Phase Issued",
                "Published",
                "Ready for Intake",
                "Ready for Issuance",
                "Ready for Publication",
                "Released",
                "Reviews Completed",
                "Reviews In Process",
                "Revoked",
                "Scheduled",
                "Scheduled and Submitted",
                "Withdrawn"
              ],
              "enumTitles": [
                "Additional Info Requested",
                "Application Completed",
                "Approved to Occupy",
                "Awaiting Information",
                "Canceled",
                "Closed",
                "Completed",
                "Corrections Required",
                "Corrections Submitted",
                "Expired",
                "In Process",
                "Initiated",
                "Inspections Completed",
                "Intake Scheduled",
                "Intake Scheduled and Submitted",
                "Issued",
                "Phase Issued",
                "Published",
                "Ready for Intake",
                "Ready for Issuance",
                "Ready for Publication",
                "Released",
                "Reviews Completed",
                "Reviews In Process",
                "Revoked",
                "Scheduled",
                "Scheduled and Submitted",
                "Withdrawn"
              ]
            },
            "default": []
          },
          "addressNumberLow": {
            "title": "Street address number - from",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Lower bound of the street number range, e.g. `100` for `100 5TH AVE`."
          },
          "addressNumberHigh": {
            "title": "Street address number - to",
            "minimum": 0,
            "maximum": 999999,
            "type": "integer",
            "description": "Upper bound of the street number range."
          },
          "streetDirectionPrefix": {
            "title": "Street direction prefix",
            "enum": [
              "",
              "E",
              "N",
              "NE",
              "NW",
              "S",
              "SE",
              "SW",
              "W"
            ],
            "type": "string",
            "description": "Directional prefix before the street name, e.g. `N` in `N 45TH ST`.",
            "default": ""
          },
          "streetName": {
            "title": "Street name",
            "type": "string",
            "description": "Street name only, without number/suffix, e.g. `FREMONT` for `8611 FREMONT AVE N`."
          },
          "streetSuffixType": {
            "title": "Street type",
            "enum": [
              "",
              "AL",
              "AVE",
              "BLVD",
              "CIR",
              "CT",
              "DR",
              "ET",
              "HWY",
              "LN",
              "LOOP",
              "MALL",
              "PKWY",
              "PL",
              "PZ",
              "RD",
              "ST",
              "TER",
              "TRL",
              "VIEW",
              "WAY"
            ],
            "type": "string",
            "description": "Street type suffix, e.g. `AVE`, `ST`, `BLVD`.",
            "default": ""
          },
          "streetDirectionSuffix": {
            "title": "Street direction suffix",
            "enum": [
              "",
              "E",
              "N",
              "NE",
              "NW",
              "S",
              "SE",
              "SW",
              "W"
            ],
            "type": "string",
            "description": "Directional suffix after the street type, e.g. `N` in `8611 FREMONT AVE N`.",
            "default": ""
          },
          "fetchDetails": {
            "title": "Fetch permit detail pages (slower)",
            "type": "boolean",
            "description": "When enabled, opens each permit's detail page to also extract contractor name/address and parcel number. Roughly doubles run time.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on the number of permit records to return.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}