# Halifax Building Permits – Open Data API (`loudtzu/halifax-permits`) Actor

Halifax, NS building permits from official open data (~19,200 source rows, merged to one row per permit): type, work type, status, issue date, community and more. One clean row per permit, JSON/CSV. Open Government Licence – Halifax v1.0. No addresses. $0.003 per permit, no start fee.

- **URL**: https://apify.com/loudtzu/halifax-permits.md
- **Developed by:** [Travis M](https://apify.com/loudtzu) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 permits

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

## Halifax Building Permits – Open Data API

**Building Permits for Halifax Regional Municipality (HRM) only**, from the city's official open dataset (~19,200 source rows, merged to one row per permit), via the ArcGIS REST API — no website scraping. Rows repeated per parcel/occupancy are merged into one record per permit.

- **Key fields:** `permitNumber`, `permitType`, `workType`, `status`, `issuedDate`, `community`, `district`, `estimatedValueCad`, `netNewUnits`, `storeys`.
- **Licence:** Open Government Licence – Halifax v1.0; every record carries the required credit and licence link.
- **Output:** structured JSON, or CSV / Excel from the Apify dataset. Filters run at the source (type, status, issued dates and more), 100 permits by default, up to 50,000 per run with **Fetch all** on.
- **Privacy:** street addresses, parcel IDs and free-text descriptions removed; no names or coordinates are exported.
- **Cost control:** each permit is a billable result (about $0.003). The default is 100 permits per run. Turn on **Fetch all** to get up to 50,000, and set a **maximum cost per run** in Apify's run options as a safety limit.

**Why not build it yourself?** No ArcGIS/Socrata paging, field mapping, date normalising or de-duplication to write and maintain. You get one tidy row per permit with consistent field names and ISO dates.

**Price:** $0.003 per result (three-tenths of a cent; 1,000 results = $3.00), no start fee. You pay only for permits returned.

### What it does

This Actor reads **building permits** from Halifax Regional Municipality's official open dataset ([PPL\&C Building Permits](https://data-hrm.hub.arcgis.com/), about 19,200 source rows) through the ArcGIS REST query API. It does **not** scrape the catalogue website.

Each source row can repeat the same permit once per parcel or occupancy. The Actor merges those into one record per permit, with occupancy types collected into a list.

#### Free open data vs. this Actor

The full dataset is free on the HRM open-data hub. Use that for a one-off download. This Actor is for:

- **Filters at the source:** work type, status, issued dates, minimum project value, community, district, keyword
- **Deduplicated permits:** one row per permit, not one row per occupancy
- **Privacy trimming:** no street addresses, no free-text descriptions, no parcel IDs
- **Scheduled runs** and Apify API / Sheets / Make / Zapier exports

### Who it's for

- Contractors and suppliers (windows, HVAC, roofing, landscaping) watching new work in Halifax
- Developers and real-estate analysts tracking construction and net new units
- Housing researchers counting permits and units by community or district

### What data you get

| Field | Type | Meaning |
|---|---|---|
| `permitNumber` | string | HRM permit number |
| `permitType` | string or null | e.g. Residential, Mixed Use & Commercial |
| `workType` | string or null | New Building, Addition, Renovation |
| `status` | string or null | e.g. Issued, Completed, In Review |
| `submittedDate` | date or null | YYYY-MM-DD |
| `issuedDate` | date or null | YYYY-MM-DD |
| `completedDate` | date or null | YYYY-MM-DD |
| `expiryDate` | date or null | YYYY-MM-DD |
| `community` | string or null | e.g. HALIFAX, DARTMOUTH, BEDFORD |
| `district` | string or null | Council district |
| `estimatedValueCad` | number or null | Estimated project value in CAD |
| `structureType` | string or null | Structure category |
| `occupancyTypes` | array | Occupancy labels merged from duplicate rows |
| `existingUnits` | integer or null | Units before the work |
| `totalEndUnits` | integer or null | Units after the work |
| `netNewUnits` | integer or null | Net new units |
| `storeys` | integer or null | Storeys |
| `footprintArea` | number or null | Footprint area |
| `buildingHeight` | number or null | Building height |
| `source` | string | Dataset credit link |
| `licence` | string | OGL—Halifax attribution |

#### Sample output (real local run, New Building, issued since 2025-01-01, value ≥ $1M)

| issuedDate | permitNumber | workType | community | estimatedValueCad | netNewUnits |
|---|---|---|---|---|---|
| 2026-10-13 | BPCOM-2024-06233 | New Building | HALIFAX | 43,800,000 | 439 |

JSON example:

```json
{
  "permitNumber": "BPCOM-2024-06233",
  "permitType": "Mixed Use & Commercial Building Permit",
  "workType": "New Building",
  "status": "Issued",
  "issuedDate": "2026-10-13",
  "community": "HALIFAX",
  "district": "District 07",
  "estimatedValueCad": 43800000,
  "occupancyTypes": ["Retail Use", "Clinic", "Residential Use", "Parking Structure"],
  "totalEndUnits": 439,
  "netNewUnits": 439,
  "storeys": 30,
  "source": "https://data-hrm.hub.arcgis.com/ (PPL&C Building Permits)",
  "licence": "Contains information licenced under the Open Government Licence—Halifax (https://data-hrm.hub.arcgis.com/pages/open-data-licence)"
}
```

### How to use it

1. Open the Actor and click **Start**.
2. Optionally set filters (work type, dates, min value, community, keyword).
3. Set **Max permits** (default 100, up to 50,000), or turn on **Fetch all** (all ~16,800 Halifax permits ≈ $50). Set a maximum cost per run in Apify if you want a hard spending limit.
4. Run, then open the **Permits** table or export JSON / CSV / Excel.

### Input options

| Option | Key | Description |
|---|---|---|
| Permit type contains | `permitType` | e.g. Residential, Mixed Use & Commercial |
| Work type | `workType` | `any`, `New Building`, `Addition`, or `Renovation` |
| Status contains | `status` | e.g. Issued, Completed |
| Date from | `dateFrom` | YYYY-MM-DD, issued on/after (older name `issuedFrom` still works) |
| Date to | `dateTo` | YYYY-MM-DD, issued on/before (older name `issuedTo` still works) |
| Minimum estimated project value (CAD) | `minValue` | Whole number, 0 or more |
| Maximum estimated project value (CAD) | `maxValue` | Whole number, 0 or more |
| Community contains | `community` | e.g. DARTMOUTH, BEDFORD |
| Council district | `district` | Number 1–16 |
| Keyword | `keyword` | Server-side filter on description, structure type, or permit number (descriptions are not returned) |
| Max permits | `maxItems` | 1–50,000, default 100 |
| Fetch all (up to 50,000 permits) | `fetchAll` | true/false, default false. About $0.003 per permit |

Bad dates or an inverted date range fail before any API call, with a clear error.

Example input:

```json
{ "workType": "New Building", "dateFrom": "2025-01-01", "minValue": 1000000, "community": "HALIFAX", "maxItems": 200 }
```

### Pricing

Pay per result: you are charged only for permits returned (one result = one merged permit). See the Pricing tab for the current rate.

### Licence and privacy

- **Licence:** Open Government Licence—Halifax v1.0. Commercial use is allowed. Every record includes the required credit and a link to the licence.
- **No endorsement:** this Actor is independent. Do not use HRM names or logos as branding, and do not imply municipal endorsement.
- **Privacy:** Street addresses (civic number and street name), work scope and free-text work descriptions are removed, as are parcel IDs (PID) and inspection fields. The source has no owner or applicant names. Records still include permit number, permit type, work type, status, dates, community, council district, estimated value, structure/occupancy types and unit counts.

### Limits

- Coverage is **Halifax Regional Municipality only**, not other NS municipalities.
- Data freshness and completeness match the HRM open-data feed. This Actor does not add or correct permits.
- Default 100 permits per run; hard cap 50,000 per run, even with **Fetch all**. Pages of 1,000 with a 1 s pause between pages.
- Value and unit fields can be null when the source left them blank.

### FAQ

**Is this scraping?** No. It queries the ArcGIS FeatureServer REST API for the PPL\&C Building Permits layer.

**Does it include applicant or owner names or addresses?** No. Names are not in the public source; street addresses, descriptions, PID and inspection fields are dropped.

**Can I use it commercially?** Yes, under the Open Government Licence—Halifax, with attribution and without implying endorsement.

# Actor input Schema

## `permitType` (type: `string`):

e.g. 'Residential', 'Mixed Use & Commercial', 'Accessory' (case-insensitive match on permit type).

## `workType` (type: `string`):

Kind of work.

## `status` (type: `string`):

e.g. 'Issued', 'Completed', 'In Review', 'Expired'.

## `dateFrom` (type: `string`):

Only records dated on/after this day.

## `dateTo` (type: `string`):

Only records dated on/before this day.

## `issuedFrom` (type: `string`):

Kept for existing integrations; use dateFrom.

## `issuedTo` (type: `string`):

Kept for existing integrations; use dateTo.

## `minValue` (type: `integer`):

Optional.

## `maxValue` (type: `integer`):

Optional.

## `community` (type: `string`):

e.g. 'DARTMOUTH', 'BEDFORD', 'TIMBERLEA'.

## `district` (type: `string`):

District number 1-16 (optional).

## `keyword` (type: `string`):

Server-side filter on work description, structure type or permit number (descriptions are not returned).

## `maxItems` (type: `integer`):

Stop after this many permits (1-50,000, default 100). Ignored when 'Fetch all' is on.

## `fetchAll` (type: `boolean`):

Opt in to return every matching permits, capped at 50,000 per run. Each permit is a billable result (about $0.003 each), so 50,000 costs about $150. Halifax has about 16,800 permits in total (about $50 for all). Tip: set a maximum cost per run in Apify run options.

## Actor input object example

```json
{
  "workType": "any",
  "maxItems": 100,
  "fetchAll": false
}
```

# Actor output Schema

## `permits` (type: `string`):

All permits returned by the run, shown in the 'overview' table view of the default dataset.

# 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("loudtzu/halifax-permits").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("loudtzu/halifax-permits").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 '{}' |
apify call loudtzu/halifax-permits --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,loudtzu/halifax-permits"
        }
    }
}
```

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/mSTfLHSuYyMR4GCid/builds/JVTFKLYR1QRjLuJhE/openapi.json
