# Barrie Building Permits – Open Data API (`loudtzu/barrie-permits`) Actor

About 4,900 City of Barrie issued building permits: permit number, type, work description, status date, street, ~1 km location. Reduced, not anonymous; free-text may contain names; civic numbers dropped. OGL–Barrie. $0.003/permit; about $14.70 for a full pull.

- **URL**: https://apify.com/loudtzu/barrie-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

## Barrie Building Permits

**About 4,900 unique issued building permits for the City of Barrie, Ontario** (4,862 up to 2026-10-16), newest first.

- **Per permit:** permit number, permit type (e.g. Residential Deck, Sign Permit, Dwelling New Single Detached), work description, status and status date, street, ~1 km location.
- **Licence:** Open Government Licence – Barrie, version 1.0; every record carries the attribution.
- **Output:** structured JSON or CSV/Excel. Filter by permit type, keyword and street.
- **Privacy:** civic numbers and units dropped; free-text descriptions may contain names. The data is reduced, not anonymous.

**Why not build it yourself?** No ArcGIS MapServer paging or address trimming to write and maintain.

**Price:** $0.003 per permit (three-tenths of a cent), no start fee. A full pull (about 4,900 rows) costs roughly $14.70.

### Who it is for

Contractors, building-supply and home-services firms, real-estate and housing analysts, and researchers tracking construction activity in Barrie, Ontario.

### Input

| Field | Meaning |
|---|---|
| `permitType` | Text in the permit type |
| `keyword` | Text in the work description |
| `street` | Text in the street name |
| `dateFrom`, `dateTo` | Status date range (YYYY-MM-DD, inclusive) |
| `status` | Text in the status (all current records are "Issued") |
| `parentPermitNumber` | Text in the parent permit number |
| `issuedFrom`, `issuedTo` | Older names for `dateFrom`/`dateTo`, still accepted |
| `maxItems` | stop after this many records (default 1000, at most 50,000) |
| `fetchAll` | `true` returns every matching record, up to 50,000 per run (default `false`) |

A run returns at most 1,000 permits unless `fetchAll` is `true`, and never more than 50,000.

### Output

`permitNumber`, `parentPermitNumber`, `permitType`, `description`, `status`, `statusDate`, `street`, `latitude`, `longitude`, `source`, `licence`.

### Archive modes

Besides a live query (`mode: live`, the default), the Actor can read its own archive. The archive is a snapshot Oct 17, 2026 03:08 ADT; refreshes may be added later.

| `mode` | Extra input | Returns |
|---|---|---|
| `changesSince` | `since` (YYYY-MM-DD) | permits added, changed or removed on or after that day in the snapshot Oct 17, 2026 03:08 ADT; removed ones listed (ID + `_deletedOn` only, not charged) in the run's key-value record `DELETED` |
| `asOf` | `asOf` (YYYY-MM-DD) | each record as it stood at the end of that day in the snapshot Oct 17, 2026 03:08 ADT |
| `history` | `ids` (up to 1,000) | every archived version of those records, oldest first (snapshot Oct 17, 2026 03:08 ADT) |
| `archiveExport` | – | the current version of every archived record (snapshot Oct 17, 2026 03:08 ADT) |

When refreshes are added later they are compared against a complete pull; until then the archive is a snapshot Oct 17, 2026 03:08 ADT. Permits that disappear from the source are kept only as an ID and the date they were removed. Privacy rules are applied again when the archive is read, so a rule tightened later also covers older rows. The normal filters, `maxItems` and `fetchAll` apply in every mode, and each row returned is billed at the normal per-result price. Archive modes return at most 50,000 rows per run.

### Large pulls

Apify stops a run once its charges reach the account's per-run limit (about $85 by default, which is about 28,000 rows at $0.003). For more than about 25,000 permits, split the pull into several runs by date range (`dateFrom` / `dateTo`) or by another filter, and combine the results.

### Privacy

- The source has no owner, applicant or contractor fields.
- Most permits are for homes, so the civic number and unit are dropped from the address (only the street is kept, e.g. "MORTON CRES"), and latitude and longitude are rounded to 2 decimals (about 1 km).
- The free-text description is cleaned: emails, phone numbers, civic addresses written in the text ("a house at 372 Georgian Dr", "Proposed Address: 140 ...", "555 St. Vincent", run-together lists such as "5 Appletree Lane3 Appletree Lane"), including common misspellings of street types (e.g. CRESENT), and person names after "by", "spoke with", "owner" or "applicant", or a given name followed by a surname, are replaced with "\[... removed]". On the Oct 16, 2026 data that removes civic addresses from 236 descriptions and names from 6 (counted once per permit). The check is pattern-based, so some names in free text may remain.

### Source and licence

- **Source:** City of Barrie GIS, layer "Issued Building Permits 2018 - Present" ([MapServer layer 1](https://gispublic.barrie.ca/arcgis/rest/services/Open_Data/APLI/MapServer/1)), read through the ArcGIS REST API in pages of 1,000 with a 1-second pause. gispublic.barrie.ca has no robots.txt (404).
- **Licence:** [Open Government Licence – Barrie, version 1.0](https://www.barrie.ca/Online%20Services/PublishingImages/OpenData_Images/COB_DataLicense.pdf), which grants use "including for commercial purposes" with the attribution "Contains information licensed under the Open Government Licence – Barrie." Every record carries it. The licence does not cover personal information, which is why the privacy steps above are applied.

### Pricing

$0.003 per result, no start fee. A full pull (about 4,900 rows / 4,862 up to 2026-10-16) costs roughly $14.70.

### Run settings

Default memory is 256 MB (allowed range 256–1024 MB). A full run of all permits needs no more than that.

### Limits

- Only issued permits; all records have status "Issued". There is no construction value or applicant field in the source.
- Status date is the date of the status change, not always the issue date.
- The source has no "last edited" field, so it cannot be asked only for records changed since a date. A status-date range is the closest filter.

# Actor input Schema

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

e.g. Deck, Sign Permit, Dwelling New Single Detached.

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

Text to find in the work description.

## `street` (type: `string`):

e.g. BAYFIELD ST.

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

YYYY-MM-DD. Filters on statusDate (the date of the latest status change).

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

YYYY-MM-DD, inclusive. Filters on statusDate (the date of the latest status change).

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

e.g. Issued. All current records are Issued.

## `parentPermitNumber` (type: `string`):

e.g. PMT18-00869.

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

Older alias kept for existing users; use the date range above.

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

Older alias kept for existing users; use the date range above.

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

Stop after this many records (default 100, at most 50,000). Ignored when 'Fetch all' is on. Each record is billed.

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

Off by default. Turn on to return every matching record, up to 50,000 per run. Each record is billed; split larger pulls by date or filters.

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

live = normal query. The other modes read the archive (snapshot Oct 17, 2026 03:08 ADT).

## `since` (type: `string`):

YYYY-MM-DD. Records added, changed or removed on or after this day. Removed records come back as ID + deleted-on only. From the snapshot Oct 17, 2026 03:08 ADT.

## `asOf` (type: `string`):

YYYY-MM-DD. Each record as it stood at the end of this day. From the snapshot Oct 17, 2026 03:08 ADT.

## `ids` (type: `array`):

Up to 1,000 permit numbers, e.g. PMT18-00869. Every archived version, oldest first. From the snapshot Oct 17, 2026 03:08 ADT.

## Actor input object example

```json
{
  "maxItems": 100,
  "fetchAll": false,
  "mode": "live"
}
```

# Actor output Schema

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

All items returned by the run, in the 'overview' table view.

# 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/barrie-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/barrie-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/barrie-permits --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,loudtzu/barrie-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/8rlICXpnEJmFSwFgY/builds/3sNeYw4ZPp0eZdjMD/openapi.json
