# Canada Federal Grants and Contributions Scraper (`publicmoney/canada-grants-contributions-scraper`) Actor

Extract Canadian federal grant and contribution awards from open.canada.ca proactive disclosure: recipient, department, programme, agreement value, start and end dates, description and every other published column.

- **URL**: https://apify.com/publicmoney/canada-grants-contributions-scraper.md
- **Developed by:** [Public Money](https://apify.com/publicmoney) (Apify)
- **Categories:** Business
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.00 / 1,000 grants

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

This Actor reads the Government of Canada's proactive disclosure of grants and contributions: the grant, contribution and other transfer payment agreements federal departments report. It returns one record per published row (an original agreement or one of its amendments), newest agreement start date first, with every column the publisher releases.

### Source

- Dataset: [Proactive Disclosure - Grants and Contributions](https://open.canada.ca/data/en/dataset/432527ab-7aac-45b5-81d6-7597107a7013) on open.canada.ca.
- Read through the CKAN datastore API (`datastore_search`) on the dataset's full table, resource `1d15a62f-5656-49ad-8c88-f40ce689d831`: 1,327,098 rows on 2026-10-04. If that resource stops answering, the Actor reads the dataset and uses its largest datastore table.
- No API key, no proxy.

### Input

| Field | Type | Default | What it controls |
| --- | --- | --- | --- |
| `dateFrom` | string | empty | Earliest agreement start date, YYYY-MM-DD. Server-side |
| `dateTo` | string | empty | Latest agreement start date, YYYY-MM-DD. Server-side |
| `recipient` | string | empty | Words matched against the recipient's legal name. All words must match. Server-side |
| `department` | string | empty | Words matched against the funding department's name, e.g. `transport`. Server-side |
| `keyword` | string | empty | Words matched against the English agreement title. All words must match. Server-side |
| `minValue` | integer | empty | Minimum agreement value in CAD. Applied after fetching |
| `maxValue` | integer | empty | Maximum agreement value in CAD. Applied after fetching |
| `maxItems` | integer | `500` | Caps how many records are returned, and so what the run costs. `0` for everything |
| `schemaOrg` | boolean | `false` | Appends a schema.org `MonetaryGrant` block to each record |

```json
{
    "dateFrom": "2025-04-01",
    "dateTo": "2026-03-31",
    "department": "natural resources",
    "maxItems": 500
}
```

### Output

One dataset item per published row, with the publisher's own column names:

| Group | Fields |
| --- | --- |
| Identity | `ref_number`, `amendment_number`, `amendment_date`, `agreement_number`, `_id` |
| Agreement | `agreement_type`, `agreement_title_en`, `agreement_title_fr`, `agreement_value`, `foreign_currency_type`, `foreign_currency_value`, `agreement_start_date`, `agreement_end_date`, `coverage` |
| Recipient | `recipient_type`, `recipient_business_number`, `recipient_legal_name`, `recipient_operating_name`, `research_organization_name`, `recipient_country`, `recipient_province`, `recipient_city`, `recipient_postal_code`, `federal_riding_name_en`, `federal_riding_name_fr`, `federal_riding_number` |
| Programme | `prog_name_en`, `prog_name_fr`, `prog_purpose_en`, `prog_purpose_fr`, `description_en`, `description_fr`, `naics_identifier`, `expected_results_en`, `expected_results_fr`, `additional_information_en`, `additional_information_fr` |
| Department | `owner_org`, `owner_org_title` |
| Added | `recordUrl`, `scrapedAt` |

```json
{
    "ref_number": "199-2019-2020-Q4- CSGC16725277",
    "amendment_number": "0",
    "agreement_type": "G",
    "recipient_legal_name": "Carleton University",
    "recipient_province": "ON",
    "prog_name_en": "Advancing Accessibility Standards Research",
    "agreement_title_en": "Transition Into, Within, and Out of Federal Public Service",
    "agreement_value": "478593.0",
    "agreement_start_date": "2020-03-24",
    "agreement_end_date": "2021-03-29",
    "owner_org": "casdo-ocena",
    "owner_org_title": "Accessibility Standards Canada | Normes d’accessibilité Canada",
    "recordUrl": "https://search.open.canada.ca/grants/record/casdo-ocena%2C199-2019-2020-Q4-%20CSGC16725277%2Ccurrent"
}
```

### Verified behaviour (2026-10-04)

- `datastore_search_sql` is disabled on this portal (HTTP 400, "Action name not known"), so every filter goes through `datastore_search`.
- A plain full-text `q` is refused on this table ("Full text search is not supported for data with more than 100000 rows"). Per-column search works and is what `recipient`, `department` and `keyword` use: word match, words ANDed, filters ANDed with each other.
- The date filter is sent as the list of days in the range, in windows of a year, newest first. March 2025 matched 7,134 rows; a 1800 range matched 0.
- `agreement_value` is a text column in CAD, so `minValue` and `maxValue` are applied after fetching. A narrow value band on a wide window reads more rows than it returns.
- Rows with no `agreement_start_date` cannot match a date filter.
- Some start dates are in the future (2027-01-01 was the newest on 2026-10-04) or placeholder values (1899-12-30 was the oldest). They are returned as published.
- Values are returned as the source writes them: `agreement_value` is text (`"478593.0"`, `"2500"`), and bilingual names are joined with `|` where the publisher did so.
- `recordUrl` points to the agreement's page on search.open.canada.ca, which shows its current amendment. It was checked against live records and a bogus id renders a different page.

### Cost

Pay per event: one `grant-scraper` event ("Grant") per record written, tiered $2.00 to $0.70 per 1,000, plus the Apify actor-start event. **Max items** is the hard cap.

# Actor input Schema

## `dateFrom` (type: `string`):

Earliest agreement start date, in YYYY-MM-DD form. Examples: '2026-01-01', '2024-04-01'. Leave empty for the whole history.

## `dateTo` (type: `string`):

Latest agreement start date, in YYYY-MM-DD form. Examples: '2026-09-30', '2025-03-31'. Leave empty for everything up to the newest disclosure.

## `recipient` (type: `string`):

Words matched server-side against the recipient's legal name. Several words must all match. Examples: 'carleton', 'city', 'university toronto'. Leave empty for every recipient.

## `department` (type: `string`):

Words matched server-side against the funding department's name. Examples: 'transport', 'natural resources', 'agriculture'. Leave empty for every department.

## `keyword` (type: `string`):

Words matched server-side against the English agreement title. Several words must all match. Examples: 'hydrogen', 'green hydrogen', 'housing'. Leave empty for every agreement.

## `minValue` (type: `integer`):

Returns only agreements worth at least this amount in CAD. Examples: 25000, 1000000. Leave empty for every value.

## `maxValue` (type: `integer`):

Returns only agreements worth at most this amount in CAD. Examples: 10000, 500000. Leave empty for every value.

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

Caps how many records are written to the dataset, and so caps the cost. Examples: 1, 500, 5000. Set to 0 for everything matched. Default is 500.

## `schemaOrg` (type: `boolean`):

Appends a `schemaOrg` object to the end of every record, mapping it to schema.org (Demand for tenders, MonetaryGrant for grants, Invoice for payments). The record's own fields are not changed. Off by default. Charged once per run, not per record.

## Actor input object example

```json
{
  "maxItems": 500,
  "schemaOrg": false
}
```

# Actor output Schema

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

Grant and contribution records matched by the run, one item per record, in 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 = {
    "maxItems": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("publicmoney/canada-grants-contributions-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": 500 }

# Run the Actor and wait for it to finish
run = client.actor("publicmoney/canada-grants-contributions-scraper").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 '{
  "maxItems": 500
}' |
apify call publicmoney/canada-grants-contributions-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,publicmoney/canada-grants-contributions-scraper"
        }
    }
}
```

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/bQj67VzS1vWUfDxrP/builds/bIAOJPpDmImpcwEw1/openapi.json
