{
  "openapi": "3.0.1",
  "info": {
    "title": "Oregon Contractor Directory & Leads Scraper (CCB)",
    "description": "Search Oregon CCB active licenses by type, holder name, license number, city, county, state, ZIP, endorsement, or workers’ compensation exemption. Export official license, mailing, phone, bond, and insurance fields. Free-plan runs return at most 5 records.",
    "version": "1.0",
    "x-build-id": "ylTBV5SLc6IRai4W2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~oregon-ccb-contractor-directory-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-oregon-ccb-contractor-directory-leads-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/muhammadafzal~oregon-ccb-contractor-directory-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-oregon-ccb-contractor-directory-leads-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/muhammadafzal~oregon-ccb-contractor-directory-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-oregon-ccb-contractor-directory-leads-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": {
          "licenseTypes": {
            "title": "CCB license types",
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more license types. Leave empty to search all active CCB license types.",
            "items": {
              "type": "string",
              "enum": [
                "CD",
                "CF",
                "CGC1",
                "CGC2",
                "CSC1",
                "CSC2",
                "LBPR",
                "OCHI",
                "OCLS",
                "RD",
                "RGC",
                "RHEPSC",
                "RHISC",
                "RHSC",
                "RLC",
                "RLSC",
                "RRC",
                "RSC"
              ],
              "enumTitles": [
                "Commercial Developer",
                "Construction Flagging Contractor",
                "Commercial General Contractor Level 1",
                "Commercial General Contractor Level 2",
                "Commercial Specialty Contractor Level 1",
                "Commercial Specialty Contractor Level 2",
                "Lead Based Paint Renovation Contractor",
                "Oregon Certified Home Inspector",
                "Oregon Certified Locksmith",
                "Residential Developer",
                "Residential General Contractor",
                "Home Energy Performance Score Contractor",
                "Home Inspector Services Contractor",
                "Home Services Contractor",
                "Residential Limited Contractor",
                "Residential Locksmith Services Contractor",
                "Residential Restoration Contractor",
                "Residential Specialty Contractor"
              ]
            }
          },
          "name": {
            "title": "License holder name",
            "maxLength": 100,
            "type": "string",
            "description": "Case-insensitive partial match in the CCB license holder's legal name. Maximum 100 characters."
          },
          "licenseNumber": {
            "title": "CCB license number",
            "maxLength": 30,
            "type": "string",
            "description": "Exact CCB license number, such as 1441. Maximum 30 characters."
          },
          "city": {
            "title": "Mailing city",
            "maxLength": 80,
            "type": "string",
            "description": "Case-insensitive exact match for the license holder's mailing city."
          },
          "county": {
            "title": "Oregon county",
            "maxLength": 60,
            "type": "string",
            "description": "Case-insensitive exact match for the CCB county field. Use this for Oregon county prospecting; out-of-state mailing addresses may have no Oregon county."
          },
          "state": {
            "title": "Mailing state",
            "pattern": "^[A-Za-z]{2}$",
            "maxLength": 2,
            "type": "string",
            "description": "Optional two-letter mailing-state filter. CCB licensees may have addresses outside Oregon."
          },
          "zipCodePrefix": {
            "title": "ZIP code prefix",
            "pattern": "^[0-9]{3,5}$",
            "minLength": 3,
            "maxLength": 5,
            "type": "string",
            "description": "Match the beginning of a mailing ZIP code, from 3 to 5 digits. For example, 972 matches Portland-area ZIP codes beginning with 972."
          },
          "endorsementKeyword": {
            "title": "Endorsement keyword",
            "maxLength": 100,
            "type": "string",
            "description": "Case-insensitive partial match in the official endorsement description, such as residential, specialty, or paint."
          },
          "workersCompensationExempt": {
            "title": "Workers' compensation exemption",
            "enum": [
              "EXEMPT",
              "NOT_EXEMPT"
            ],
            "type": "string",
            "description": "Optional source-text filter. Choose EXEMPT or NOT_EXEMPT, or leave empty for both. This source field is not a measure of workforce size."
          },
          "maxResults": {
            "title": "Maximum results (free users: max 5)",
            "minimum": 1,
            "maximum": 60000,
            "type": "integer",
            "description": "Caps delivered license records and event charges. Default 100; minimum 1 and maximum 60,000 per run. Verified Apify free-plan runs are limited to 5 delivered records; paid and agentic runs can use the requested limit.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}