# Contractor License Scraper Canada - Quebec RBQ Registry (`truenorthdata/canada-contractor-licenses`) Actor

All active construction contractor licences in Quebec from the official RBQ registry: licence number, company, trade classes, region, phone, bond claims. Updated daily. Lead gen & contractor verification.

- **URL**: https://apify.com/truenorthdata/canada-contractor-licenses.md
- **Developed by:** [Vadim Zabin](https://apify.com/truenorthdata) (community)
- **Categories:** Developer tools, Automation, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 contractor licence records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## Contractor License Scraper Canada - Quebec RBQ Registry

Get **every active construction contractor licence in Quebec** from the official Régie du bâtiment du Québec (RBQ) registry — as clean, structured data. Licence number, company name, trade names, NEQ, address, region, phone, email, licence categories and trade classes, bond amount and restrictions.

Data comes from the official [RBQ open dataset](https://www.donneesquebec.ca/recherche/dataset/licencesactives) (CC-BY 4.0, refreshed **daily**). No scraping of private sites, no legal grey zone.

### Why you'd use it

- **B2B lead generation** — every licensed roofer, plumber, excavator or GC in a region, with phone numbers and emails. Filter by trade class and city.
- **New contractor leads** — incremental mode returns only licences that appeared since your last run: brand-new construction businesses, first on the market.
- **Contractor verification / due diligence** — check licence status, restrictions, trade classes and bond before hiring or insuring.
- **Enrichment for building permits** — pairs with [Building Permits Canada](https://apify.com/truenorthdata/canada-building-permits) by the same author: permits tell you who's building, licences tell you who's licensed for what.

### Input

| Field | Description |
|---|---|
| `provinces` | `["quebec"]` — Ontario & BC on the roadmap |
| `keywords` | Match against company name, trade names, city, trade class labels |
| `licenseClasses` | RBQ codes, e.g. `"1.3"`, `"6.2"`, `"15.5"`. Prefix match supported |
| `regions` | Administrative region / city substring, e.g. `"Monteregie"` |
| `onlyNewSinceLastRun` | Incremental monitoring mode |
| `maxResults` | Cost guard, default 500 |

### Output example

```json
{
    "licenseNumber": "5717-0235-01",
    "holderName": "CONSTRUCTION EXEMPLE INC.",
    "otherNames": ["Toitures Exemple"],
    "neq": "1160000000",
    "address": "123 RUE PRINCIPALE",
    "city": "Montréal",
    "region": "Montréal",
    "postalCode": "H1A 1A1",
    "phone": "514-555-0100",
    "email": "info@exemple.ca",
    "categories": ["Entrepreneur spécialisé"],
    "subcategories": ["Spécialisée 6.2"],
    "subcategoryCodes": ["6.2"],
    "bondAmount": 40000,
    "status": "Active",
    "province": "QC",
    "source": "rbq-open-data",
    "country": "CA"
}
````

### FAQ

**How fresh is the data?** RBQ publishes the full active-licence file daily; each run downloads the latest snapshot.

**Is this legal?** Yes — official open data under Creative Commons CC-BY 4.0 (Quebec).

**What do the licence class codes mean?** RBQ Annex: 1.x general contractor classes, 2.x–17.x specialized trades (e.g. 6.2 wood & plastic, 15.5 plumbing). Full list in RBQ documentation.

**Ontario / BC?** On the roadmap (Ontario HCRA Builder Directory, BC Housing Licensed Residential Builders). Open an issue to vote.

**How do I get contractor leads without coding?** Press *Run* — the default input returns 500 licensed Quebec contractors as a table you can export to Excel or CSV.

### Use with AI agents (MCP)

This Actor works as a tool for AI agents via the [Apify MCP server](https://mcp.apify.com). Claude, Cursor, or any MCP-compatible agent can query Canadian contractor licences on demand — e.g. *"find licensed roofing contractors in Laval with active status"*.

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=truenorthdata/canada-contractor-licenses"
    }
  }
}
```

On first connection you'll sign in to Apify via OAuth. Works with agentic payments (x402/Skyfire) too.

# Actor input Schema

## `provinces` (type: `array`):

Which provincial registries to fetch. Currently Quebec (RBQ); Ontario and BC are on the roadmap.

## `keywords` (type: `array`):

Filter by company name, trade name, city or trade class label (e.g. 'toiture', 'excavation', 'Montreal'). Case-insensitive.

## `licenseClasses` (type: `array`):

RBQ category/subcategory codes, e.g. '1.3' (general buildings), '6.2' (wood & plastic), '15.5' (plumbing). Prefix match: '6' matches 6.1, 6.2...

## `regions` (type: `array`):

Administrative region or city substring, e.g. 'Monteregie', 'Montreal', 'Quebec'.

## `onlyNewSinceLastRun` (type: `boolean`):

Incremental mode: return only licences not seen in previous runs. New licences = brand-new contractor businesses = fresh leads.

## `maxResults` (type: `integer`):

Stop after this many licences (cost guard). 0 = no limit.

## Actor input object example

```json
{
  "provinces": [
    "quebec"
  ],
  "onlyNewSinceLastRun": false,
  "maxResults": 500
}
```

# 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 = {
    "provinces": [
        "quebec"
    ],
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("truenorthdata/canada-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 = {
    "provinces": ["quebec"],
    "maxResults": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("truenorthdata/canada-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 '{
  "provinces": [
    "quebec"
  ],
  "maxResults": 500
}' |
apify call truenorthdata/canada-contractor-licenses --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Contractor License Scraper Canada - Quebec RBQ Registry",
        "description": "All active construction contractor licences in Quebec from the official RBQ registry: licence number, company, trade classes, region, phone, bond claims. Updated daily. Lead gen & contractor verification.",
        "version": "0.1",
        "x-build-id": "QhZEp9BxxAAfOvM4d"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/truenorthdata~canada-contractor-licenses/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-truenorthdata-canada-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/truenorthdata~canada-contractor-licenses/runs": {
            "post": {
                "operationId": "runs-sync-truenorthdata-canada-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/truenorthdata~canada-contractor-licenses/run-sync": {
            "post": {
                "operationId": "run-sync-truenorthdata-canada-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": {
                    "provinces": {
                        "title": "Provinces",
                        "type": "array",
                        "description": "Which provincial registries to fetch. Currently Quebec (RBQ); Ontario and BC are on the roadmap.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "quebec"
                            ],
                            "enumTitles": [
                                "Quebec (RBQ)"
                            ]
                        },
                        "default": [
                            "quebec"
                        ]
                    },
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Filter by company name, trade name, city or trade class label (e.g. 'toiture', 'excavation', 'Montreal'). Case-insensitive.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "licenseClasses": {
                        "title": "Licence classes (RBQ codes)",
                        "type": "array",
                        "description": "RBQ category/subcategory codes, e.g. '1.3' (general buildings), '6.2' (wood & plastic), '15.5' (plumbing). Prefix match: '6' matches 6.1, 6.2...",
                        "items": {
                            "type": "string"
                        }
                    },
                    "regions": {
                        "title": "Regions",
                        "type": "array",
                        "description": "Administrative region or city substring, e.g. 'Monteregie', 'Montreal', 'Quebec'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "onlyNewSinceLastRun": {
                        "title": "Only new since last run",
                        "type": "boolean",
                        "description": "Incremental mode: return only licences not seen in previous runs. New licences = brand-new contractor businesses = fresh leads.",
                        "default": false
                    },
                    "maxResults": {
                        "title": "Max results",
                        "type": "integer",
                        "description": "Stop after this many licences (cost guard). 0 = no limit.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
