{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor Licenses Scraper: Insurance and Bonds",
    "description": "Scrape contractor licenses from the registries of Washington, Oregon and New York in one format. Get license type, status, dates, address, insurance and bond company and amount, and expiration alerts. Find contractors whose coverage expires soon. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "0GQoRZZENlaOl7WjB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~us-contractor-licenses-bonds-insurance-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-us-contractor-licenses-bonds-insurance-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/parselab~us-contractor-licenses-bonds-insurance-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-us-contractor-licenses-bonds-insurance-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/parselab~us-contractor-licenses-bonds-insurance-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-us-contractor-licenses-bonds-insurance-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "licenses",
              "summary"
            ],
            "type": "string",
            "description": "Licenses returns one row per licensed or registered contractor. Summary counts licenses by type, status, city, county, insurer, bond company or month.",
            "default": "licenses"
          },
          "states": {
            "title": "Sources",
            "type": "array",
            "description": "wa (Washington contractors with insurance and bond), or (Oregon contractors with insurance and bond), nyreg (New York public works contractor registry), nymold (New York mold contractors), nyelevator (New York elevator contractors). Leave empty for Washington, Oregon and the New York registry.",
            "items": {
              "type": "string",
              "enum": [
                "wa",
                "or",
                "nyreg",
                "nymold",
                "nyelevator"
              ]
            }
          },
          "nameContains": {
            "title": "Business name contains",
            "type": "array",
            "description": "Part of the business name, for example roofing, electric, builders or paving. Each word is an alternative.",
            "items": {
              "type": "string"
            }
          },
          "licenseTypes": {
            "title": "License types",
            "type": "array",
            "description": "Part of the license type or specialty, for example general, electrical, plumbing, residential or mold.",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Status",
            "type": "array",
            "description": "Part of the status as the state writes it, for example active, expired or suspended.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Part of the city name of the business address.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Oregon only. Part of the county name.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "ZIP codes or their first digits.",
            "items": {
              "type": "string"
            }
          },
          "issuedAfter": {
            "title": "Issued after",
            "type": "string",
            "description": "Keep licenses issued on or after this date, in the form 2026-01-01."
          },
          "issuedBefore": {
            "title": "Issued before",
            "type": "string",
            "description": "Keep licenses issued on or before this date."
          },
          "expiringWithinDays": {
            "title": "License expires within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep licenses that expire in the next number of days, for example 60. Useful for renewal services."
          },
          "insuranceExpiringWithinDays": {
            "title": "Insurance expires within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Washington and Oregon. Keep contractors whose liability insurance expires in the next number of days. Useful for insurance brokers."
          },
          "bondExpiringWithinDays": {
            "title": "Bond expires within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Washington and Oregon. Keep contractors whose bond expires in the next number of days. Useful for surety agents. Bonds that last until canceled are skipped."
          },
          "minInsuranceAmount": {
            "title": "Minimum insurance amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Washington and Oregon."
          },
          "minBondAmount": {
            "title": "Minimum bond amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Washington and Oregon."
          },
          "missingCoverageOnly": {
            "title": "Only with missing or expired coverage",
            "type": "boolean",
            "description": "Washington and Oregon. Keep contractors with no insurance or bond on record, or with one that already expired.",
            "default": false
          },
          "outOfStateOnly": {
            "title": "Only contractors based in another state",
            "type": "boolean",
            "description": "Keep businesses whose address is outside the state of the license.",
            "default": false
          },
          "includeCoverage": {
            "title": "Add insurance and bond (Washington)",
            "type": "boolean",
            "description": "Washington keeps insurance and bonds in other lists. This adds them to each row. Turn it off for faster runs.",
            "default": true
          },
          "groupBy": {
            "title": "Summary grouped by",
            "enum": [
              "licenseType",
              "status",
              "city",
              "county",
              "state",
              "insurer",
              "bondCompany",
              "issuedMonth",
              "expiryMonth",
              "businessType"
            ],
            "type": "string",
            "description": "Summary mode. What to count.",
            "default": "licenseType"
          },
          "sampleSize": {
            "title": "Licenses read per source (summary)",
            "minimum": 500,
            "maximum": 300000,
            "type": "integer",
            "description": "Summary mode. How many licenses to read in each source before counting.",
            "default": 20000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}