# Canada Fuel Consumption Ratings API – NRCan, EV (`loudtzu/canada-fuel-consumption-ratings`) Actor

All 30,886 NRCan fuel consumption ratings for new vehicles sold in Canada: gas 1995–2026, EVs and plug-in hybrids 2012–2026. L/100 km, CO2 g/km, CO2/smog ratings, EV range and kWh. JSON/CSV, Open Government Licence – Canada. $0.003 per rating, no start fee.

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

## Pricing

$3.00 / 1,000 vehicle ratings

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 Fuel Consumption Ratings (NRCan) – Cars, EVs & PHEVs

**30,886 official fuel consumption ratings in one run** (verified full run, Oct 16, 2026): 29,227 conventional vehicles (model years 1995–2026), 1,250 battery-electric and 409 plug-in hybrids (2012–2026). 65 makes.

- **30 fields per vehicle:** `modelYear`, `make`, `model`, `vehicleClass`, `engineSizeL`, `cylinders`, `motorKw`, `transmission`, `gears`, `fuelType`, `cityL100km`, `highwayL100km`, `combinedL100km`, `combinedMpg`, `cityKwh100km` / `combinedKwh100km`, `combinedLe100km`, `electricRangeKm`, `rangeKm`, `rechargeHours`, `co2GPerKm`, `co2Rating`, `smogRating`, plus `sourceFile`, `source` and `licence`. Fields that do not apply to a vehicle type are `null`.
- **Source:** Natural Resources Canada fuel consumption ratings on open.canada.ca, under the **Open Government Licence – Canada** (commercial use allowed with attribution; every record carries the attribution).
- **Output:** structured JSON, or CSV / Excel export from the Apify dataset. Filter by vehicle type, model year range, make, model, class, fuel type, transmission, CO2 and smog ratings, CO2 g/km, combined L/100 km and electric range.

**Why not build it yourself?** NRCan publishes this as separate yearly and per-type CSV files with different column layouts, some in Windows-1252 encoding, EV and PHEV files with their own columns, and an old 2-cycle file that has to be skipped. This Actor finds the right files through the open.canada.ca API, merges them into one schema, decodes transmission and fuel codes, and honours the site's 20-second crawl delay. No scraper to write or maintain, no parsing.

**Price:** $0.003 per rating (three-tenths of a cent), no start fee. All 613 conventional 2026 models (Oct 16, 2026) cost about $1.84; the complete 30,886-rating dataset costs about $92.66.

> CO2 and smog ratings are `null` for model years 1995–2014 (17,884 rows); the source lists them as "n/a".

### What it does

Returns Natural Resources Canada's official **fuel consumption ratings** for new light-duty vehicles sold in Canada, one item per rated vehicle: make, model, year, class, engine or motor, transmission, fuel, city / highway / combined consumption, CO2 emissions, and CO2 and smog ratings. Battery-electric vehicles add kWh/100 km, range and recharge time; plug-in hybrids add electric range, total range and electricity use.

Coverage: conventional vehicles 1995-2026 (5-cycle ratings), battery-electric and plug-in hybrids 2012-2026, about 30,900 ratings in total. The Actor reads the dataset's file list from the open.canada.ca API and downloads only the English CSV files needed for the chosen vehicle types and model years, newest first, 20 seconds apart.

Source: [Fuel consumption ratings on open.canada.ca](https://open.canada.ca/data/en/dataset/98f1a129-f628-4ce4-b24d-6f16bf24dd64).

### Who it's for

Car-comparison and leasing sites, fleet managers, dealers, insurers, EV-charging and energy apps, and researchers.

### Input

| Key | Notes |
|---|---|
| `vehicleTypes` | `conventional`, `batteryElectric`, `plugInHybrid` (default all) |
| `modelYearFrom` / `modelYearTo` | e.g. `2020`, `2026` |
| `make` / `model` / `vehicleClass` | contains, e.g. `Toyota`, `RAV4`, `Pickup truck` |
| `fuelTypes` | `X` regular, `Z` premium, `D` diesel, `E` E85, `N` natural gas, `B` electricity |
| `transmissionTypes` | `Automatic`, `Automated manual`, `Automatic with select shift`, `Continuously variable`, `Manual` |
| `co2Min` / `co2Max` | CO2 emissions range, g/km |
| `co2RatingMin` / `co2RatingMax`, `smogRatingMin` / `smogRatingMax` | 1–10 (ratings exist from model year 2015) |
| `combinedL100kmMax` | combined fuel use at most, L/100 km |
| `electricRangeKmMin` | electric range at least, km |
| `maxItems` | stop after this many records (default 100, at most 50,000) |
| `fetchAll` | `true` returns every matching record, up to 50,000 per run (default `false`) |

A run returns up to `maxItems` ratings (default 100, at most 50,000); `fetchAll: true` returns every match, still capped at 50,000. The source has no date field other than the model year, so `modelYearFrom` / `modelYearTo` is the date filter.

Example: `{"vehicleTypes": ["batteryElectric"], "modelYearFrom": 2025}`

### Output

`vehicleType`, `modelYear`, `make`, `model`, `vehicleClass`, `engineSizeL`, `cylinders`, `motorKw`, `transmission`, `transmissionType`, `gears`, `fuelType`, `fuelTypeName`, `cityL100km`, `highwayL100km`, `combinedL100km`, `combinedMpg`, `cityKwh100km`, `highwayKwh100km`, `combinedKwh100km`, `combinedLe100km`, `electricRangeKm`, `rangeKm`, `rechargeHours`, `co2GPerKm`, `co2Rating`, `smogRating`, `sourceFile`, `source`, `licence`. Fields that do not apply to a vehicle type are null.

### Run time and memory

A full run downloads about 9 files with the required 20-second pause between them, so it takes about 3 minutes and is mostly waiting. Default memory is 256 MB (allowed range 256–1024 MB); a 50-item run peaked at 55 MB. For full or `fetchAll` runs, set memory to 512 MB.

### Archive modes

Besides a live query (`mode: live`, the default), the Actor can read a stored archive. The archive is a single snapshot of 30,886 ratings taken on October 17, 2026, with no scheduled refreshes, so `changesSince`, `asOf` and `history` return that one version of each record:

| `mode` | Extra input | Returns |
|---|---|---|
| `changesSince` | `since` (YYYY-MM-DD) | ratings added, changed or removed on or after that day; 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 |
| `history` | `ids` (up to 1,000) | every archived version of those records, oldest first |
| `archiveExport` | – | the current version of every archived record |

The source has no record IDs, so each archived row carries a `ratingId` built from vehicle type, year, make, model, class, engine or motor, transmission and fuel. The source lists a few IDs more than once; in the archive, later copies carry the ID with a `#2`, `#3` suffix. 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 ratings, split the pull into several runs by model year (`modelYearFrom` / `modelYearTo`) or by another filter, and combine the results.

### Privacy

The source describes vehicle models only. It has no personal information.

### Licence and terms

- **Licence:** [Open Government Licence – Canada](https://open.canada.ca/en/open-government-licence-canada), which allows use "including for commercial purposes" with attribution. Every item carries the attribution.
- **Automated access:** the files are open.canada.ca resource downloads. open.canada.ca robots.txt allows them with `Crawl-delay: 20`, which the Actor honours. No terms were found that ban automated download of open data.
- Independent; not endorsed by Natural Resources Canada.

### Pricing

**Price: $0.003 per result, no start fee** (pay per event, one result = one vehicle rating). All 2026 conventional models (613 on Oct 16, 2026) cost about $1.84; the full dataset (30,886 ratings) costs about $92.66.

### Limits

- CO2 and smog ratings are `null` ("n/a" in the source) for all model years before 2015 (1995–2014, 17,884 rows).
- The old 2-cycle ratings for 1995-2014 are not included; the 5-cycle file covers the same years.
- Ratings are for new vehicles as tested; real-world use varies.
- There are no row-level change dates. Each CSV file on open.canada.ca has a last-modified date, so a later version can skip unchanged files, but individual changed rows can only be found by comparing with an earlier copy.

# Actor input Schema

## `vehicleTypes` (type: `array`):

Leave empty for all.

## `modelYearFrom` (type: `integer`):

e.g. 2020. Only the needed files are downloaded.

## `modelYearTo` (type: `integer`):

e.g. 2026

## `make` (type: `string`):

e.g. Toyota

## `model` (type: `string`):

e.g. RAV4

## `vehicleClass` (type: `string`):

e.g. Pickup truck, Sport utility vehicle

## `fuelTypes` (type: `array`):

Leave empty for all.

## `transmissionTypes` (type: `array`):

Leave empty for all.

## `co2Min` (type: `integer`):

Lowest CO2 emissions, grams per km.

## `co2Max` (type: `integer`):

Highest CO2 emissions, grams per km.

## `co2RatingMin` (type: `integer`):

1 (worst) to 10 (best). Ratings exist from model year 2015.

## `co2RatingMax` (type: `integer`):

1 to 10.

## `smogRatingMin` (type: `integer`):

1 (worst) to 10 (best). Ratings exist from model year 2015.

## `smogRatingMax` (type: `integer`):

1 to 10.

## `combinedL100kmMax` (type: `integer`):

Whole litres per 100 km, e.g. 8.

## `electricRangeKmMin` (type: `integer`):

Battery-electric range, or the electric-only range of a plug-in hybrid.

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

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

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

YYYY-MM-DD. Each record as it stood at the end of this day.

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

Up to 1,000 ratingId values (from archive output). Every archived version, oldest first.

## 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/canada-fuel-consumption-ratings").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/canada-fuel-consumption-ratings").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/canada-fuel-consumption-ratings --silent --output-dataset

```

## MCP server setup

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

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/HApRTQ5ZC6buaUt6u/builds/U7KIPTjtgY9FLEven/openapi.json
