# Canada Open Data Catalog Scraper (`parseforge/canada-open-data-scraper`) Actor

Export Canadian government open datasets from open.canada.ca. Browse 36k+ datasets across federal departments. Pull dataset metadata, resources, organization, license, tags, and publication dates. Catalog mode lists all datasets; dataset mode fetches one by ID.

- **URL**: https://apify.com/parseforge/canada-open-data-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Other, Education
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 result items

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🍁 Canada Open Data Catalog Scraper

> 🚀 **Export the Canadian federal open data catalog in seconds.** Pull **36,000+ datasets** across every federal department with metadata, downloadable resources, organization, license, and update history. No API key, no scraping pipeline, no manual CSV stitching.

> 🕒 **Last updated:** 2026-05-22 · **📊 13 fields** per record · **🍁 36,000+ datasets** · **🏛️ 100+ federal organizations** · **🇨🇦 English + French metadata**

The **Canada Open Data Scraper** taps the official open.canada.ca catalog and returns **13 structured fields per dataset**, including title, description, organization, license, file resources (CSV, GeoJSON, XLSX, ZIP, etc.), tags, and creation/modification timestamps. The underlying portal is the federal government's flagship open data initiative and aggregates publications from Statistics Canada, Health Canada, Environment Canada, Transport Canada, Natural Resources Canada, and 100+ other departments and agencies.

The catalog covers **federal datasets across every Canadian ministry**, with bilingual English and French metadata, downloadable file resources, and consistent licensing fields. This Actor turns it into a clean dataset downloadable as CSV, Excel, JSON, or XML in under a minute. Filters and pagination run server-side, so you skip the parser engineering entirely.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Canadian SMEs, civic-tech builders, researchers, journalists, GIS engineers, policy analysts, NGOs | Open-data discovery, federal dataset inventory, license auditing, journalism research, GIS source feeds, ML training data |

---

### 📋 What the Canada Open Data Scraper does

Two collection workflows in a single run:

- 🍁 **Catalog walk.** Paginate the full federal dataset registry, optionally filtered by a search query.
- 🎯 **Single dataset fetch.** Retrieve one dataset by UUID or slug for targeted enrichment.
- 📁 **Resource expansion.** Every dataset includes its file resources with name, format, URL, language, size, and last-modified timestamp.
- 🏷️ **Tag and keyword merge.** English and French tags consolidated into one deduplicated list.
- 🏛️ **Organization attribution.** Publishing department or agency captured for every record.

Each record includes identifiers (UUID, slug), descriptive metadata (title, notes, tags), governance (organization, license, frequency), and a full list of downloadable resources.

> 💡 **Why it matters:** Canada's open data portal is a goldmine of free, high-trust data, but the portal UI is built for browsing one dataset at a time. This Actor turns it into a single downloadable spreadsheet so you can audit license terms, sort by recency, or build a research inventory in minutes.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>mode</code></td><td>enum</td><td><code>"catalog"</code></td><td><code>catalog</code> walks the registry, <code>dataset</code> fetches one record by ID.</td></tr>
<tr><td><code>datasetId</code></td><td>string</td><td>empty</td><td>UUID or slug of a single dataset. Required in dataset mode.</td></tr>
<tr><td><code>searchQuery</code></td><td>string</td><td>empty</td><td>Optional keyword filter applied in catalog mode.</td></tr>
</tbody>
</table>

**Example: catalog walk of 50 datasets matching "climate".**

```json
{
    "maxItems": 50,
    "mode": "catalog",
    "searchQuery": "climate"
}
````

**Example: fetch one dataset by slug.**

```json
{
    "mode": "dataset",
    "datasetId": "statcan-pumf-census-2021"
}
```

> ⚠️ **Good to Know:** dataset frequency, license, and tag completeness vary by publishing department. Statistics Canada datasets are richly tagged; older legacy datasets from smaller agencies sometimes leave tags or update frequency blank. The Actor always returns the official portal URL so you can cross-check anything ambiguous.

***

### 📊 Output

Each dataset record contains up to **13 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | string | `"a8db9ea0-7e1b-4cce-a4f3-8e7e6e58f6d5"` |
| 🏷️ `name` | string | `"statcan-pumf-census-2021"` |
| 📰 `title` | string | `"Census of Population, 2021"` |
| 📝 `notes` | string | `"The Public Use Microdata File..."` |
| 🏛️ `organization` | string | `"Statistics Canada"` |
| ⚖️ `license` | string | `"Open Government Licence - Canada"` |
| 🏷️ `tags` | array | `["census","demographics","population"]` |
| 📁 `resourcesCount` | number | `4` |
| 📦 `resources` | array | `[{name, format, url, language, size, lastModified}]` |
| 🕒 `metadataCreated` | ISO 8601 | `"2022-07-13T13:01:22.547Z"` |
| 🔁 `metadataModified` | ISO 8601 | `"2024-11-04T09:21:18.000Z"` |
| 📅 `frequency` | string | null | `"annually"` |
| 🔗 `portalUrl` | string | `"https://open.canada.ca/data/en/dataset/..."` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>📊 Statistics Canada census dataset</strong></summary>

```json
{
    "id": "a8db9ea0-7e1b-4cce-a4f3-8e7e6e58f6d5",
    "name": "statcan-pumf-census-2021",
    "title": "Census of Population, 2021: Public Use Microdata File (PUMF)",
    "notes": "The PUMF provides an anonymized 2.7% sample of the Canadian population...",
    "organization": "Statistics Canada",
    "license": "Open Government Licence - Canada",
    "tags": ["census", "demographics", "population", "microdata"],
    "resourcesCount": 4,
    "resources": [
        {
            "name": "PUMF Individuals File (CSV)",
            "format": "CSV",
            "url": "https://www150.statcan.gc.ca/.../pumf_individuals.csv",
            "language": ["en", "fr"],
            "size": 824000000,
            "lastModified": "2024-11-04T09:21:18.000Z"
        }
    ],
    "metadataCreated": "2022-07-13T13:01:22.547Z",
    "metadataModified": "2024-11-04T09:21:18.000Z",
    "frequency": "every_5_years",
    "portalUrl": "https://open.canada.ca/data/en/dataset/statcan-pumf-census-2021",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🌦️ Environment Canada climate observations</strong></summary>

```json
{
    "id": "1c8030d3-3a08-4f33-8e3a-9ddd66c4c2c5",
    "name": "ec-historical-climate-data",
    "title": "Historical Climate Data",
    "notes": "Hourly, daily, and monthly weather observations from Environment and Climate Change Canada stations.",
    "organization": "Environment and Climate Change Canada",
    "license": "Open Government Licence - Canada",
    "tags": ["climate", "weather", "temperature", "precipitation"],
    "resourcesCount": 3,
    "resources": [
        {
            "name": "Hourly observations (CSV)",
            "format": "CSV",
            "url": "https://climate.weather.gc.ca/...",
            "language": "en",
            "size": null,
            "lastModified": "2026-05-15T03:00:00.000Z"
        }
    ],
    "metadataCreated": "2018-03-14T11:42:18.331Z",
    "metadataModified": "2026-05-15T03:00:00.000Z",
    "frequency": "daily",
    "portalUrl": "https://open.canada.ca/data/en/dataset/ec-historical-climate-data",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🏥 Health Canada drug product database</strong></summary>

```json
{
    "id": "bc1f7e91-7d4c-4a8d-8e3a-9ddd66c4c2c5",
    "name": "drug-product-database",
    "title": "Drug Product Database: data files",
    "notes": "All approved drug products marketed in Canada, including ingredients, dosage, and license holders.",
    "organization": "Health Canada",
    "license": "Open Government Licence - Canada",
    "tags": ["pharmaceuticals", "drugs", "health", "license-holders"],
    "resourcesCount": 6,
    "resources": [
        {
            "name": "Drug Product Database - active products (ZIP)",
            "format": "ZIP",
            "url": "https://www.canada.ca/.../allfiles_ap.zip",
            "language": ["en", "fr"],
            "size": null,
            "lastModified": "2026-05-20T08:00:00.000Z"
        }
    ],
    "metadataCreated": "2014-10-19T18:12:09.107Z",
    "metadataModified": "2026-05-20T08:00:00.000Z",
    "frequency": "weekly",
    "portalUrl": "https://open.canada.ca/data/en/dataset/drug-product-database",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🍁 | **Full federal coverage.** Every department on open.canada.ca is in scope, from Statistics Canada to Parks Canada. |
| 🎯 | **Two-mode workflow.** Bulk catalog walk for inventory, single-dataset fetch for enrichment. |
| 📁 | **Resource expansion.** Each record carries its downloadable files (CSV, GeoJSON, ZIP, etc.) with size, language, and last-modified date. |
| 🏷️ | **Bilingual tag merge.** English and French keywords consolidated into one deduplicated list. |
| ⚡ | **Fast.** 100 datasets in under a minute, 10,000 in under 15 minutes. |
| 🔁 | **Always fresh.** Every run pulls the latest catalog state, no caching. |
| 🚫 | **No authentication.** Works on public open government data. No API key needed. |

> 📊 The Canadian federal open data portal is the most comprehensive single source of free Canadian government data. This Actor makes the entire catalog queryable in minutes.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ Canada Open Data Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **36,000+** federal datasets | **Live per run** | Search keyword, single ID | ⚡ 2 min |
| Hand-built CKAN client | Free | Up to you | Manual | Up to you | 🐢 Days |
| Commercial data marketplaces | $$$ | Curated subset | Variable | Vendor-defined | ⏳ Hours |
| Manual portal browsing | Free | One at a time | Manual | UI search | 🕒 Endless |

Pick this Actor when you want a clean structured dataset of the entire Canadian federal open data registry without writing a CKAN client.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the Canada Open Data Catalog Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick catalog mode for a full walk or dataset mode with an ID, plus `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 📊 Market & Industry Research

- Map publicly available indicators by sector
- Build sector reports with cited Canadian sources
- Identify gaps in published government data
- Benchmark Canadian SME and industry coverage

</td>
<td width="50%" valign="top">

#### 🗺️ GIS, Mapping & Environment

- Inventory GeoJSON, Shapefile, KML resources
- Pull environmental and climate file feeds
- Layer federal land-use data into maps
- Source baseline maps for impact assessments

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📰 Journalism & Investigations

- Audit which departments publish what
- Track dataset additions and refresh cadence
- Discover lesser-known transparency releases
- Surface licensing terms across ministries

</td>
<td width="50%" valign="top">

#### 🏛️ Policy & Advocacy

- Aggregate evidence from multiple departments
- Build cross-ministry briefings with citations
- Track open-data publishing commitments
- Pull baseline figures for policy proposals

</td>
</tr>
</table>

***

### 🔌 Automating Canada Open Data Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Weekly or monthly refreshes keep downstream catalogs in sync automatically.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Public-policy theses with reproducible data citations
- Open-data scholarship and dataset inventories
- Cross-country open-government comparisons
- Course exercises on federal data discovery

</td>
<td width="50%">

#### 🎨 Personal and creative

- Dataviz portfolios sourced from Canadian data
- Indie civic dashboards and search interfaces
- Hobby projects on local geography or transit
- Content research for explainer blogs

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- NGO research on social and environmental files
- Civic-tech open-data discovery tools
- Investigative journalism around federal releases
- Community map layers from official sources

</td>
<td width="50%">

#### 🧪 Experimentation

- Train ML models on federally published datasets
- Prototype agents that resolve dataset slugs
- Validate civic-tech product ideas with real metadata
- Build dataset search experiences over open feeds

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20Canada%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20Canada%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20Canada%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20Canada%20Open%20Data%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Configure your mode (catalog walk or single dataset) and optional keyword filter, click Start, and the Actor paginates the open.canada.ca catalog server-side and emits one clean structured record per dataset.

#### 🍁 How many datasets are in the catalog?

More than 36,000 federal datasets, including bilingual metadata in English and French. The exact count changes as departments publish, update, or retire records.

#### 🔁 How often is the catalog refreshed?

Departments publish on their own schedules. Every run of this Actor fetches the latest catalog state in real time, so your dataset always reflects the current portal.

#### 📁 Do I get the actual files or just the links?

You get the resource metadata for every file (name, format, URL, language, size, last-modified). Download the files themselves directly from the URLs in the `resources` field.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (daily, weekly, monthly) and keep a downstream dataset inventory in sync.

#### ⚖️ Is this data legal to use?

The Canadian federal open data portal publishes under the Open Government Licence - Canada, which permits commercial use with attribution. Always review the per-dataset license field returned by this Actor.

#### 💼 Can I use this data commercially?

Yes. The default license is permissive for commercial use. A small number of legacy datasets carry custom terms, which you can read in the `license` field for each record.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🇫🇷 Does it include French-language metadata?

Yes. Tags and keywords are deduplicated across English and French. Resource language is captured per file when the publishing department flagged it.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

Canada Open Data Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe dataset metadata into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push new datasets into your product backend, or alert your team in Slack.

***

### 🔗 Recommended Actors

- [**🇦🇺 Australia Open Data Scraper**](https://apify.com/parseforge/australia-data-gov-au-scraper) - data.gov.au federal, state, and territory dataset catalog
- [**🏛️ FAA Aircraft Registry Scraper**](https://apify.com/parseforge/faa-aircraft-registry-scraper) - U.S. civil aircraft registrations and owners
- [**📈 Indexmundi Scraper**](https://apify.com/parseforge/indexmundi-scraper) - Global demographic and economic indicators
- [**🗺️ Nominatim OSM Scraper**](https://apify.com/parseforge/nominatim-osm-scraper) - Geocode addresses via OpenStreetMap
- [**✈️ OurAirports Scraper**](https://apify.com/parseforge/ourairports-scraper) - Global airport, heliport, and airfield dataset

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the Government of Canada or any federal department or agency. All trademarks mentioned are the property of their respective owners. Only publicly available open government data is collected.

# Actor input Schema

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

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

Catalog walks all datasets. Dataset fetches a single dataset by ID.

## `datasetId` (type: `string`):

Dataset ID (UUID or slug). Required in dataset mode.

## `searchQuery` (type: `string`):

Optional substring filter applied to dataset IDs in catalog mode. Leave blank to walk all datasets.

## Actor input object example

```json
{
  "maxItems": 10,
  "mode": "catalog"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "maxItems": 10,
    "mode": "catalog"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/canada-open-data-scraper").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 = {
    "maxItems": 10,
    "mode": "catalog",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/canada-open-data-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "mode": "catalog"
}' |
apify call parseforge/canada-open-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/canada-open-data-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Canada Open Data Catalog Scraper",
        "description": "Export Canadian government open datasets from open.canada.ca. Browse 36k+ datasets across federal departments. Pull dataset metadata, resources, organization, license, tags, and publication dates. Catalog mode lists all datasets; dataset mode fetches one by ID.",
        "version": "1.0",
        "x-build-id": "3EU7qBDbEHFOsvQRf"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~canada-open-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-canada-open-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~canada-open-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-canada-open-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~canada-open-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-canada-open-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "catalog",
                            "dataset"
                        ],
                        "type": "string",
                        "description": "Catalog walks all datasets. Dataset fetches a single dataset by ID."
                    },
                    "datasetId": {
                        "title": "Dataset ID",
                        "type": "string",
                        "description": "Dataset ID (UUID or slug). Required in dataset mode."
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Optional substring filter applied to dataset IDs in catalog mode. Leave blank to walk all datasets."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
