# Toronto Active Building Permits Scraper (`scrapingmonkey/toronto-building-permits-scraper`) Actor

Scrape Toronto Active Building Permits building permit records. Search and collect record details. Export available fields to Excel, CSV or JSON.

- **URL**: https://apify.com/scrapingmonkey/toronto-building-permits-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

Extract Toronto Active Building Permits building permit records for construction project research, permit monitoring and development analysis. **Toronto Active Building Permits Scraper** collects public information into one complete dataset table, ready to export as Excel, CSV or JSON.

Use search filters or permit numbers, set how many results you need and start the Actor. Search finds matching records; Details retrieves the available information for records you already know.

| At a glance | Details |
|---|---|
| 📥 Input | Search filters or permit numbers |
| 📋 Collection modes | Search permit records; Get permit details |
| 📤 Output | One row per record, or a failed row for an unsuccessful input |
| 📄 Pagination | Automatic, up to `maxResults` while more records are available |
| 🔐 Website login | Not required |
| 💾 Export | One dataset view with all fields; Excel, CSV and JSON |

### What the Toronto Active Building Permits scraper collects 📋

| Mode | What you receive |
|---|---|
| **Search permit records** | Matching building permit records and the fields published in the search results. |
| **Get permit details** | Available public information for each supplied record. The full output example below shows its actual fields. |

The field table and complete examples below show the information this Actor returns. Optional values depend on what the source publishes for the selected record.

Coverage for this Actor:

- Covers the City of Toronto active building permit dataset. Multiple revisions of a permit can be separate records.

### How to scrape Toronto Active Building Permits 🚀

1. Choose **Search permit records** or **Get permit details**.
2. Complete the search filters or permit numbers.
3. Set **Maximum results**. The minimum is 1.
4. Start the Actor and review the saved dataset.
5. Export the results or connect them to your workflow.

#### Search permit records — input example

```json
{
  "mode": "search",
  "maxResults": 10
}
```

#### Get permit details — input example

```json
{
  "mode": "details",
  "recordIds": [
    "06 102984 BLD"
  ],
  "maxResults": 1
}
```

`maxResults` limits all saved rows for each search or supplied record, including a failed row. It does not guarantee that the source has that many matching records. A detail lookup normally returns one record, although sources with multiple revisions or establishments can return more.

### Toronto Active Building Permits data fields and complete output 📦

Each result stays in one row. Every returned field appears in the same dataset view, including list fields and additional published facts. Fields unavailable for a particular record remain empty.

| Field | Included data |
|---|---|
| `result_type` | Selected collection mode. |
| `input` | Submitted search settings, record link or record number. |
| `status` | Success or failed outcome. |
| `error_code` | Failure category for an unsuccessful input. |
| `error_message` | Readable explanation for an unsuccessful input. |
| `id` | Id, when published. |
| `permit_num` | Permit num, when published. |
| `revision_num` | Revision num, when published. |
| `permit_type` | Permit type, when published. |
| `structure_type` | Structure type, when published. |
| `work` | Work, when published. |
| `street_num` | Street num, when published. |
| `street_name` | Street name, when published. |
| `street_type` | Street type, when published. |
| `street_direction` | Street direction, when published. |
| `postal` | Postal, when published. |
| `geo_id` | Geo id, when published. |
| `ward_grid` | Ward grid, when published. |
| `application_date` | Application date, when published. |
| `issued_date` | Issued date, when published. |
| `completed_date` | Completed date, when published. |
| `description` | Description, when published. |
| `current_use` | Current use, when published. |
| `proposed_use` | Proposed use, when published. |
| `dwelling_units_created` | Dwelling units created, when published. |
| `dwelling_units_lost` | Dwelling units lost, when published. |
| `est_const_cost` | Est const cost, when published. |
| `assembly` | Assembly, when published. |
| `institutional` | Institutional, when published. |
| `residential` | Residential, when published. |
| `business_and_personal_services` | Business and personal services, when published. |
| `mercantile` | Mercantile, when published. |
| `industrial` | Industrial, when published. |
| `interior_alterations` | Interior alterations, when published. |
| `demolition` | Demolition, when published. |
| `builder_name` | Builder name, when published. |
| `source_status` | Source status, when published. |
| `record_id` | Stable identifier for the source record. |
| `url` | Public source link when the website provides one. |
| `additional_fields.name` | Names of additional published fields, when present. |
| `additional_fields.value` | Their corresponding values in the same order. |

The complete result below is included for every mode. Text and lists are not shortened. These are examples from validation runs; the source can change.

#### Search permit records — complete JSON result

```json
{
  "result_type": "search",
  "input": "{\"keywords\": null}",
  "id": 1,
  "permit_num": "06 102984 BLD",
  "revision_num": "00",
  "permit_type": "Building Additions/Alterations",
  "structure_type": "Office",
  "work": "Interior Alterations",
  "street_num": "200-236",
  "street_name": "YORKLAND",
  "street_type": "BLVD",
  "street_direction": " ",
  "postal": "M2J",
  "geo_id": "9722547",
  "ward_grid": "N1731",
  "application_date": "2006-01-17",
  "issued_date": "2006-02-16",
  "completed_date": null,
  "description": "Interior alterations to the 7th floor for office use.",
  "current_use": "Vacant",
  "proposed_use": "Office",
  "dwelling_units_created": "0",
  "dwelling_units_lost": "0",
  "est_const_cost": "215,000.00",
  "assembly": 0,
  "institutional": 0,
  "residential": 0,
  "business_and_personal_services": 0,
  "mercantile": 0,
  "industrial": 0,
  "interior_alterations": 152.76,
  "demolition": 0,
  "builder_name": "TRIMAR CONTRACTING CO. INC",
  "source_status": "Inspection",
  "status": "success",
  "record_id": "06 102984 BLD:00",
  "url": null,
  "additional_fields.name": [],
  "additional_fields.value": []
}
```

#### Get permit details — complete JSON result

```json
{
  "result_type": "details",
  "input": "06 102984 BLD",
  "id": 1,
  "permit_num": "06 102984 BLD",
  "revision_num": "00",
  "permit_type": "Building Additions/Alterations",
  "structure_type": "Office",
  "work": "Interior Alterations",
  "street_num": "200-236",
  "street_name": "YORKLAND",
  "street_type": "BLVD",
  "street_direction": " ",
  "postal": "M2J",
  "geo_id": "9722547",
  "ward_grid": "N1731",
  "application_date": "2006-01-17",
  "issued_date": "2006-02-16",
  "completed_date": null,
  "description": "Interior alterations to the 7th floor for office use.",
  "current_use": "Vacant",
  "proposed_use": "Office",
  "dwelling_units_created": "0",
  "dwelling_units_lost": "0",
  "est_const_cost": "215,000.00",
  "assembly": 0,
  "institutional": 0,
  "residential": 0,
  "business_and_personal_services": 0,
  "mercantile": 0,
  "industrial": 0,
  "interior_alterations": 152.76,
  "demolition": 0,
  "builder_name": "TRIMAR CONTRACTING CO. INC",
  "source_status": "Inspection",
  "status": "success",
  "record_id": "06 102984 BLD:00",
  "url": null,
  "additional_fields.name": [],
  "additional_fields.value": []
}
```

### Input settings ⚙️

| Setting | What to enter |
|---|---|
| **What to collect** (`mode`) | Choose the information you need. |
| **Maximum results per search or link** (`maxResults`) | Collect up to this many saved results for each search or record link. Minimum: 1. |
| **Keywords** (`keywords`) | Words to search for in public permit records. Leave empty to browse all available results. |
| **Permit numbers** (`recordIds`) | Enter one permit number per line. Use this field in Details mode. |

### Toronto Active Building Permits scraping use cases 🎯

#### Find construction and development projects

Search the available permit or planning records and review their published work descriptions, locations and dates.

#### Track permit and application changes

Compare repeated exports by record ID or permit number. Keep revisions and application statuses separate when assessing changes.

#### Analyze local development activity

Group records by published location, application type, date or other available fields. Dataset coverage and reporting dates depend on the issuing authority.

### Pricing and saved-result behavior 💰

See the Actor’s **Pricing** tab for the current rate. Under dataset-item pricing:

- Each saved record is one result. Lists and additional details attached to it do not create extra rows.
- A saved `failed` row is also one billable dataset item. This includes invalid inputs, unavailable records, empty searches and exhausted retries.
- At most one failed row is saved per input. Retry attempts do not create additional dataset rows.
- `maxResults` caps all saved rows for the input. Duplicate copies of the same input are processed once.

### Toronto Active Building Permits scraper API and integrations 🔌

Replace `$ACTOR_ID` with the ID shown in the Actor’s API tab and `$APIFY_TOKEN` with your Apify token.

```bash
curl -X POST "https://api.apify.com/v2/acts/$ACTOR_ID/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"search","maxResults":10}'
```

Use Apify schedules for recurring collection, webhooks for completion notifications, and integrations for Google Sheets, Make, Zapier, cloud storage or your own application.

### Reliability and public-data limits ⚠️

Temporary request failures are retried up to five total attempts. Invalid record inputs save a failed row without a website request. Confirmed missing records are not retried unnecessarily. If a later request fails, records already saved remain in the dataset. Normal pagination completion does not add a failed row. Collection stops after two consecutive pages return no new records. Configuration, data-saving or request-scheduling failures stop the run.

Toronto Active Building Permits controls the available records and fields. Search records can contain less information than a full public card. The Actor preserves published values and does not fill missing facts with estimates.

### Frequently asked questions ❓

#### Do I need a Toronto Active Building Permits account?

No. This Actor collects the supported public information without your website login.

#### Which search filters can I use?

The input form supports keywords. Only the displayed filters are supported.

#### How many records can I collect?

Set `maxResults` to the maximum saved rows you want for each input. The minimum is 1. Collection can finish earlier when the source runs out of results or stops returning new records.

#### Why are some fields empty?

The source may not publish a value for that record or mode. Optional information remains empty.

#### Can I export all the fields?

Yes. All returned fields are included in one dataset view. Nested lists remain attached to their parent record.

### Support 🛟

For a reproducible issue, share the run ID, selected mode and a safe public example through the Actor’s support channel. Keep tokens, passwords and proxy credentials private.

# Actor input Schema

## `mode` (type: `string`):

Choose the information you need.

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

Collect up to this many saved results for each search or record link. Minimum: 1.

## `keywords` (type: `string`):

Words to search for in public permit records. Leave empty to browse all available results.

## `recordIds` (type: `array`):

Enter one permit number per line. Use this field in Details mode.

## Actor input object example

```json
{
  "mode": "search",
  "maxResults": 10,
  "recordIds": [
    "06 102984 BLD"
  ]
}
```

# Actor output Schema

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

Results and failed input outcomes, with all returned fields.

# 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 = {
    "mode": "search",
    "maxResults": 10,
    "recordIds": [
        "06 102984 BLD"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/toronto-building-permits-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 = {
    "mode": "search",
    "maxResults": 10,
    "recordIds": ["06 102984 BLD"],
}

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/toronto-building-permits-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 '{
  "mode": "search",
  "maxResults": 10,
  "recordIds": [
    "06 102984 BLD"
  ]
}' |
apify call scrapingmonkey/toronto-building-permits-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/toronto-building-permits-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/7k7ff3TFz6IzPIEbH/builds/U26ru6R1wiy2Q9lub/openapi.json
