# Oregon CCB Contractor Licenses — Official State Open Data (`keeganlabs/or-contractor-licenses`) Actor

Every active Oregon construction contractor license from the CCB official open-data feed (~56k), refreshed daily. Name, responsible manager, type & endorsement, expiration, address, county, phone, bond & insurance. Filter by name, city, county, type, or endorsement.

- **URL**: https://apify.com/keeganlabs/or-contractor-licenses.md
- **Developed by:** [Keegan Labs](https://apify.com/keeganlabs) (community)
- **Categories:** Lead generation, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Oregon Contractor Licenses (CCB) — Official State Open Data

**Every active Oregon construction contractor license, straight from the Construction Contractors Board (CCB) — ~56,000 licensees, refreshed daily.** Contractor name, responsible managing individual, license type & endorsement, expiration date, full mailing address, county, phone — plus each licensee's **surety bond** and **liability-insurance** carrier and dollar amounts.

This actor is a clean, structured client for Oregon's official open-data feed on [data.oregon.gov](https://data.oregon.gov/dataset/CCB-Active-Licenses/g77e-6bhs). No CAPTCHA, no scraping the CCB lookup UI one record at a time — you query the whole state by name, city, county, license type, endorsement, or expiration window and get normalized JSON.

### Why this beats scraping the CCB lookup site

Most "Oregon contractor" data on the market is scraped from the CCB's public license-lookup web form — slow, brittle, and one lookup at a time. This actor reads the **same data the CCB itself publishes as open data**, so you get:

- **Bulk access** — pull all ~56k active licenses or a filtered slice in one run.
- **Official freshness** — the source dataset ("CCB Active Licenses") is regenerated **daily** by the state.
- **Structured fields** — dates normalized to ISO `YYYY-MM-DD`, money as numbers, address broken into components, license-type codes expanded to human-readable labels.
- **Bond & insurance included** — carrier names and coverage amounts come in the same record.

### Who buys this

- **Construction lead-generation & sales** — reach every licensed GC or specialty contractor in a county or city.
- **Materials & tool suppliers / distributors** — build a territory list of active licensed buyers.
- **Surety & insurance underwriters** — see current bond/insurance carriers and amounts, and find licenses expiring soon.
- **Background-check & license-verification services** — confirm a contractor's active CCB status, type, and expiration programmatically.

### What you can filter on

| Input | Description |
|---|---|
| `nameContains` | Substring match on business name **or** responsible manager (case-insensitive) |
| `city` | City (partial match) |
| `county` | Oregon county name (partial match) |
| `licenseType` | Exact type code — `RGC`, `RSC`, `CGC1`, `CGC2`, `CSC1`, `CSC2`, `LBPR`, `RLC`, `OCHI`, `OCLS`, … |
| `endorsement` | Substring on the endorsement description (e.g. `Commercial`, `Residential`) |
| `licenseNumber` | Exact CCB license number lookup |
| `registeredFrom` / `registeredTo` | Original registration date range (ISO) |
| `expiresFrom` / `expiresTo` | License-expiration date range (ISO) — great for renewal-lead lists |
| `maxRecords` | Cap on records returned (default 5,000; full set ~56k) |
| `socrataAppToken` | Optional Socrata token to raise rate limits (not required) |

Filters are applied server-side on the official Socrata API where possible; date ranges are applied client-side against normalized ISO dates (the source stores dates as `MM/DD/YYYY` text).

> Every record in this dataset is an **active** license — the CCB publishes active licenses only, so there is no "status" filter to set.

### Example output record

```json
{
  "licenseNumber": "100215",
  "licenseType": "RGC",
  "licenseTypeLabel": "Residential General Contractor",
  "endorsement": "Residential General Contractor",
  "relatedKey": "",
  "relatedType": "",
  "contractorName": "BRUCE HUIE",
  "responsibleManager": "BRUCE HUIE",
  "exemptStatus": "Exempt",
  "workersCompExempt": true,
  "originalRegistrationDate": "1994-06-20",
  "licenseExpirationDate": "2028-02-06",
  "address": {
    "street": "PO BOX 543",
    "city": "BROOKINGS",
    "state": "OR",
    "zip": "97415",
    "countyName": "Curry",
    "countyCode": "8",
    "country": "United States"
  },
  "phone": "(541) 215-0829",
  "fax": "",
  "bond": {
    "company": "WESTERN SURETY COMPANY",
    "amount": 25000,
    "expirationDate": "2028-02-06"
  },
  "insurance": {
    "company": "SCOTTSDALE INDEMNITY CO",
    "amount": 1000000,
    "expirationDate": "2026-08-25"
  },
  "sourceDataset": "g77e-6bhs",
  "sourceUrl": "https://data.oregon.gov/resource/g77e-6bhs.json"
}
````

#### Output field reference

| Field | Type | Notes |
|---|---|---|
| `licenseNumber` | string | CCB license number |
| `licenseType` | string | Type code (uppercased) |
| `licenseTypeLabel` | string | Human-readable label for the code |
| `endorsement` | string | Endorsement description as published |
| `relatedKey` / `relatedType` | string | Linkage to a related license record, when present |
| `contractorName` | string | Business/contractor name (uppercased) |
| `responsibleManager` | string | Responsible Managing Individual (RMI) |
| `exemptStatus` | string | `Exempt` / `Nonexempt` (workers'-comp exemption) |
| `workersCompExempt` | boolean|null | Derived from `exemptStatus` |
| `originalRegistrationDate` | string|null | ISO `YYYY-MM-DD` |
| `licenseExpirationDate` | string|null | ISO `YYYY-MM-DD` |
| `address` | object | `street`, `city`, `state`, `zip`, `countyName`, `countyCode`, `country` |
| `phone` / `fax` | string | Formatted `(XXX) XXX-XXXX` when 10 digits |
| `bond` | object | `company`, `amount` (number|null), `expirationDate` (ISO|null) |
| `insurance` | object | `company`, `amount` (number|null), `expirationDate` (ISO|null) |
| `sourceDataset` / `sourceUrl` | string | Provenance |

### Pricing

**Pay-per-event** — you pay only for what you pull, no monthly rental:

- **Actor start:** $0.005 per run
- **License record:** $0.003 per normalized record returned

A full-state pull of ~56k active licenses runs about **$168**; a targeted county or renewal-window slice of a few thousand records costs a few dollars. There is no charge for records filtered out.

### Data source & licensing

Data comes from the **Oregon Construction Contractors Board** via the state's official open-data portal, **data.oregon.gov** (dataset `g77e-6bhs`, "CCB Active Licenses"). This is affirmatively-public Oregon open data, served through the standard Socrata SODA API. This actor is an independent client and is not affiliated with or endorsed by the CCB or the State of Oregon.

# Actor input Schema

## `nameContains` (type: `string`):

Free-text substring matched against both the business/contractor name (full\_name) and the Responsible Managing Individual (rmi\_name), case-insensitive.

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

Filter by city (partial match, case-insensitive). Example: Portland, Bend, Salem, Eugene.

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

Filter by Oregon county name (partial match, case-insensitive). Example: Multnomah, Washington, Lane, Deschutes.

## `licenseType` (type: `string`):

CCB license-type code (exact match). Common codes: RGC (Residential General Contractor), RSC (Residential Specialty), CGC1/CGC2 (Commercial General L1/L2), CSC1/CSC2 (Commercial Specialty L1/L2), LBPR (Lead-Based Paint Renovation), RLC (Residential Limited), OCHI (Home Inspector), OCLS (Locksmith).

## `endorsement` (type: `string`):

Free-text substring match on the human-readable endorsement description (endorsement\_text). Example: 'Commercial', 'Residential', 'Home Inspector'.

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

Look up a single CCB license by its exact license number.

## `registeredFrom` (type: `string`):

Only include licenses whose original registration date is on or after this date (ISO YYYY-MM-DD). Applied client-side.

## `registeredTo` (type: `string`):

Only include licenses whose original registration date is on or before this date (ISO YYYY-MM-DD). Applied client-side.

## `expiresFrom` (type: `string`):

Only include licenses whose expiration date is on or after this date (ISO YYYY-MM-DD). Useful to find licenses expiring in a window (renewal leads). Applied client-side.

## `expiresTo` (type: `string`):

Only include licenses whose expiration date is on or before this date (ISO YYYY-MM-DD). Applied client-side.

## `maxRecords` (type: `integer`):

Hard cap on the number of license records to return. The full dataset is ~56,000 active licenses.

## `socrataAppToken` (type: `string`):

Optional data.oregon.gov / Socrata application token to raise API throttling limits. Not required — the API works without one.

## Actor input object example

```json
{
  "nameContains": "Handyman",
  "city": "Portland",
  "county": "Multnomah",
  "licenseType": "RGC",
  "endorsement": "Commercial",
  "licenseNumber": "100215",
  "registeredFrom": "2024-01-01",
  "registeredTo": "2026-12-31",
  "expiresFrom": "2026-07-01",
  "expiresTo": "2026-12-31",
  "maxRecords": 5000
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("keeganlabs/or-contractor-licenses").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("keeganlabs/or-contractor-licenses").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call keeganlabs/or-contractor-licenses --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=keeganlabs/or-contractor-licenses",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Oregon CCB Contractor Licenses — Official State Open Data",
        "description": "Every active Oregon construction contractor license from the CCB official open-data feed (~56k), refreshed daily. Name, responsible manager, type & endorsement, expiration, address, county, phone, bond & insurance. Filter by name, city, county, type, or endorsement.",
        "version": "1.0",
        "x-build-id": "ziVIkwEEKNEM6XjOV"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/keeganlabs~or-contractor-licenses/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-keeganlabs-or-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/keeganlabs~or-contractor-licenses/runs": {
            "post": {
                "operationId": "runs-sync-keeganlabs-or-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/keeganlabs~or-contractor-licenses/run-sync": {
            "post": {
                "operationId": "run-sync-keeganlabs-or-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": {
                    "nameContains": {
                        "title": "Contractor or manager name contains",
                        "type": "string",
                        "description": "Free-text substring matched against both the business/contractor name (full_name) and the Responsible Managing Individual (rmi_name), case-insensitive."
                    },
                    "city": {
                        "title": "City",
                        "type": "string",
                        "description": "Filter by city (partial match, case-insensitive). Example: Portland, Bend, Salem, Eugene."
                    },
                    "county": {
                        "title": "County",
                        "type": "string",
                        "description": "Filter by Oregon county name (partial match, case-insensitive). Example: Multnomah, Washington, Lane, Deschutes."
                    },
                    "licenseType": {
                        "title": "License / endorsement type code",
                        "type": "string",
                        "description": "CCB license-type code (exact match). Common codes: RGC (Residential General Contractor), RSC (Residential Specialty), CGC1/CGC2 (Commercial General L1/L2), CSC1/CSC2 (Commercial Specialty L1/L2), LBPR (Lead-Based Paint Renovation), RLC (Residential Limited), OCHI (Home Inspector), OCLS (Locksmith)."
                    },
                    "endorsement": {
                        "title": "Endorsement text contains",
                        "type": "string",
                        "description": "Free-text substring match on the human-readable endorsement description (endorsement_text). Example: 'Commercial', 'Residential', 'Home Inspector'."
                    },
                    "licenseNumber": {
                        "title": "License number (exact)",
                        "type": "string",
                        "description": "Look up a single CCB license by its exact license number."
                    },
                    "registeredFrom": {
                        "title": "Originally registered on/after (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose original registration date is on or after this date (ISO YYYY-MM-DD). Applied client-side."
                    },
                    "registeredTo": {
                        "title": "Originally registered on/before (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose original registration date is on or before this date (ISO YYYY-MM-DD). Applied client-side."
                    },
                    "expiresFrom": {
                        "title": "License expires on/after (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose expiration date is on or after this date (ISO YYYY-MM-DD). Useful to find licenses expiring in a window (renewal leads). Applied client-side."
                    },
                    "expiresTo": {
                        "title": "License expires on/before (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only include licenses whose expiration date is on or before this date (ISO YYYY-MM-DD). Applied client-side."
                    },
                    "maxRecords": {
                        "title": "Maximum records",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Hard cap on the number of license records to return. The full dataset is ~56,000 active licenses.",
                        "default": 5000
                    },
                    "socrataAppToken": {
                        "title": "Socrata app token (optional)",
                        "type": "string",
                        "description": "Optional data.oregon.gov / Socrata application token to raise API throttling limits. Not required — the API works without one."
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
