# Canada CPI API — Consumer Price Index by Province & City (`nexgensignal/ca-consumer-price-index-observations`) Actor

Canada's official Consumer Price Index as data: monthly CPI for Canada, provinces, territories and cities across 300+ products and groups (food, shelter, energy, gasoline), back to 1914. Filter by place, product and month. No API key. Part of NexGen Signal — official-source data products

- **URL**: https://apify.com/nexgensignal/ca-consumer-price-index-observations.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 canada cpi observations

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

## 🍁 Canada CPI API — Consumer Price Index by Province & City

Get Canada's official Consumer Price Index as clean JSON — monthly, not seasonally adjusted, for Canada, the provinces and territories and selected cities, across about 360 products and product groups from all-items to food, shelter, rent, gasoline and electricity, back to 1914 for the longest series.

Filter by place, product, vector ID and month, or ask for the latest month of every series. Values come newest month first.

The unit of output is one **index value**: one place, one product or group, one month. You pay per value delivered; a run that finds nothing costs nothing.

### Who buys this and for what job

- **Economists, banks and markets teams** tracking Canadian inflation by province, city and component.
- **Pricing, procurement and contract teams** indexing prices and wages to a CPI component.
- **Real estate and rental analysts** following rent and shelter costs by city.
- **Researchers and dashboards** needing the official series as clean records.

Buyers usually search for this as **"canada cpi data"** or **"canada inflation by province"**.

### 📊 Sample Output

![Table of Canada Consumer Price Index values for Canada, all-items: month and index value (2002=100).](https://api.apify.com/v2/key-value-stores/IXCaMKjxSmUTLHhmq/records/ca-consumer-price-index-observations.png)

| reference_month | geography | product | value | base_period |
|---|---|---|---|---|
| 2026-08 | Canada | All-items | 169.8 | 2002=100 |
| 2026-07 | Canada | All-items | 169.9 | 2002=100 |
| 2026-06 | Canada | All-items | 169 | 2002=100 |
| 2026-05 | Canada | All-items | 169.6 | 2002=100 |
| 2026-04 | Canada | All-items | 168 | 2002=100 |
| 2026-03 | Canada | All-items | 167.4 | 2002=100 |

Rows from live run `4Ptmtyk0iYMHmr2Tp` on Apify (the Store example: Canada, All-items, 10 values). Notice the newest month first and the index base (2002=100) on every row.

### ✅ What you get

Every field of each record:

- `record_id` — cA-CPI:<vector>:<YYYY-MM>; stable, use it to upsert.
- `reference_month` — reference month (YYYY-MM).
- `geography` — canada, a province or territory, or a city, as published.
- `geography_dguid` — geography's DGUID.
- `product` — product or product group, e.g. All-items, Food, Shelter.
- `base_period` — index base, e.g. 2002=100.
- `value` — index value (null when not available).
- `status` — status flag as published (e.g. .. not available, F too unreliable).
- `symbol` — symbol as published.
- `terminated` — true for a series the publisher no longer updates.
- `decimals` — decimals the publisher uses for this series.
- `vector` — series vector ID, e.g. v41690973.
- `coordinate` — series coordinate in the table.
- `source_table` — 18-10-0004-01.
- `source` — product name.
- `licence` — acknowledgement notice required by the Statistics Canada Open Licence.
- `attribution` — source line.
- `observed_at` — when this run read it (UTC).

### ⚙️ Sample inputs

**1. The Store example — Canada all-items**

```json
{
  "geographies": ["Canada"],
  "products": ["All-items"],
  "maxRecords": 10
}
```

Returned the 10 values above in run `4Ptmtyk0iYMHmr2Tp` (1,152,913 rows read); $0.50 on the Free plan.

**2. Two cities, two products, since 2025**

```json
{
  "geographyContains": ["toronto", "vancouver"],
  "products": ["All-items", "Shelter"],
  "monthFrom": "2025-01",
  "maxRecords": 40
}
```

Returned 40 of 80 matching values in run `W8kraMDxoajlQjAMf`.

**3. Latest month for energy components**

```json
{
  "geographies": ["Canada"],
  "productContains": ["gasoline", "rent", "electricity"],
  "latestOnly": true,
  "maxRecords": 20
}
```

Returned the latest value of the 10 matching series in run `naotjFPh5tznknWht` (e.g. Gasoline 252.2 in August 2026).

Input fields:

| Field | Meaning |
|---|---|
| `geographies` | Exact names: Canada, a province (Ontario), or a city as written in the table (Toronto, Ontario). Leave empty for all 30. |
| `geographyContains` | Places whose name contains any of these words, e.g. Quebec. |
| `products` | Exact product or group names, e.g. All-items, Food, Shelter, Gasoline, Rent. Leave empty for all. |
| `productContains` | Products whose name contains any of these words, e.g. beef, electricity. |
| `vectors` | Series vector IDs, e.g. v41690973 (Canada, All-items). |
| `monthFrom` | First month wanted, e.g. 2020-01. |
| `monthTo` | Last month wanted. |
| `latestOnly` | One record per series: its newest month with a value. |
| `includeTerminated` | Series the publisher no longer updates (older bases and discontinued groups). |
| `order` | By reference month. |
| `maxRecords` | Stop after this many index values (each is charged once). |

### 🧾 JSON sample record

```json
{
  "record_id": "CA-CPI:v41690973:2026-08",
  "reference_month": "2026-08",
  "geography": "Canada",
  "geography_dguid": "2016A000011124",
  "product": "All-items",
  "base_period": "2002=100",
  "value": 169.8,
  "status": null,
  "symbol": null,
  "terminated": false,
  "decimals": 1,
  "vector": "v41690973",
  "coordinate": "2.2",
  "source_table": "18-10-0004-01",
  "source": "Table 18-10-0004-01 Consumer Price Index, monthly, not seasonally adjusted",
  "licence": "Source: Statistics Canada, Table 18-10-0004-01 Consumer Price Index, monthly, not seasonally adjusted, reference period 2026-08. Reproduced and distributed on an \"as is\" basis with the permission of Statistics Canada. Licensed under the Statistics Canada Open Licence.",
  "attribution": "Source: Statistics Canada, Table 18-10-0004-01 Consumer Price Index, monthly, not seasonally adjusted",
  "observed_at": "2026-10-12T04:08:51Z"
}
```

### 🔧 How it works

1. **Robots check.** The publisher's `robots.txt` is read on every run; it allows the table download and asks for two seconds between requests, which the actor honours. A robots file that disallowed the download would stop the run with nothing charged.

2. **One official file.** The actor downloads the full table 18-10-0004-01 as the publisher's CSV zip (about 15 MB, 1,152,913 values on 12 Oct 2026) and streams the CSV inside it.

3. **Filter and sort.** Each value is checked against your filters as it is read; the newest matches (or the newest per series with `latestOnly`) are kept.

4. **Deliver, then charge.** Records are pushed in batches, each charged after delivery, so records and charges always match.

5. **Receipt.** `RUN_RECEIPT` records the robots result, the file and its date, rows read and matched, and delivered and charged counts.

No login, API key, proxy or bot workaround.

### 💰 Pricing example

Per index value delivered, no start fee, no monthly charge:

| Apify plan | Price per index value |
|---|---|
| Free | $0.05 |
| Bronze | $0.045 |
| Silver | $0.04 |
| Gold, Platinum, Diamond | $0.0335 |

- 10 records (the Store example): $0.50 on the Free plan, $0.335 on Gold.
- 1,000 records (the default cap): $50 on Free, $45 on Bronze, $40 on Silver, $33.50 on Gold.

**Coverage and size.** 30 geographies (Canada, provinces, territories and selected cities) and 359 products and groups; 2,139 series and 1,152,913 values from January 1914 to August 2026 in the file read on 12 Oct 2026 (the publisher updates it monthly). Not seasonally adjusted. Some series are terminated (older bases or discontinued groups); `terminated` marks them.

### ⚖️ Legal & ToS

Licence: Statistics Canada Open Licence. Every record carries the acknowledgement the licence requires: "Source: Statistics Canada, Table 18-10-0004-01 Consumer Price Index, monthly, not seasonally adjusted, \[reference period]. Reproduced and distributed on an "as is" basis with the permission of Statistics Canada."

The licence also says licensees shall not use Statistics Canada's name, crest, logos or domain names on material relating to a value-added product without written authorization, and shall not suggest endorsement. This actor's title and listing therefore do not use that name; it appears only in the required source notice. This actor is not endorsed by Statistics Canada.

Price indexes for areas and product groups only — no personal data. `robots.txt` and its crawl delay are honoured. One public file, declared User-Agent, no login, key, proxy or form.

### ❓ FAQ

**Is it seasonally adjusted?**
No. This is the not seasonally adjusted monthly table, which has the full product detail.

**Why do some products show a different base, like 2013=100?**
Some newer product series start later and carry their own base; `base_period` says which.

**How do I get one exact series?**
Use `vectors` with the series vector ID (e.g. v41690973 for Canada all-items).

**How fresh is it?**
As fresh as the published table; it is updated with each monthly CPI release.

### 🆘 Troubleshooting

- **0 records for a city** — city names include the province, e.g. `Toronto, Ontario`; or use `geographyContains`.
- **0 records for a product** — product names must match exactly, e.g. `All-items`; or use `productContains`.
- **Too many old rows** — set `monthFrom` or `latestOnly`.
- **SOURCE UNAVAILABLE message** — the source did not answer after four tries; nothing was charged — run again later.
- **CAPPED message** — your maximum total charge was reached; raise it in the run options.
- **Run failed with "Invalid input"** — a filter value is malformed; the message names the field. Nothing was charged.

### 🔗 Related Actors

- [Australia CPI by Product & Month - ABS](https://apify.com/nexgensignal/au-cpi-product-month-observations) — Australian CPI by product.
- [Sweden CPI by Product & Month - SCB](https://apify.com/nexgensignal/se-cpi-product-month-observations) — Swedish CPI by product.
- [UK CPIH Inflation Time Series - ONS](https://apify.com/nexgensignal/uk-cpih-time-series-observations) — UK CPIH inflation.
- [Australia Wage Price Index - ABS](https://apify.com/nexgensignal/au-wage-price-index-observations) — Australian wage growth.
- [EU Agricultural Commodity Prices — Beef, Pork, Dairy, Grain](https://apify.com/nexgensignal/eu-agri-food-price-records) — EU agricultural commodity prices.

🏢 **About NexGen Signal** — official-source data products from government and regulator publications. Browse the catalog: [apify.com/nexgensignal](https://apify.com/nexgensignal)

### ⭐ Found this useful?

If this actor saved you time, a rating on its Apify Store page helps other buyers find it.

Part of NexGen Signal — official-source data products.

# Actor input Schema

## `geographies` (type: `array`):

Exact names: Canada, a province (Ontario), or a city as written in the table (Toronto, Ontario). Leave empty for all 30.

## `geographyContains` (type: `array`):

Places whose name contains any of these words, e.g. Quebec.

## `products` (type: `array`):

Exact product or group names, e.g. All-items, Food, Shelter, Gasoline, Rent. Leave empty for all.

## `productContains` (type: `array`):

Products whose name contains any of these words, e.g. beef, electricity.

## `vectors` (type: `array`):

Series vector IDs, e.g. v41690973 (Canada, All-items).

## `monthFrom` (type: `string`):

First month wanted, e.g. 2020-01.

## `monthTo` (type: `string`):

Last month wanted.

## `latestOnly` (type: `boolean`):

One record per series: its newest month with a value.

## `includeTerminated` (type: `boolean`):

Series the publisher no longer updates (older bases and discontinued groups).

## `order` (type: `string`):

By reference month.

## `maxRecords` (type: `integer`):

Stop after this many index values (each is charged once).

## Actor input object example

```json
{
  "geographies": [
    "Canada"
  ],
  "geographyContains": [],
  "products": [
    "All-items"
  ],
  "productContains": [],
  "vectors": [],
  "latestOnly": false,
  "includeTerminated": true,
  "order": "newest_first",
  "maxRecords": 10
}
```

# Actor output Schema

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

The delivered (and billed) records.

## `receipt` (type: `string`):

Robots result, source files, rows read, delivered and charged counts.

# 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 = {
    "geographies": [
        "Canada"
    ],
    "products": [
        "All-items"
    ],
    "maxRecords": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/ca-consumer-price-index-observations").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 = {
    "geographies": ["Canada"],
    "products": ["All-items"],
    "maxRecords": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/ca-consumer-price-index-observations").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 '{
  "geographies": [
    "Canada"
  ],
  "products": [
    "All-items"
  ],
  "maxRecords": 10
}' |
apify call nexgensignal/ca-consumer-price-index-observations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/ca-consumer-price-index-observations"
        }
    }
}
```

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/oB9Wi2MLRyHpXFRfo/builds/kAKDIU25HLOBLX9Ha/openapi.json
