# Oregon Contractor Directory & Leads Scraper (CCB) (`muhammadafzal/oregon-ccb-contractor-directory-leads-scraper`) Actor

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.

- **URL**: https://apify.com/muhammadafzal/oregon-ccb-contractor-directory-leads-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 ccb contractor license records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Oregon Contractor Directory & Leads Scraper (CCB)

Search public active license records from the Oregon Construction Contractors Board (CCB) for contractor prospecting, license research, and market analysis. The Actor reads the State of Oregon's daily refreshed **CCB Active Licenses** open dataset and returns one row per active license record.

Verified Apify free-plan runs deliver no more than **5 records per run**. Paid and agentic runs can request up to 60,000 records, subject to the user's run charge limit. The Actor also checks the remaining event budget before writing each record.

### What the source provides

The current CCB dataset contains 18 license types, including residential and commercial contractors, developers, locksmiths, home inspectors, and lead-based paint renovation contractors. Available fields include:

- License holder's legal name, CCB license number and type, endorsement, and related license reference.
- Public mailing address, city, state, ZIP, county, work phone, and fax when supplied.
- Responsible managing individual, workers' compensation exemption text, bond and insurance provider/amount/date fields.
- License expiration and original registration dates, plus the dataset's last update time.

The dataset does not supply email addresses, websites, complaint histories, or lead scores. The license holder name may be an individual or a business. A holder can have multiple active license records. This Actor does not enrich or infer missing contact details. For current license or complaint verification, use the CCB search website.

### Input

All provided filters are combined. Leave filters blank to search the full active-license dataset.

| Input | Default | Description |
|---|---:|---|
| `licenseTypes` | All types | One or more CCB codes: CD, CF, CGC1, CGC2, CSC1, CSC2, LBPR, OCHI, OCLS, RD, RGC, RHEPSC, RHISC, RHSC, RLC, RLSC, RRC, RSC. |
| `name` | — | Case-insensitive partial match in license holder's legal name. |
| `licenseNumber` | — | Exact CCB license number. |
| `city` | — | Case-insensitive exact mailing-city match. |
| `county` | — | Case-insensitive exact CCB county match. |
| `state` | — | Two-letter mailing-state filter. Some CCB licensees have out-of-state addresses. |
| `zipCodePrefix` | — | Three to five digit ZIP prefix. |
| `endorsementKeyword` | — | Case-insensitive partial match in the official endorsement description. |
| `workersCompensationExempt` | — | Filter the source text to EXEMPT or NOT\_EXEMPT. This is not a workforce-size indicator. |
| `maxResults` | 100 | Records and variable event spend cap, from 1 to 60,000. Free-plan runs return at most 5. |

Example: find residential general contractors with a Portland mailing address:

```json
{
  "licenseTypes": ["RGC"],
  "city": "PORTLAND",
  "maxResults": 100
}
```

Example: find active CCB records in the 972 ZIP area with a paint endorsement:

```json
{
  "zipCodePrefix": "972",
  "endorsementKeyword": "paint",
  "maxResults": 250
}
```

### Output

Each dataset item represents one source license record. `licenseStatus: "ACTIVE"` means the row appears in CCB's Active Licenses dataset; it is not a legal opinion or a substitute for checking the current CCB record. `SUMMARY` in the default key-value store includes the outcome, requested and effective limits, source timestamp, scanned/delivered counts, event counts, and warnings.

The `overview` dataset view includes holder name, license number/type, endorsement, phone, city/county, ZIP, expiration text, and the source link. Missing source values are returned as `null`.

Example result:

```json
{
  "recordKey": "100310|RGC|habitat for humanity portland metro east",
  "licenseNumber": "100310",
  "licenseTypeCode": "RGC",
  "licenseType": "Residential General Contractor",
  "relatedLicenseNumber": null,
  "relatedLicenseType": null,
  "licenseHolderName": "HABITAT FOR HUMANITY PORTLAND METRO EAST",
  "endorsement": "Residential General Contractor",
  "licenseStatus": "ACTIVE",
  "licenseExpirationDate": "07/30/2028",
  "originalRegistrationDate": "06/22/1994",
  "address": "PO BOX 11527",
  "city": "PORTLAND",
  "state": "OR",
  "zipCode": "97211",
  "county": "Multnomah",
  "phoneNumber": "5032879529",
  "faxNumber": "5032845469",
  "responsibleManagingIndividual": "JESSE GUINN WITHERS",
  "workersCompensationExempt": "Nonexempt",
  "bondCompany": "TRAVELERS CASUALTY & SURETY CO OF AMERICA",
  "bondAmount": "25000",
  "bondExpirationDate": "07/30/2028",
  "insuranceCompany": "ACE AMERICAN INSURANCE CO",
  "insuranceAmount": "1000000",
  "insuranceExpirationDate": "04/01/2027",
  "sourceDatasetId": "g77e-6bhs",
  "sourceUpdatedAt": "2026-09-23T17:21:27.000Z",
  "sourceUrl": "https://data.oregon.gov/d/g77e-6bhs",
  "scrapedAt": "2026-09-23T18:54:03.877Z"
}
```

Run it through the Apify API with an input such as the Portland RGC example:

```bash
curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~oregon-ccb-contractor-directory-leads-scraper/runs?waitForFinish=60" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"licenseTypes":["RGC"],"city":"PORTLAND","maxResults":100}'
```

### Pricing

Pay-per-event pricing uses Apify's automatic default-dataset-item event for each validated record written to the default dataset. The synthetic Actor Start event is charged automatically by Apify; the Actor does not charge either event manually. Apify platform usage is included in these all-in event prices.

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
|---|---:|---:|---:|---:|---:|---:|
| CCB license record | $0.00200 | $0.00195 | $0.00190 | $0.00160 | $0.00160 | $0.00160 |
| Actor Start | $0.00500 | $0.00500 | $0.00500 | $0.00500 | $0.00500 | $0.00500 |

The record tiers apply 0%, 2.5%, 5%, and 20% discounts for FREE, BRONZE, SILVER, and GOLD; PLATINUM and DIAMOND use the GOLD price. At the FREE tier, one record plus the single $0.005 start event costs $0.007; 100 records plus start cost $0.205. The start event is charged once per run at this Actor's 256 MB default under Apify's start-event rules. The Actor's minimum run-charge setting is $0.007, enough for one start event and one record. Platform usage generated by this Actor is covered by the event prices; charges from unrelated Apify products are separate.

### Data source and responsible use

- Official dataset: [CCB Active Licenses](https://data.oregon.gov/d/g77e-6bhs).
- CCB lookup and license verification: [Oregon CCB Contractor Search](https://search.ccb.state.or.us/search/).
- API source: [Oregon Open Data endpoint](https://data.oregon.gov/resource/g77e-6bhs.json).

CCB states that its public license lookup provides license details and complaint history; those details are not included in this dataset-based Actor. Verify licensing and complaint history with CCB before making hiring, compliance, or other time-sensitive decisions. Follow applicable privacy, outreach, anti-spam, and consumer-protection laws when using public business contact information.

### Reliability and limits

The Actor uses the official open-data API, server-side filters, bounded pagination and retries, stable source ordering, per-run deduplication, and schema validation before delivery. The public dataset is updated daily, while individual values and publication timing are controlled by the State of Oregon. A no-match response produces an empty dataset and a truthful `EMPTY` summary with no record events.

# Actor input Schema

## `licenseTypes` (type: `array`):

Select one or more license types. Leave empty to search all active CCB license types.

## `name` (type: `string`):

Case-insensitive partial match in the CCB license holder's legal name. Maximum 100 characters.

## `licenseNumber` (type: `string`):

Exact CCB license number, such as 1441. Maximum 30 characters.

## `city` (type: `string`):

Case-insensitive exact match for the license holder's mailing city.

## `county` (type: `string`):

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` (type: `string`):

Optional two-letter mailing-state filter. CCB licensees may have addresses outside Oregon.

## `zipCodePrefix` (type: `string`):

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` (type: `string`):

Case-insensitive partial match in the official endorsement description, such as residential, specialty, or paint.

## `workersCompensationExempt` (type: `string`):

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` (type: `integer`):

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.

## Actor input object example

```json
{
  "maxResults": 100
}
```

# Actor output Schema

## `results` (type: `string`):

Validated active CCB license records returned by the search.

## `dataset` (type: `string`):

Default dataset in Apify Console.

## `summary` (type: `string`):

Outcome, source freshness, result and event counts, and warnings.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/oregon-ccb-contractor-directory-leads-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxResults": 100 }

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/oregon-ccb-contractor-directory-leads-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxResults": 100
}' |
apify call muhammadafzal/oregon-ccb-contractor-directory-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/oregon-ccb-contractor-directory-leads-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Iz6amLRPztl8cD1JI/builds/ylTBV5SLc6IRai4W2/openapi.json
