{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Roster and Status Feed: 8 US States",
    "description": "Contractor and trade licenses from the rosters of WA, OR, NY, CA, MN, ME, NJ and VA, one row per license, normalized: names, address, phone and email where the state publishes them, status, expiry, and bond, insurance and workers' comp where published. Change events between runs.",
    "version": "0.6",
    "x-build-id": "hVULsmO0Fd3LW26Zp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/overlookdata~multistate-contractor-roster/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-overlookdata-multistate-contractor-roster",
        "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/overlookdata~multistate-contractor-roster/runs": {
      "post": {
        "operationId": "runs-sync-overlookdata-multistate-contractor-roster",
        "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/overlookdata~multistate-contractor-roster/run-sync": {
      "post": {
        "operationId": "run-sync-overlookdata-multistate-contractor-roster",
        "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": [
              "roster",
              "status",
              "changes"
            ],
            "type": "string",
            "description": "roster: active licenses with their contact details. status: every license the source publishes, active or not, with a normalized status. changes: events (added, removed, reinstated, status, expiry, bond, insurance and workers' comp changes) since the previous whole-state status or changes run in this account. The first changes run for a state stores a baseline and returns nothing; events start with the second.",
            "default": "roster"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which state rosters to read. Leave empty for all eight. States run one after the other.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "NY",
                "CA",
                "MN",
                "ME",
                "NJ",
                "VA"
              ],
              "enumTitles": [
                "Washington (Department of Labor and Industries)",
                "Oregon (Construction Contractors Board)",
                "New York (Department of Labor, Contractor Registry)",
                "California (Contractors State License Board)",
                "Minnesota (Department of Labor and Industry)",
                "Maine (Professional and Financial Regulation, electricians and plumbers)",
                "New Jersey (Division of Consumer Affairs, home improvement contractors)",
                "Virginia (DPOR, Board for Contractors)"
              ]
            },
            "default": [
              "WA",
              "OR",
              "NY",
              "CA",
              "MN",
              "ME",
              "NJ",
              "VA"
            ]
          },
          "licenseTypes": {
            "title": "License types contain",
            "type": "array",
            "description": "Keep licenses whose license type, type description or trade contains any of these words (case does not matter), for example electric or plumb. In changes mode this narrows the events, not the download.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "licenseLevels": {
            "title": "License levels",
            "type": "array",
            "description": "Keep only these levels. Every WA, OR, NY, CA, NJ and VA license is contractor level; MN and ME also have master, journeyman, trainee (helpers, apprentices, registered unlicensed) and other. Empty means all.",
            "items": {
              "type": "string",
              "enum": [
                "contractor",
                "master",
                "journeyman",
                "trainee",
                "other"
              ],
              "enumTitles": [
                "Contractor",
                "Master",
                "Journeyman",
                "Trainee, helper or apprentice",
                "Other"
              ]
            },
            "default": []
          },
          "holderTypes": {
            "title": "Holder types",
            "type": "array",
            "description": "Keep businesses, individuals or both. Oregon does not say which a license is, so Oregon licenses pass only when this is empty.",
            "items": {
              "type": "string",
              "enum": [
                "business",
                "individual"
              ],
              "enumTitles": [
                "Business",
                "Individual"
              ]
            },
            "default": []
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Keep licenses in these counties (exact name, case does not matter). Only OR, CA and NJ publish a county.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep licenses in these cities (exact name, case does not matter).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP prefixes",
            "type": "array",
            "description": "Keep licenses whose ZIP code starts with any of these, for example 981 or 10467.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "businessNameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Keep licenses whose business, trade (DBA) or person name contains this text (case does not matter)."
          },
          "hasPhone": {
            "title": "Only licenses with a phone",
            "type": "boolean",
            "description": "Keep only licenses that list a phone number. NJ and VA publish none.",
            "default": false
          },
          "hasEmail": {
            "title": "Only licenses with an email",
            "type": "boolean",
            "description": "Keep only licenses that list an email address. NJ and VA fill emails; the MN export has an email column that was empty when measured.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows in all, across states. Leave empty for every row. A limited run is not compared with the source's count and stores no snapshot. Not allowed in changes mode."
          },
          "watchList": {
            "title": "Watch list",
            "type": "array",
            "description": "Status and changes modes: only these licenses, as record keys (WA:lni:ECOSTSC758NN) or state and license number (WA:ECOSTSC758NN). In changes mode the whole state is still read and the snapshot still advances; only the events are narrowed. Ignored in roster mode.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "takedownRecordKeys": {
            "title": "Takedown record keys",
            "type": "array",
            "description": "Record keys to leave out of every row and event, in addition to the list shipped with the actor.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum time between two requests to one host.",
            "default": 250
          },
          "acceptShrinkStates": {
            "title": "Accept a real drop for these states (one run)",
            "type": "array",
            "description": "Changes mode only. When a state's pull holds fewer than 98 out of every 100 licenses in its stored snapshot, changes fails that state, because a short or half-written source file looks the same. If you have checked that the drop is real, name the state here for one run: the removals are emitted, the removed licenses are kept as removed, and the snapshot is replaced. Remove the state again afterwards. An empty pull still fails.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "NY",
                "CA",
                "MN",
                "ME",
                "NJ",
                "VA"
              ]
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}