# CanadaBuys Federal Tenders, RFPs & Contract Awards (`groundplanes/canadabuys-federal-tender-award-scraper`) Actor

Scrape official Public Services and Procurement Canada (PSPC) CanadaBuys open data feeds for Canadian federal tender notices, RFPs, and contract awards. Streaming bilingual CSV parser with UNSPSC and delivery region filtering.

- **URL**: https://apify.com/groundplanes/canadabuys-federal-tender-award-scraper.md
- **Developed by:** [Groundplane Labs](https://apify.com/groundplanes) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 1,000 tender records

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

## CanadaBuys Federal Tenders, RFPs & Contract Awards

Stream and extract official Canadian federal public sector tender notices, requests for proposals (RFPs), and awarded contracts directly from Public Services and Procurement Canada (PSPC) CanadaBuys open data feeds under the Open Government Licence.

> This actor is an independently developed tool and is not affiliated with, endorsed by, or sponsored by Public Services and Procurement Canada (PSPC) or the Government of Canada.

### What it does

- **Canadian Federal Procurement Feeds:** Continuously streams official open data CSV feeds from CanadaBuys, including active solicitations (`OPEN_TENDERS`), daily updates (`NEW_AND_AMENDED_TODAY`), and awarded contracts (`CONTRACT_AWARDS_HISTORY`).
- **Memory-Efficient Streaming Architecture:** Processes large multi-megabyte CSV feeds record-by-record via an asynchronous streaming reader without loading entire files into memory.
- **Bilingual English and French Support:** Emits titles, department names, and statuses in your preferred official language (`EN`, `FR`, or `BOTH`), with automatic fallback ensuring zero dropped notices.
- **UNSPSC & Commodity Filtering:** Filter notices by commodity keywords matching UNSPSC descriptions or titles across IT, software, engineering, construction, and medical categories.
- **Regional & Category Segmentation:** Narrow solicitations by Canadian provinces, territories, the National Capital Region (NCR), and procurement category codes (`SRV` for services, `GD` for goods, `CNST` for construction).
- **Government Contact Officer Directory:** Captures published contracting authority contact officers, official email addresses, and phone numbers as designated in public notices.
- **Built-in Monitor Mode:** Optional `onlyNewSinceLastRun` maintains a persistent seen list across runs so recurring tasks deliver only newly published notices.

### Who it is for

- **Canadian Government Contractors & Captures:** Track upcoming bidding opportunities across federal departments and Crown corporations.
- **US & Global GovCon Suppliers:** Leverage WTO-AGP, CUSMA, and CETA trade agreement provisions to identify addressable Canadian public sector tenders.
- **IT & Professional Services Consultancies:** Monitor Shared Services Canada (SSC) and PSPC solicitations for cloud, cybersecurity, and engineering services.
- **Competitive Intelligence Analysts:** Analyze federal contract awards, supplier selections, and total awarded contract values in Canadian dollars (CAD).

### Source & Update Cadence

- **Source:** Official Public Services and Procurement Canada open data feeds (`https://canadabuys.canada.ca/opendata/pub/`) published under the Open Government Licence - Canada. Feed URLs are resolved at run time from the Government of Canada Open Data (CKAN) index, so a renamed file is picked up from the index instead of failing on a stale hardcoded path.
- **Cadence:** Records reflect data as published in the latest open data file, never live notices. Per the CKAN index, the tender notice datasets refresh daily and the contract history dataset refreshes monthly.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `feedSelection` | string (select) | `"OPEN_TENDERS"` | CanadaBuys feed to query: `OPEN_TENDERS`, `NEW_AND_AMENDED_TODAY`, or `CONTRACT_AWARDS_HISTORY`. |
| `unspscCategoryKeywords` | array of string | `["Information Technology", "Software", "Engineering", "Medical"]` | Commodity keywords matching UNSPSC descriptions or titles. |
| `deliveryRegions` | array of string | `["Ontario", "British Columbia", "Quebec", "Alberta", "National Capital Region"]` | Canadian delivery provinces or opportunity regions. |
| `procurementCategories` | array of string | `["SRV", "GD", "CNST"]` | Procurement categories: SRV (Services), GD (Goods), CNST (Construction). Source rows carrying the fused services-and-goods token SRVTGD count as both SRV and GD, so selecting SRV or GD includes them. |
| `preferredLanguage` | string (select) | `"EN"` | Language selection: `EN` (English), `FR` (French), or `BOTH`. |
| `onlyNewSinceLastRun` | boolean | `false` | When true, emits only newly seen notices since previous run. |
| `maxItems` | integer | `1000` | Maximum number of records to return. |

#### Labeled Canary Input

```json
{
  "feedSelection": "NEW_AND_AMENDED_TODAY",
  "unspscCategoryKeywords": ["Services", "Software", "Support", "Systems", "Medical", "Engineering", "Waste"],
  "deliveryRegions": ["Ontario", "Quebec", "British Columbia", "Alberta", "National Capital Region"],
  "procurementCategories": ["SRV", "GD", "CNST"],
  "preferredLanguage": "EN",
  "onlyNewSinceLastRun": false,
  "maxItems": 5
}
```

### Output

One row per tender notice or contract award.

| Field | Type | Description |
|---|---|---|
| `referenceNumber` | string | Unique CanadaBuys reference number (e.g. cb-629-72290055). |
| `solicitationNumber` | string or null | Federal department solicitation or tender number. |
| `title` | string | Notice or contract award title in selected language. |
| `noticeStatus` | string or null | Current tender status (e.g. Open, Expired, Awarded). |
| `procurementCategory` | string or null | Procurement category codes (SRV, GD, CNST), comma-joined when a notice carries several codes. The fused source token SRVTGD is emitted expanded as SRV,GD. |
| `unspscCodes` | array of string | 8-digit UNSPSC commodity codes. |
| `contractingEntityName` | string or null | Name of contracting department or agency. |
| `deliveryRegions` | array of string | Canadian delivery provinces or opportunity regions. |
| `publicationDate` | string | Date notice or contract was published (YYYY-MM-DD). |
| `closingDateIso` | string or null | Submission closing date/time in ISO format. Null on contract awards: the contract history feed publishes no tender closing date. |
| `contactOfficerName` | string or null | Designated contracting authority contact officer name. |
| `contactOfficerEmail` | string or null | Contracting authority contact email address. |
| `contactOfficerPhone` | string or null | Contact officer phone number. |
| `tradeAgreementsApplicable` | array of string | Trade agreements applicable to procurement (e.g. CFTA, CETA). |
| `awardedSupplierName` | string or null | Legal name of awarded supplier (for contract awards). |
| `awardedValueCad` | number or null | Total awarded contract value in CAD (for contract awards). |
| `noticeUrl` | string or null | Link to CanadaBuys public tender page. Null on contract awards: the contract history feed does not publish a notice URL. |

#### Sample Row (Real Live CanadaBuys Data)

```json
{
  "referenceNumber": "cb-629-72290055",
  "solicitationNumber": "21120-26-5334504/A",
  "title": "Simulation‑Based Nursing Education Services (SIMS), Ontario Region",
  "noticeStatus": "Open",
  "procurementCategory": "SRV",
  "unspscCodes": [
    "42300000",
    "42301500",
    "86101605"
  ],
  "contractingEntityName": "Correctional Service of Canada (CSC)",
  "deliveryRegions": [
    "Ontario (except NCR)"
  ],
  "publicationDate": "2026-10-26",
  "closingDateIso": "2026-11-17T14:00:00",
  "contactOfficerName": "Sylvie Gallant",
  "contactOfficerEmail": "Sylvie.Gallant@csc-scc.gc.ca",
  "contactOfficerPhone": "(506) 378-8724",
  "tradeAgreementsApplicable": [
    "None"
  ],
  "awardedSupplierName": null,
  "awardedValueCad": null,
  "noticeUrl": null
}
```

### Troubleshooting & Data Notes

- **Data Freshness:** Solicitations are delivered as published in the latest open data file released by PSPC. Tender notice files refresh daily; the contract history file refreshes monthly, so award records can lag the tender notices.
- **Monitor Mode:** `onlyNewSinceLastRun` diffs on `referenceNumber` only. A new amendment record published under an already-seen reference number is treated as seen and is not re-emitted.
- **Zero Matches:** A healthy feed with no rows matching your filters ends as `Complete: 0 notices matched your filters`, which is a success, not an error. An empty or header-only feed fails loudly instead.
- **Download integrity floors:** Each feed has a minimum record count this actor treats as a complete file: 5 for NEW_AND_AMENDED_TODAY, 50 for OPEN_TENDERS, and 50 for CONTRACT_AWARDS_HISTORY. A complete scan that ends below its floor fails the run. The failure message states the actual count and the floor: the file was read to its end, so a below-floor result can be a genuinely quiet day (realistic for the same-day NEW_AND_AMENDED_TODAY feed, especially around holidays) rather than an incomplete file. If a NEW_AND_AMENDED_TODAY run fails this way on a quiet day, re-run with OPEN_TENDERS: the same notices are published in that feed, so no records are lost.
- **Mixed encoding:** A feed file is expected in one encoding (UTF-8 or Latin-1). If a file mixes the two, the affected lines are recovered and emitted, and the run ends as PARTIAL naming the number of mixed-encoding lines instead of completing with garbled text.
- **Multilingual Fallback:** Some regional Canadian tender notices are filed primarily in one official language. When an English or French title is unavailable, the actor falls back to the alternate official language and reports the fallback count in the execution log.
- **Contact Details:** Contact officer names, emails, and phone numbers are public contracting contact points published by the Government of Canada under the Open Government Licence.

If this keeps happening, please open an issue on this actor's Issues tab and we'll fix it fast.

### Changelog

- **0.1.2 (2026-11-02):** Red Team fix round. Fused procurement category tokens (SRVTGD and any fused combination of the known codes) expand to the codes they carry, so they match the documented SRV, GD, and CNST filters, and filter-excluded rows are counted in the run status. A duplicated core header column now fails loudly instead of silently overwriting values. Mixed UTF-8 and Latin-1 files are recovered line by line and disclosed as PARTIAL instead of garbling the rest of the file. The download integrity floors (5, 50, 50) are disclosed in Troubleshooting, and a below-floor failure no longer labels a quiet day as truncation. Two contract columns no code reads are no longer core sentinel columns.
- **0.1.1 (2026-11-02):** CEO review fixes. Feed downloads now retry on 429/5xx with the fleet standard (6 tries, jittered backoff, Retry-After honored) and resolve URLs from the CKAN index. Header sentinel expanded to every core column per feed. publicationDate and closingDateIso no longer fall back to other date fields. Multi-code procurement categories, comma-delimited UNSPSC lists, Latin-1 encoded files, and corrupt or truncated records are handled honestly (counted, PARTIAL, or loud failure). Monitor mode store name fixed so monitor runs start. Contract history cadence corrected to monthly.
- **0.1 (2026-11-01):** Initial release. Streaming CSV reader for CanadaBuys open data feeds, bilingual support, UNSPSC keyword filtering, and contract awards extraction.

# Actor input Schema

## `deliveryRegions` (type: `array`):

Filter by Canadian province, territory, or delivery region (e.g. Ontario, British Columbia, Quebec, Alberta, National Capital Region). Empty queries all.

## `feedSelection` (type: `string`):

CanadaBuys open data feed to query: OPEN_TENDERS (active solicitations), NEW_AND_AMENDED_TODAY (daily updates), or CONTRACT_AWARDS_HISTORY (awarded contracts).

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

Maximum number of records to return.

## `onlyNewSinceLastRun` (type: `boolean`):

When true, maintains a persistent seen list across runs and emits only newly published reference numbers. Seen list only advances on complete runs.

## `preferredLanguage` (type: `string`):

Language selection for notice titles, descriptions, and regional details: EN, FR, or BOTH.

## `procurementCategories` (type: `array`):

Procurement category codes: SRV (Services), GD (Goods), CNST (Construction). Source rows carrying the fused services-and-goods token SRVTGD count as both SRV and GD, so selecting SRV or GD includes them.

## `unspscCategoryKeywords` (type: `array`):

Filter by commodity keywords matching UNSPSC descriptions or titles (e.g. Information Technology, Software, Engineering, Medical). Empty queries all.

## Actor input object example

```json
{
  "deliveryRegions": [
    "Ontario",
    "British Columbia",
    "Quebec",
    "Alberta",
    "National Capital Region"
  ],
  "feedSelection": "OPEN_TENDERS",
  "maxItems": 1000,
  "onlyNewSinceLastRun": false,
  "preferredLanguage": "EN",
  "procurementCategories": [
    "SRV",
    "GD",
    "CNST"
  ],
  "unspscCategoryKeywords": [
    "Information Technology",
    "Software",
    "Engineering",
    "Medical"
  ]
}
```

# Actor output Schema

## `results` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("groundplanes/canadabuys-federal-tender-award-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("groundplanes/canadabuys-federal-tender-award-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 '{}' |
apify call groundplanes/canadabuys-federal-tender-award-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,groundplanes/canadabuys-federal-tender-award-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/QshoeWMEJ1GEPM7EX/builds/jg4s2vYdUVfbn0Vqv/openapi.json
