# Environment Canada Weather Alerts: Warnings and Watches (`hydramill/canada-weather-alerts`) Actor

Official Environment Canada weather alerts as clean flat JSON: warnings, watches, advisories and special weather statements per area and province, with colour, validity period and English and French text. Open data, no API key.

- **URL**: https://apify.com/hydramill/canada-weather-alerts.md
- **Developed by:** [Hydramill](https://apify.com/hydramill) (community)
- **Categories:** Other, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Environment Canada Weather Alerts - Warnings, Watches and Statements

Get the **current official Environment Canada weather alerts** as **clean, flat JSON**: **warnings, watches, advisories and special weather statements** for every affected area, with **province, colour, validity period** and the **alert text in English and French**.

It reads the public Environment and Climate Change Canada (ECCC) data directly: no scraping, no login, no API key, no proxies, no browser. ECCC open data may be reused commercially with attribution.

### What you can use it for

- **Logistics, trucking and insurance.** Which areas have a snowfall, wind or blizzard warning now, and until when.
- **Energy and agriculture trading.** Severe-weather signals by province.
- **Travel, event and weather apps and alerts.** Alerts for an area, in English or French.
- **Newsrooms and dashboards.** A tidy table of what is active across Canada, most severe first.
- **AI agents and automations.** "Is there a weather warning for Calgary?" Schedule a run and trigger a webhook on new warnings.

### Why this actor

- **One flat record per alert and area**, with `alertType` (warning, watch, advisory, statement), `riskColour`, `status` and times in UTC ISO 8601.
- **English and French side by side** (`alertName`/`alertNameFr`, `area`/`areaFr`, `textEn`/`textFr`).
- **Most severe first.** Warnings before watches, advisories and statements; red before orange before yellow.
- **Filters**: province, alert class, area, alert name.
- **No bulky geometry.** The polygons are left out, so output stays small.
- **Fails visibly.** If the service is down you get a clear error, not an empty dataset.
- **Free to use.** You only pay Apify's usual platform usage.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `provinces` | list | all | `AB`, `BC`, `MB`, `NB`, `NL`, `NS`, `NT`, `NU`, `ON`, `PE`, `QC`, `SK`, `YT`. |
| `alertTypes` | list | all | `warning`, `watch`, `advisory`, `statement`. |
| `area` | text | empty | Keep alerts whose area name (English or French) contains this text, for example `Calgary`. |
| `event` | text | empty | Keep alerts whose name contains this text, for example `snowfall`. |
| `includeEnded` | boolean | `false` | Also list alerts that Environment Canada has marked as ended. |
| `maxItems` | integer | `100` (Store form: `20`) | Stop after this many records. `0` = no limit. |

#### Example input: warnings in Alberta and Saskatchewan

```json
{
  "provinces": ["AB", "SK"],
  "alertTypes": ["warning"],
  "maxItems": 0
}
```

### Output

One dataset item per alert and area. Real item from a run on 2026-11-17 (texts shortened):

```json
{
  "type": "alert",
  "alertId": "1810244521314087391202611160519_fea1-2000",
  "alertCode": "SFW",
  "alertType": "warning",
  "alertName": "snowfall warning",
  "alertNameFr": "avertissement de neige",
  "area": "Blood Res. 148 including Stand Off",
  "areaFr": "rés. ind. Blood 148 incluant Stand Off",
  "province": "AB",
  "status": "continued",
  "riskColour": "yellow",
  "confidence": "High",
  "impact": "Moderate",
  "publishedAt": "2026-11-17T10:47:59.098Z",
  "validFrom": "2026-11-17T15:00:00.000Z",
  "expiresAt": "2026-11-18T02:47:59.098Z",
  "eventEnd": "2026-11-19T06:00:00.000Z",
  "textEn": "Snowfall, with total amounts of 15 to 25 cm is expected. ...",
  "textFr": "De la neige, laissant une accumulation totale de 15 à 25 cm est prévue. ...",
  "source": "https://api.weather.gc.ca/collections/weather-alerts/items",
  "retrievedAt": "2026-11-17T11:10:12.752Z"
}
```

`status` is ECCC's own flag: `issued`, `continued` or `ended`. `riskColour` is `yellow`, `orange` or `red` for warnings, watches and advisories, and `null` for statements. The default key-value store also gets a `SUMMARY` record with counts per class, the number of alert areas in the feed and the data attribution.

Export the dataset as JSON, CSV, Excel or XML, or read it through the Apify API and integrations (Make, Zapier, Slack, Google Sheets, webhooks). Schedule it every 15 to 60 minutes to follow alerts.

### Pricing

Free: you only pay Apify's usual platform usage (one small request per run, no browser).

### Data source and attribution

Source: Environment and Climate Change Canada, Meteorological Service of Canada, weather alerts via MSC GeoMet (<https://api.weather.gc.ca>).

- Licence: [Environment and Climate Change Canada Data Services End-use Licence](https://eccc-msc.github.io/open-data/licence/readme_en/): commercial use allowed, attribution required. *Data Source: Environment and Climate Change Canada. Contains information licenced under the Data Server End-use Licence of Environment and Climate Change Canada.*

**This is an independent tool. It is not affiliated with, endorsed by or sponsored by Environment and Climate Change Canada or the Government of Canada.** For safety-critical decisions use the official alerts at weather.gc.ca. The data is provided as published, without guarantee of availability or accuracy.

### Limitations

- Only what Environment Canada publishes as current alerts; no forecasts and no history.
- Alert areas are listed by name; the polygons are not included.
- Alerts that are still listed after they ended are hidden unless `includeEnded` is on.

### En español

**Alertas meteorológicas oficiales de Environment Canada** en JSON plano: avisos (warnings), vigilancias (watches), advertencias (advisories) y comunicados especiales, por zona y provincia, con color, periodo de validez y texto en inglés y francés. Datos abiertos con licencia que permite uso comercial citando la fuente. Gratuito. Fuente: Environment and Climate Change Canada. Herramienta independiente, sin relación con el Gobierno de Canadá.

### En català

**Alertes meteorològiques oficials d'Environment Canada** en JSON pla: avisos (warnings), vigilàncies (watches), advertiments (advisories) i comunicats especials, per zona i província, amb color, període de validesa i text en anglès i francès. Dades obertes amb llicència que permet ús comercial citant la font. Gratuït. Font: Environment and Climate Change Canada. Eina independent, sense relació amb el Govern del Canadà.

# Actor input Schema

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

Two-letter codes: AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT. Empty = all.

## `alertTypes` (type: `array`):

warning (most severe), watch, advisory, statement. Empty = all.

## `area` (type: `string`):

Keep alerts whose area name (English or French) contains this text, for example Calgary. Empty = all.

## `event` (type: `string`):

Keep alerts whose name contains this text, for example snowfall or blizzard. Empty = all.

## `includeEnded` (type: `boolean`):

Environment Canada keeps alerts it has ended in the feed for a while. Off by default.

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

Stop after this many records. 0 = no limit.

## Actor input object example

```json
{
  "includeEnded": false,
  "maxItems": 20
}
```

# Actor output Schema

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

One item per alert and area, most severe first.

## `summary` (type: `string`):

Counts, sources read and data attribution (key SUMMARY in the default key-value store).

# 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 = {
    "includeEnded": false,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydramill/canada-weather-alerts").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 = {
    "includeEnded": False,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("hydramill/canada-weather-alerts").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 '{
  "includeEnded": false,
  "maxItems": 20
}' |
apify call hydramill/canada-weather-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydramill/canada-weather-alerts"
        }
    }
}
```

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/224iJIdyZZbHWQRVl/builds/MqmeeaaRKspLfFj1y/openapi.json
