{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup & New Contractors — WA OR NY CT TX",
    "description": "Look contractors up by name or license number, or list newly licensed contractor companies, from Washington L&I, Oregon CCB, New York DOL, Connecticut DCP and Texas TDLR open data: status, expiry, bond, insurance, compliance flags. No login.",
    "version": "0.1",
    "x-build-id": "YTgyejUbIVy1o1Qdh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~contractor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-contractor-licenses",
        "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/northbell~contractor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-northbell-contractor-licenses",
        "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/northbell~contractor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-contractor-licenses",
        "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": {
          "lookup": {
            "title": "Look up (company names or license numbers)",
            "type": "array",
            "description": "One per line: part of a company name (`Skanska`), a license number (Washington `ALPHACC744P8`, Oregon CCB `264089`, New York `26-635GA-CR`, Connecticut `HIC.0707510`, Texas TDLR `21388`) or a Washington UBI. When filled, the run looks these up in every chosen state, current and past licenses alike (expired, suspended, out of business), instead of listing new contractors. Leave empty to list newly licensed contractors.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Leave empty for all five. Texas publishes no license dates, so it is used for look-ups only and skipped in the list of new contractors.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "NY",
                "CT",
                "TX"
              ],
              "enumTitles": [
                "Washington (L&I contractor licenses)",
                "Oregon (CCB licenses)",
                "New York (DOL Contractor Registry, public work)",
                "Connecticut (DCP home improvement, new home construction, major, demolition, asbestos and lead contractors)",
                "Texas (TDLR A/C, electrical, sign, appliance and elevator contractors; look-ups only)"
              ]
            }
          },
          "licensedWithinDays": {
            "title": "Licensed within (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "For the list of new contractors: licenses dated at most this many days ago. Oregon and Connecticut: first registration or first issue (new contractors only). Washington: start of the current license period (new and renewed licenses). New York: certificate issue date (new and renewed).",
            "default": 30
          },
          "tradeContains": {
            "title": "Trade or license type contains",
            "type": "array",
            "description": "Keep only licenses whose type or trade contains one of these words (e.g. `electric`, `plumb`, `roof`, `residential`, `commercial`). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "cityContains": {
            "title": "City contains",
            "type": "array",
            "description": "Keep only contractors whose city contains one of these words (e.g. `Seattle`, `Portland`). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "On by default for the list of new contractors, off by default for look-ups (so expired, suspended and out-of-business licenses show up when you check a company). Oregon publishes active licenses only."
          },
          "output": {
            "title": "Output",
            "enum": [
              "all",
              "new"
            ],
            "type": "string",
            "description": "For the list of new contractors on a schedule: with \"only since my last run\", a run returns just the licenses dated after the newest one your last run with the same settings returned. Licenses left out by Max per state are not returned later.",
            "default": "all"
          },
          "maxItemsPerState": {
            "title": "Max contractors per state",
            "minimum": 1,
            "type": "integer",
            "description": "For the list of new contractors, newest first. In the 30 days to 29 Oct 2026 the lists held 882 active company licenses in Washington (new and renewed), 436 newly registered companies in Oregon, 265 newly licensed companies in Connecticut and 1,017 New York certificates.",
            "default": 200
          },
          "maxMatchesPerLookup": {
            "title": "Max matches per look-up",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "For look-ups by name, per state.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}