{
  "openapi": "3.0.1",
  "info": {
    "title": "US Building Permits & Business Licenses Scraper",
    "description": "Get building permits, contractor and business licenses from 53 official US open-data sources by ZIP code, city or state. One clean row per permit or license. Pay per row plus a start fee.",
    "version": "0.1",
    "x-build-id": "TGUonYmulXDq0E7N4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~us-permits-licenses-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-us-permits-licenses-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/lentic_clockss~us-permits-licenses-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-us-permits-licenses-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/lentic_clockss~us-permits-licenses-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-us-permits-licenses-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": {
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "US ZIP codes, for example 78701. Each ZIP code is one input. Only places covered by the sources return rows; the README lists them.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Cities written as City, ST, for example Austin, TX or New Orleans, LA. Each city is one input.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter state codes such as NY or TX. Each state is one input and reads every source in that state (city, county and statewide), so add Record types to narrow it.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Without a place, each source you pick is one input and returns its newest records. With a place, only these sources are searched there. The two historical sources are read only when picked here.",
            "items": {
              "type": "string",
              "enum": [
                "austin_permits",
                "cambridge_ma_alteration_permits",
                "cambridge_ma_new_construction_permits",
                "chicago_permits",
                "chicago_business_licenses",
                "cincinnati_permits",
                "colorado_professional_licenses",
                "colorado_liquor_licenses",
                "colorado_real_estate_licenses",
                "delaware_business_licenses",
                "delaware_professional_licenses",
                "baton_rouge_permits",
                "honolulu_permits",
                "los_angeles_permits",
                "los_angeles_occupancy_certificates",
                "los_angeles_electrical_permits",
                "los_angeles_mechanical_permits",
                "marin_county_permits",
                "mesa_permits",
                "missouri_alcohol_licenses",
                "montgomery_md_alcohol_licenses",
                "montgomery_md_commercial_permits",
                "montgomery_md_electrical_permits",
                "montgomery_md_home_builder_licenses",
                "montgomery_md_residential_permits",
                "new_jersey_permits",
                "new_orleans_permits",
                "new_orleans_business_licenses",
                "ny_barber_business_licenses",
                "nyc_permits",
                "nyc_bis_legacy_permits",
                "nyc_electrical_permits",
                "ny_contractor_registry",
                "ny_dmv_facility_licenses",
                "ny_elevator_contractor_licenses",
                "ny_mold_contractor_licenses",
                "ny_notary_commissions",
                "ny_real_estate_licenses",
                "ny_appraiser_licenses",
                "ny_liquor_licenses",
                "ny_liquor_applications",
                "oregon_contractor_licenses",
                "oregon_cannabis_licenses",
                "oregon_liquor_licenses",
                "prince_georges_md_permits",
                "san_francisco_permits",
                "seattle_permits",
                "seattle_business_licenses",
                "texas_sales_tax_permits",
                "texas_alcohol_licenses",
                "texas_insurance_agent_licenses",
                "wa_cpa_licenses",
                "wa_contractor_licenses"
              ],
              "enumTitles": [
                "Austin, TX building permits",
                "Cambridge, MA addition and alteration permits",
                "Cambridge, MA new construction permits",
                "Chicago, IL building permits",
                "Chicago, IL business licenses",
                "Cincinnati, OH building permits",
                "Colorado DORA professional licenses",
                "Colorado liquor licenses",
                "Colorado real estate, mortgage and appraiser licenses",
                "Delaware business licenses",
                "Delaware professional and occupational licenses",
                "East Baton Rouge Parish, LA building permits",
                "Honolulu, HI building permits (2005 to June 2025)",
                "Los Angeles, CA building permits",
                "Los Angeles, CA certificates of occupancy",
                "Los Angeles, CA electrical permits",
                "Los Angeles, CA mechanical permits",
                "Marin County, CA building permits",
                "Mesa, AZ building permits",
                "Missouri alcohol licenses",
                "Montgomery County, MD alcohol licenses",
                "Montgomery County, MD commercial building permits",
                "Montgomery County, MD electrical permits",
                "Montgomery County, MD new home builder licenses",
                "Montgomery County, MD residential building permits",
                "New Jersey construction permits",
                "New Orleans, LA building permits",
                "New Orleans, LA occupational business licenses",
                "New York barber and appearance enhancement business licenses",
                "New York City building permits (DOB NOW)",
                "New York City DOB BIS permit issuance (legacy)",
                "New York City electrical permits (DOB NOW)",
                "New York contractor registry certificates",
                "New York DMV licensed facilities",
                "New York elevator contractor licenses",
                "New York mold contractor licenses",
                "New York notary public commissions",
                "New York real estate agent licenses",
                "New York real estate appraiser licenses",
                "New York SLA liquor licenses",
                "New York SLA pending liquor license applications",
                "Oregon CCB contractor licenses",
                "Oregon OLCC cannabis licenses",
                "Oregon OLCC liquor licenses",
                "Prince George's County, MD permits",
                "San Francisco, CA building permits",
                "Seattle, WA building permits",
                "Seattle, WA business license tax certificates",
                "Texas sales tax permits",
                "Texas TABC alcohol licenses",
                "Texas TDI insurance agent and adjuster licenses",
                "Washington CPA licenses",
                "Washington L&I contractor licenses"
              ]
            }
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "Kinds of records to return. Empty means all kinds except professional licenses, which are returned only when selected here or when you pick a professional license source.",
            "items": {
              "type": "string",
              "enum": [
                "building_permit",
                "electrical_permit",
                "mechanical_permit",
                "occupancy_certificate",
                "business_license",
                "contractor_license",
                "alcohol_license",
                "cannabis_license",
                "professional_license",
                "sales_tax_permit",
                "facility_license"
              ],
              "enumTitles": [
                "Building permits",
                "Electrical permits",
                "Mechanical permits",
                "Certificates of occupancy",
                "Business licenses",
                "Contractor licenses",
                "Alcohol licenses",
                "Cannabis licenses",
                "Professional licenses",
                "Sales tax permits",
                "Facility licenses"
              ]
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Words to find anywhere in the record, for example solar or restaurant. Keyword searches are slower on large sources; add a date range to keep them fast."
          },
          "dateFrom": {
            "title": "Records from",
            "type": "string",
            "description": "Only records dated on or after this day: a date (YYYY-MM-DD) or a window such as 30 days, counted back from today. Permits use the issue date; licenses use the date each source keeps. Sources without a record date are skipped when a date is set."
          },
          "dateTo": {
            "title": "Records until",
            "type": "string",
            "description": "Only records dated on or before this day: a date (YYYY-MM-DD) or a window such as 7 days, counted back from today."
          },
          "permitTypes": {
            "title": "Permit types",
            "type": "array",
            "description": "Kinds of work, for permits only. Each permit gets one kind from its source's own wording.",
            "items": {
              "type": "string",
              "enum": [
                "roofing",
                "hvac",
                "electrical",
                "plumbing",
                "solar",
                "new_construction",
                "renovation",
                "demolition",
                "mechanical",
                "fire_protection",
                "other"
              ],
              "enumTitles": [
                "Roofing",
                "Heating and air conditioning",
                "Electrical",
                "Plumbing",
                "Solar",
                "New construction",
                "Renovation and alteration",
                "Demolition",
                "Mechanical",
                "Fire protection",
                "Other work"
              ]
            }
          },
          "permitStatuses": {
            "title": "Permit statuses",
            "type": "array",
            "description": "Permit statuses to keep, for permits only.",
            "items": {
              "type": "string",
              "enum": [
                "issued",
                "pending",
                "expired",
                "revoked",
                "completed",
                "cancelled"
              ],
              "enumTitles": [
                "Issued",
                "Pending",
                "Expired",
                "Revoked",
                "Completed",
                "Cancelled"
              ]
            }
          },
          "minEstimatedCost": {
            "title": "Minimum estimated cost (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with a stated job value of at least this many US dollars. Permits without a job value are left out when this is set."
          },
          "maxEstimatedCost": {
            "title": "Maximum estimated cost (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only permits with a stated job value of at most this many US dollars."
          },
          "licenseStatuses": {
            "title": "License statuses",
            "type": "array",
            "description": "License statuses to keep, for licenses only.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "suspended",
                "expired",
                "pending"
              ],
              "enumTitles": [
                "Active",
                "Inactive",
                "Suspended",
                "Expired",
                "Pending"
              ]
            }
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Newest records first or oldest first, by record date. Records of sources without a record date come after the dated ones.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Max results per input",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most rows for each input: each ZIP code, city or state, or each source when no place is given. Leave empty for 70; larger numbers are collected in parts of 70. You pay only for rows delivered."
          },
          "includeRawFields": {
            "title": "Include the source record",
            "type": "boolean",
            "description": "Add the record exactly as the source published it, under raw (up to 64 KiB per row).",
            "default": false
          },
          "cursor": {
            "title": "Continue from cursor",
            "type": "string",
            "description": "Continue a run that stopped at its time limit or was aborted gracefully: paste RUN_SUMMARY.nextCursor from that run and keep the rest of the input the same. A cursor works once and is valid for 6 hours. Usually leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}