# Canada Border Wait Times (CBSA) (`loonieledger/canada-border-wait-times`) Actor

Get current estimated wait times to enter Canada at land border crossings from the official CBSA open data feed, for commercial trucks and travellers, with minutes parsed and ISO timestamps. Filter by crossing, province or delay.

- **URL**: https://apify.com/loonieledger/canada-border-wait-times.md
- **Developed by:** [Keegan Carpentier](https://apify.com/loonieledger) (community)
- **Categories:** Travel, Automation
- **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.

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

## Canada Border Wait Times (CBSA) – Live Land Border Crossing Delays

Get the **current estimated wait times to enter Canada** at the main land border crossings, straight from the official **Canada Border Services Agency (CBSA)** open data feed, as clean JSON, CSV or Excel. Separate **commercial (truck)** and **traveller** waits, minutes parsed to numbers, ISO timestamps with the correct time zone, province and U.S. state split out. Filter by crossing, province or minimum delay, or schedule an **"only when it changes"** monitor.

- ✅ Official CBSA open data (about 30 crossings from New Brunswick to British Columbia, updated about hourly). No scraping, no login, no API key
- ✅ "No Delay", "5 minutes", "1 hour 10 minutes" → `0`, `5`, `70`
- ✅ Local times like "18:20 EDT" → `2026-09-29T18:20:00-04:00`
- ✅ `onlyChanged` mode for alerts; English **or French**; pay only for the rows you get

### Who it's for

- **Trucking, freight and logistics companies** routing loads into Canada (Ambassador Bridge, Blue Water, Peace Bridge, Lacolle, Emerson, Coutts, Pacific Highway …)
- **Travel apps, cross-border shoppers and tourism operators**
- **Analysts** building a wait-time history by scheduling the Actor and appending to a dataset or sheet

### Input

| Field | What it does | Default |
|---|---|---|
| `language` | `en` or `fr` file | `en` |
| `crossings` | Crossing name or location contains any of these | `["Windsor","Douglas","Coutts"]` (prefill) |
| `provinces` | Canadian-side province codes: `BC`, `AB`, `SK`, `MB`, `ON`, `QC`, `NB` … | all |
| `minDelayMinutes` | Only crossings with a commercial or traveller wait of at least N minutes | 0 |
| `onlyChanged` | Only crossings whose wait changed since the last run | off |
| `maxItems` | Hard cap on results | 100 |

Example: alert when any Ontario crossing has a 30+ minute truck or car wait

```json
{ "provinces": ["ON"], "minDelayMinutes": 30, "onlyChanged": true }
```

### Output

One row per crossing. A real record from a live test (29 Sep 2026):

```json
{
  "crossing": "St. Stephen",
  "location": "St. Stephen, NB/Calais, ME",
  "canadianSide": "St. Stephen, NB",
  "usSide": "Calais, ME",
  "province": "NB",
  "usState": "ME",
  "lastUpdatedLocal": "2026-09-29 18:56 ADT",
  "lastUpdated": "2026-09-29T18:56:00-03:00",
  "commercialCanadaBound": "Not Applicable",
  "commercialCanadaBoundMinutes": null,
  "travellersCanadaBound": "No Delay",
  "travellersCanadaBoundMinutes": 0,
  "commercialUsBound": null,
  "travellersUsBound": null,
  "maxDelayMinutes": 0,
  "language": "en",
  "sourceUrl": "https://www.cbsa-asfc.gc.ca/bwt-taf/bwt-eng.csv",
  "source": "Canada Border Services Agency – Current Border Wait Times (open data)",
  "licence": "Open Government Licence – Canada",
  "attribution": "Contains information licensed under the Open Government Licence – Canada.",
  "scrapedAt": "2026-09-29T22:49:10+00:00"
}
```

More real rows are in `sample_output.json`.

### Scheduling

Save a **Task**, add a **Schedule** (hourly matches the source's update rhythm), and connect Slack, email, Google Sheets, Zapier or Make. With `onlyChanged: true` you only get (and pay for) crossings whose wait changed. State lives in the named key-value store `canada-bwt-state`.

### Pricing

**Pay per result.** You're charged once per crossing row written to the dataset.

### Data source, licence and privacy

- Source: CBSA **Current Border Wait Times** – https://www.cbsa-asfc.gc.ca/bwt-taf/bwt-eng.csv (dataset: https://open.canada.ca/data/en/dataset/d4a716f5-a2fc-4c3c-88ed-451fe05900e4).
- Licence: **Open Government Licence – Canada**. Every row carries the required attribution statement.
- Aggregate traffic estimates only. **No personal information.**
- Unofficial tool, not affiliated with or endorsed by CBSA. Waits are CBSA estimates and can change quickly.

### Limits and notes

- CBSA publishes **Canada-bound** waits only; the U.S.-bound columns are always "--" in the source and are output as `null`.
- "Not Applicable" (e.g. no commercial processing at that crossing) is output as the text with `null` minutes.
- The file covers CBSA's main land crossings (about 30), not every port of entry.

# Actor input Schema

## `language` (type: `string`):

English or French source file (crossing names and status text).

## `crossings` (type: `array`):

Keep crossings whose name or location contains any of these, e.g. Ambassador, Peace Bridge, Douglas, Coutts, Lacolle. Leave empty for all.

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

Two-letter province codes of the Canadian side: BC, AB, SK, MB, ON, QC, NB, NS, YT.

## `minDelayMinutes` (type: `integer`):

Keep crossings whose commercial or traveller Canada-bound wait is at least this long. 0 = all.

## `onlyChanged` (type: `boolean`):

Remembers the last values in the named key-value store 'canada-bwt-state' and returns only crossings whose wait changed. Use with a schedule (the file updates about hourly).

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

Stop after this many crossings.

## Actor input object example

```json
{
  "language": "en",
  "crossings": [
    "Windsor",
    "Douglas",
    "Coutts"
  ],
  "minDelayMinutes": 0,
  "onlyChanged": false,
  "maxItems": 100
}
```

# Actor output Schema

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

Border crossings with current wait times written to 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 = {
    "crossings": [
        "Windsor",
        "Douglas",
        "Coutts"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("loonieledger/canada-border-wait-times").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 = { "crossings": [
        "Windsor",
        "Douglas",
        "Coutts",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("loonieledger/canada-border-wait-times").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 '{
  "crossings": [
    "Windsor",
    "Douglas",
    "Coutts"
  ]
}' |
apify call loonieledger/canada-border-wait-times --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,loonieledger/canada-border-wait-times"
        }
    }
}
```

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/NWqb7LnFBo4IXw8YN/builds/UzxV81GDrFi5dPxPK/openapi.json
