# Ontario Electrical Contractors Scraper - ESA Licence Register (`scrapersdelight/esa-ontario-electrical-contractors-scraper`) Actor

From $4 per 1,000 contractors, no start fee. Ontario's ESA electrical contractor licence register: business phone on 99.7%, cellphone, website, address, coordinates, licence number and status, work types (residential, commercial, HVAC, pole line, high voltage) and penalty or conviction records.

- **URL**: https://apify.com/scrapersdelight/esa-ontario-electrical-contractors-scraper.md
- **Developed by:** [Scrapers Delight](https://apify.com/scrapersdelight) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 per contractor returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## ⚡ Ontario Electrical Contractors Scraper - ESA Licence Register

Every licensed electrical contractor in Ontario, with a **business phone number on 99.7% of them**, pulled from the Electrical Safety Authority's own licence register. You get 10,424 contractors currently licensed to do electrical work for hire. Each row carries the phone, cellphone, website, street address, map coordinates, ESA licence number and status, the types of electrical work they are licensed for, and ESA's penalty and conviction record where one exists.

No API key, no login and no browser. One run reads the whole register in a single download and filters it the way you ask.

### What does this actor do?

The Electrical Safety Authority (ESA) licenses Ontario's electrical contractors and publishes its register through the **Contractor Locator Tool** at `licensing.esasafe.com`. The tool's map loads the whole register as one JSON file. This actor downloads that file, proves it arrived whole, translates ESA's single-letter keys and numeric codes into named fields, and delivers the contractors you filter for.

**Who uses it**

- **Electrical distributors and manufacturer reps** (switchgear, **EV chargers, solar and battery OEMs**) building a territory list of every licensed contractor, with a phone number for each.
- **Contractor-marketing agencies** prospecting Ontario electricians by city and by type of work.
- **Trade-insurance brokers and risk teams** screening for licence status and for ESA penalties and convictions.
- **Home-services platforms and SaaS** verifying that a contractor's ESA licence is valid before listing them.

### 📋 What you get per contractor

| Field | What it is | Fill on the 10,424 licensed contractors |
|---|---|---|
| `name` | Business name as registered with ESA | 100% |
| `phone` | Business phone, exactly as ESA publishes it | **99.68%** |
| `phoneE164` | The same number in E.164 (`+17057166655`) for dialers and CRMs | 99.67% |
| `phoneExtension` | ESA's phone extension field (the profile page prints it as "x125") | 0.31% |
| `cellphone` / `cellphoneE164` | Cellphone, as published and in E.164 | 21.6% |
| `website` | Website, with `https://` added the way ESA's own page adds it | 13.0% |
| `licenceNumber` | ESA licence number (e.g. `7012924`) | 100% |
| `licenceStatus` / `licenceValid` | Valid, Expired, Closed, Suspended, Revoked or Unlicenced, plus a true/false flag | 100% |
| `workTypes` | Named work types: Residential, Commercial & Industrial, Pole Line, HVAC, High Voltage & Sub Station | 99.7% |
| `preAuthEligibleWorkTypes` | Work types ESA marks Pre-Authorization Eligible (pre-authorized service reconnections) | 29.5% |
| `doesResidential`, `doesCommercialIndustrial`, `doesPoleLine`, `doesHvac`, `doesHighVoltageSubstation` | One true/false column per work type, for spreadsheet filtering | 100% |
| `streetAddress` / `addressLine2` | Street address and unit/suite line | 100% / 3.5% |
| `city`, `province`, `country` | City as ESA writes it; province and country normalised to `ON` / `CA` | 100% |
| `latitude` / `longitude` | ESA's own map coordinates | 100% |
| `coordinatesInOntario` | `false` when ESA's published coordinate falls outside Ontario (6 in the whole register) | 100% |
| `hasPenaltyOrConviction` | ESA's flag: "LEC has a Penalty or Conviction" | 100% |
| `convictions` | For flagged contractors: date, description, action type (Penalty / Conviction), outcome, `amountCad`, licence status at the time, location | every flagged contractor |
| `esaAccountId` / `profileUrl` | ESA's account id and the contractor's public ESA profile page | 100% |
| `unlabelledWorkTypeCodes` / `workTypeCodes` | ESA's raw work-type codes; see limits below | - |
| `contactDetailsShownByEsa` | `true` when ESA shows this contractor's contact details (Valid licences only; see below) | 100% |
| `emailInWebsiteField`, `websiteAsPublished` | Raw website string, and the rare e-mail a contractor typed into it | 0.12% / 13.0% |

**E-mail:** ESA's register has **no e-mail field**. Twelve licensed contractors typed an address into their website field. Those come back verbatim in `emailInWebsiteField`, which is 0.12% of rows. Do not buy this list for e-mail. Buy it for the phone number, and use `website` (13%) as your enrichment hook.

### Example row (real, from a live run on 2026-09-23)

```json
{
    "name": "Boyce Electricall Co. Ltd",
    "phone": "705-716-6655",
    "phoneE164": "+17057166655",
    "phoneExtension": null,
    "cellphone": "(705) 716-6655",
    "cellphoneE164": "+17057166655",
    "website": "https://www.electricallco.com",
    "licenceNumber": "7012924",
    "licenceStatus": "Valid",
    "licenceValid": true,
    "hasPenaltyOrConviction": false,
    "workTypes": ["Residential", "Commercial & Industrial"],
    "preAuthEligibleWorkTypes": ["Residential"],
    "doesResidential": true,
    "doesCommercialIndustrial": true,
    "doesPoleLine": false,
    "doesHvac": false,
    "doesHighVoltageSubstation": false,
    "unlabelledWorkTypeCodes": [],
    "workTypeCodes": [-1, 2],
    "contactDetailsShownByEsa": true,
    "streetAddress": "126 Letitia St.",
    "addressLine2": null,
    "city": "Barrie",
    "province": "ON",
    "country": "CA",
    "latitude": 44.36235,
    "longitude": -79.71052,
    "coordinatesInOntario": true,
    "emailInWebsiteField": null,
    "websiteAsPublished": "www.electricallco.com",
    "esaAccountId": "522d20ac-9daa-f011-bbd3-000d3a0c0e5d",
    "profileUrl": "https://licensing.esasafe.com/contractor-locator-tool/profile/?id=522d20ac-9daa-f011-bbd3-000d3a0c0e5d",
    "convictions": null,
    "convictionsStatus": "none-flagged",
    "convictionsError": null,
    "source": "Electrical Safety Authority (Ontario) - Contractor Locator Tool",
    "sourceUrl": "https://licensing.esasafe.com/contractor-locator-tool/",
    "scrapedAt": "2026-09-23T03:43:25.124Z"
}
```

A flagged contractor's `convictions` (PK Electrical Co Inc, licence Valid, from the same run):

```json
[
  { "date": "2024-07-26", "actionType": "Conviction", "outcome": "$24,000 Fine", "amountCad": 24000,
    "description": "Fail to Ensure Work Carried Out in Accordance with Law [OESC]",
    "statusAtTheTime": "Licensed", "location": "Toronto" },
  { "date": "2024-07-26", "actionType": "Conviction", "outcome": "$24,000 Fine", "amountCad": 24000,
    "description": "Permitting or Employing Unlicensed Contractor [Licensing]",
    "statusAtTheTime": "Licensed", "location": "Toronto" }
]
```

### 🔍 Input

| Input | What it does | Default |
|---|---|---|
| `licenceStatuses` | Valid, Expired, Closed, Suspended, Revoked, Unlicenced. Empty = every status. | `["Valid"]`, the same as ESA's locator |
| `workTypes` | Any of `residential`, `commercial-industrial`, `pole-line`, `hvac`, `high-voltage-substation`. Matches if the contractor has ANY of them, as ESA's locator does. | all |
| `preAuthEligibleOnly` | Only contractors Pre-Auth Eligible for at least one work type | off |
| `convictions` | `any`, `only` (flagged contractors only) or `exclude` | `any` |
| `includeConvictionDetails` | Read the penalty/conviction table off each flagged contractor's ESA profile, at no extra charge | on |
| `cities` | Exact city names, case-insensitive (Toronto, Mississauga, Ottawa...). ESA lists Scarborough, Etobicoke and North York separately from Toronto. | all |
| `nameContains` | Words in the business name (solar, EV, generator...) | all |
| `licenceNumbers` | Look up specific ESA licence numbers, for verifying a list | all |
| `requirePhone` / `requireWebsite` | Only contractors with a phone / a usable website | off |
| `maxResults` | Cap on contractors delivered and charged. `0` = no cap. | 80 |
| `tryDirectFirst` | Request the register directly before using the proxy (see Reliability) | on |
| `proxyConfiguration` | Optional proxy (e.g. Apify Residential, Canada), used if a direct request fails | off |

**Common recipes**

- Every licensed contractor in the province: `{"maxResults": 0}` (10,424 rows).
- HVAC-licensed contractors for an equipment rep: `{"workTypes": ["hvac"], "maxResults": 0}` (109 rows).
- Utility and industrial installers: `{"workTypes": ["pole-line", "high-voltage-substation"], "maxResults": 0}` (277 Pole Line, 231 High Voltage).
- GTA residential electricians: `{"cities": ["Toronto", "Mississauga", "Brampton", "Scarborough", "Etobicoke", "North York"], "workTypes": ["residential"], "maxResults": 0}`.
- Every contractor ESA has penalised or convicted, whatever their status now: `{"licenceStatuses": [], "convictions": "only"}` (11 contractors, 25 penalty/conviction rows).
- Verify a supplier list: `{"licenceStatuses": [], "licenceNumbers": ["7012924", "7005096"]}`.

### 💵 Pricing

**$0.004 per contractor delivered ($4 per 1,000), no start fee.** Contractors your filters exclude are never delivered and never charged. Penalty and conviction details cost nothing extra.

| You want | Rows | Cost |
|---|---|---|
| Default run (`{}`) | 80 | $0.32 |
| HVAC-licensed contractors | 109 | $0.44 |
| Every licensed contractor in Ontario | 10,424 | $41.70 |
| The whole register, all statuses | 18,623 | $74.49 |

Delivery is budget-aware. If you set a maximum charge on the run, the actor stops when it is reached, so every row you receive is a row you paid for and none is charged without being delivered.

### ✅ Reliability: how you know the list is complete

- **Checked byte for byte.** ESA declares the file's size (5,412,913 bytes on 2026-09-22). A download that arrives short is rejected even though it says HTTP 200, and is fetched again over a fresh connection.
- **Strict parse.** A body that is cut off does not half-parse into a shorter list. It fails and is fetched again.
- **Floor check.** The register has never held fewer than 18,000 accounts. A parse below that fails the run, with nothing charged, so a partial register can't pass as the whole one.
- **Layout check.** If ESA renames a key the product depends on, the run fails rather than shipping a column of nulls.
- **Transport.** By default the register is downloaded over a direct connection, retried up to 3 times. Measured on the Apify platform, 14 of 14 direct downloads arrived whole in under a second. If you turn on a proxy, the actor tries the direct download first and moves to the proxy if that fails. Every request has a hard time limit, so a stalled connection cannot hang the run.
- **Run summary.** Each run writes `RUN_SUMMARY` to its key-value store. It records bytes received against bytes declared, every download attempt, the register size, the test accounts excluded, how many contractors each filter removed, delivered against charged, and the fill of every field in your rows.

Measured on 2026-09-23: a whole-register run of 18,623 contractors finished in 17 seconds, and a 20-row run in under 5 seconds.

### ⚠️ Data limits

- **Contact details are delivered only for Valid licences.** ESA's map and its profile pages show phone, cellphone, website and street address only when the licence is Valid. We checked this on 37 profiles, 11 of them non-Valid, with no exceptions. Expired, Closed, Suspended, Revoked and Unlicenced contractors come back with their name, licence number and status, work types, city, coordinates and any penalty record, and `contactDetailsShownByEsa: false`. ESA's download file holds contact details for some of those contractors, but ESA does not show them, and neither does this actor.
- **Work-type codes 5, 7, 8 and 9 have no name.** They appear on 182 accounts (1%), but ESA labels them nowhere: its map ignores them and its profile pages leave them out. They come back as numbers in `unlabelledWorkTypeCodes` and are never given a guessed name. Codes 1, 2, 3, 4 and 6 are named from ESA's own map code and filter list, and checked against ESA's profile pages for 37 contractors, every one of which matched. A negative code means the same work type is Pre-Auth Eligible.
- **No e-mail field** (see above).
- **Penalties and convictions are rare.** ESA flags 11 contractors, and 10 of them no longer hold a Valid licence, so to see all of them, clear `licenceStatuses`.
- **ESA's own test accounts are excluded.** There are 3, and they are never charged. A real business whose name merely contains "Test" (for example "Trans Test Ltd") is kept.
- **Six published coordinates fall outside Ontario.** Some are firms based in Quebec or out of province; others look like ESA geocoding errors, for example an Orillia address at latitude 34.55. They are delivered exactly as published and flagged with `coordinatesInOntario: false`.
- **Some published values are placeholders or damaged.** Two phone values are placeholders ("00000" and "9999999999") and come back as `null`, because a placeholder must not count as a filled phone. Five cellphones are cut short in ESA's data, for example "(416) 570-301". They are kept exactly as published but get no E.164 form.
- **It is a snapshot.** ESA regenerates the file continuously; its `Last-Modified` header is recorded in `RUN_SUMMARY`. Schedule the actor to track licence status changes.

### ❓ FAQ

**How many electrical contractors are licensed in Ontario?** On 2026-09-22 ESA's register listed 10,424 contractors with a Valid licence (not counting ESA's test accounts), out of 18,623 accounts of every status.

**Is the phone number the contractor's own?** It is the business phone the licensee registered with ESA, and the one ESA displays on its public locator and profile pages.

**Can I get e-mail addresses?** Not from ESA; the register has no e-mail field. Use the `website` column (13% fill) with an e-mail enrichment actor.

**What does "Pre-Auth Eligible" mean?** ESA's legend reads: "LEC that are Pre-Auth Eligible means they receive pre-authorized service reconnections for certain types of electrical work."

**What is the difference between Expired, Closed, Suspended and Revoked?** They are ESA's own statuses and come back verbatim. Only `Valid` means the contractor may currently do electrical work for hire.

**How do I verify a list of contractors?** Put their licence numbers in `licenceNumbers` and clear `licenceStatuses`. Every number found comes back with its current status.

**Why is Toronto smaller than I expected?** ESA records Scarborough, Etobicoke and North York as separate cities. Add them to `cities`.

**How fresh is the data?** Each run downloads ESA's current file. The `Last-Modified` header on 2026-09-22 was minutes old.

**Does it need a proxy?** No. ESA runs no bot protection on this file, and the proxy is off by default. Turn it on only if direct downloads start failing.

**Can I schedule it?** Yes. A daily run with `licenceStatuses: []` shows licence status changes, new licensees and new penalties.

**What happens if nothing matches my filters?** The run succeeds with an empty dataset and charges nothing.

**Is there a start fee?** No. You pay only per contractor delivered.

### Source

The data comes from ESA's public Contractor Locator Tool (`https://licensing.esasafe.com/contractor-locator-tool/`). The actor delivers only what ESA publishes. It never completes or infers a value.

# Actor input Schema

## `licenceStatuses` (type: `array`):

Which ESA licence statuses to return. Valid = currently licensed to do electrical work for hire in Ontario (10,425 on 2026-09-22). Expired, Closed, Suspended and Revoked are former licensees; Unlicenced follows ESA's own rule (no status or no licence number). Empty = every status.

## `workTypes` (type: `array`):

Keep contractors registered for ANY of these types of electrical work (ESA's own categories, matched the way ESA's locator matches them). Empty = all.

## `preAuthEligibleOnly` (type: `boolean`):

Keep only contractors ESA marks Pre-Auth Eligible for at least one work type - they receive pre-authorized service reconnections for certain electrical work.

## `convictions` (type: `string`):

ESA flags contractors that have a penalty or conviction - 11 real contractors on 2026-09-22, only 1 of them still holding a Valid licence. 'only' returns just those, 'exclude' drops them, 'any' ignores the flag. To see all 11, also clear Licence statuses (empty = every status).

## `includeConvictionDetails` (type: `boolean`):

For each flagged contractor you receive, also read the date, offence, action type, fine, licence status at the time and location from their ESA profile page. One extra request per flagged contractor, no extra charge.

## `cities` (type: `array`):

Exact city names as ESA writes them, e.g. Toronto, Mississauga, Ottawa, London, Hamilton. Case is ignored. Note ESA records Scarborough, Etobicoke and North York separately from Toronto. Empty = all.

## `nameContains` (type: `array`):

Keep contractors whose business name contains ANY of these words, e.g. solar, EV, generator. Case is ignored. Empty = all.

## `licenceNumbers` (type: `array`):

Look up specific ESA licence numbers (e.g. 7012635) - useful for verifying a list of contractors. Empty = all.

## `requirePhone` (type: `boolean`):

Keep only contractors with a business phone or cellphone. 99.7% of licensed contractors have one, so this changes little.

## `requireWebsite` (type: `boolean`):

Keep only contractors with a usable website (13% of licensed contractors publish one).

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

Cap on contractors delivered - and charged. Contractors excluded by your filters are never delivered and never charged. 0 means no cap (all 10,425 licensed contractors, or the whole register if you select every status).

## `tryDirectFirst` (type: `boolean`):

When a proxy is configured below, request the register directly first. Measured on Apify: 14 of 14 direct downloads arrived whole in under a second. Every download is still checked byte for byte and parsed strictly, and any failure falls through to the proxy. Turn off to use only the proxy.

## `proxyConfiguration` (type: `object`):

Off by default: ESA runs no anti-bot and the register downloads whole over a direct connection (measured 14 of 14 on Apify). Turn on Apify Proxy (e.g. Residential, Canada) only if your direct downloads start failing; it is then used after the direct attempt, or alone if you turn 'Try a direct connection first' off. Every copy is checked against ESA's declared byte count.

## Actor input object example

```json
{
  "licenceStatuses": [
    "Valid"
  ],
  "workTypes": [],
  "preAuthEligibleOnly": false,
  "convictions": "any",
  "includeConvictionDetails": true,
  "cities": [],
  "nameContains": [],
  "licenceNumbers": [],
  "requirePhone": false,
  "requireWebsite": false,
  "maxResults": 20,
  "tryDirectFirst": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per ESA contractor account: business name, phone and cellphone (as published and E.164), website, ESA licence number and status, work types and pre-authorization eligibility, full address, coordinates, and any penalty or conviction records.

## `runSummary` (type: `string`):

RUN_SUMMARY: bytes received against ESA's declared size, which transport delivered them, register size, test accounts excluded, how many each filter excluded, delivered and charged counts, and the measured field fill of the rows you received.

# 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 = {
    "licenceStatuses": [
        "Valid"
    ],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapersdelight/esa-ontario-electrical-contractors-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 = {
    "licenceStatuses": ["Valid"],
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapersdelight/esa-ontario-electrical-contractors-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 '{
  "licenceStatuses": [
    "Valid"
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapersdelight/esa-ontario-electrical-contractors-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapersdelight/esa-ontario-electrical-contractors-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/iHuyzD7mL5pb2CTeK/builds/KD5uqvluixAnT92xB/openapi.json
