# CanadaBuys Tender Monitor (`flamelit_constellation/canadabuys-tenders`) Actor

Unofficial tool, not affiliated with the Government of Canada/PSPC. Get only new and amended CanadaBuys tender notices since your last run. Open Government Licence – Canada.

- **URL**: https://apify.com/flamelit_constellation/canadabuys-tenders.md
- **Developed by:** [Two Five Labs](https://apify.com/flamelit_constellation) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 new or amended records

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

## CanadaBuys Tender Monitor

**Not affiliated with or endorsed by the Government of Canada or Public Services and Procurement Canada (PSPC), including CanadaBuys.** This is an independent tool from Two Five Labs that reads publicly available data. No government seals or logos are used.

### What it does

Downloads the CanadaBuys new-tender-notices CSV (one file per run) and returns only notices that are new or changed since your last run. You can filter by look-back window, title keyword and UNSPSC code.

### Who it's for

Suppliers that bid on Government of Canada tenders.

### Input

| Field | Description |
|---|---|
| `lookbackDays` | integer, default 4. Drops notices published earlier. |
| `ignoreLookback` | boolean, default false. Keep all notices in the file. |
| `keywords` | list. Matches the title (case-insensitive). |
| `includeDescriptions` | boolean, default false. Off: no free-text description is output. On: the description is added in `extra.description`, trimmed to remove contact names (marked `[contact details removed]`). |
| `unspsc` | list. Matches the notice's UNSPSC codes. |
| `maxSpendUsd`, `emitUnchanged`, `stateStoreName` | see "How runs work". |

No API key is needed for this source.

### Run it via API

```bash
curl -X POST "https://api.apify.com/v2/acts/flamelit_constellation~canadabuys-tenders/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"maxSpendUsd": 1.0}'
```

Use your own Apify token.

### How runs work

- **First run:** returns every matching record in the look-back window, all marked `changeType: "new"`.
- **Later runs:** return only records that are new, or whose content changed since they were last seen (`amended`). The actor keeps a content hash per record in a key-value store. A second run over the same data outputs nothing.
- `stateStoreName`: give each saved search its own name so each one tracks its own history.
- `emitUnchanged: true` also outputs unchanged records (`changeType: "same"`), which are never charged.
- **Spend cap:** `maxSpendUsd` (default 1.0) is a hard cap. When it is reached, the actor stops charging and stops output. Records not yet output are kept for the next run.
- **Errors and rate limits:** network errors, HTTP 429 and 5xx responses are retried up to 3 times with backoff. `Retry-After` is honoured in both its seconds and date forms; if the source asks for a wait longer than 2 minutes, the run stops instead of waiting.

### Output

Tender record: `id, source ("canadabuys"), title, buyer, region, value (null), currency ("CAD"), posted, deadline, url, changeType, extra{solicitationNumber, unspsc[], procurementCategory[], attribution, description (only when `includeDescriptions` is on; trimmed, max 1,000 chars)}`.

Excerpt from a live run:

```json
{
 "id": "cb-114-38058425",
 "source": "canadabuys",
 "title": "Spare Parts for Material Handling Equipment 5",
 "buyer": "Department of National Defence (DND)",
 "region": "Montréal",
 "currency": "CAD",
 "posted": "2026-10-14T00:00:00.000Z",
 "deadline": "2026-10-29T14:00:00.000Z",
 "url": "https://canadabuys.canada.ca/en/tender-opportunities/tender-notice/cb-114-38058425",
 "changeType": "new",
 "extra": {
  "solicitationNumber": "W8486-270976/B",
  "unspsc": [
   "24100000"
  ],
  "procurementCategory": [
   "GD"
  ],
  "attribution": "Contains information licensed under the Open Government Licence – Canada. https://open.canada.ca/en/open-government-licence-canada"
 }
}
```

**Personal data:** contact name, email and phone columns are not output. Descriptions are off by default. If you turn them on: emails and phone numbers are masked, and descriptions are trimmed to remove contact names. Contact names after role labels are removed; other names in free text may remain. Long descriptions may be shortened, sometimes before any contact details, to remove contact names. The licence excludes Personal Information. File and reference numbers are kept.

### Pricing

Pay per event: one `run-start` charge per run and one `new-item` charge per new or amended record output. Current prices are shown on this actor's Apify Store page.

### Limits

- One CSV download per run. The file is refreshed daily, so schedule runs no more than once a day.

### Data source and terms

- Contains information licensed under the Open Government Licence – Canada (`https://open.canada.ca/en/open-government-licence-canada`). Each record carries this in `extra.attribution`.
- Dataset publisher: Public Services and Procurement Canada. No Government of Canada names, crests or logos are used to suggest official status.
- **Not affiliated with or endorsed by the Government of Canada or Public Services and Procurement Canada (PSPC), including CanadaBuys.**

### FAQ

**Does it return every record?** The first run returns everything matching. After that it returns only new or changed records.
**How often should I run it?** Daily is enough.
**Can I cap spend?** Yes. `maxSpendUsd` is a hard cap, and records it stops are output on the next run.
**Does it need a key?** No.

### Support

Questions or problems: please use the Issues tab on this actor's Apify page first.
Publisher: Two Five Labs, contact `twofivelabs@gmail.com`.

Requests to the source identify themselves with a contact address: `flamelit-constellation-actors/0.1 (+mailto:twofivelabs@gmail.com)`.

# Actor input Schema

## `includeDescriptions` (type: `boolean`):

Off by default. If on, the notice description is included in extra.description, trimmed at the first contact detail (role label, initials, name pattern) with "\[contact details removed]". Descriptions are free text written by buyers and may still contain personal names that the trimming misses; leave off unless you need them.

## `lookbackDays` (type: `integer`):

Only include notices published within this many days. The source file lists all open tenders; this keeps runs focused on recent ones.

## `keywords` (type: `array`):

Only include notices whose English title contains at least one of these words (case-insensitive).

## `unspsc` (type: `array`):

Only include notices with one of these UNSPSC codes. Trailing zeros act as a prefix, e.g. 24100000 matches 241xxxxx.

## `ignoreLookback` (type: `boolean`):

If on, include every notice in the file regardless of publication date (useful for a first full load).

## `maxSpendUsd` (type: `number`):

Hard spending cap for this run, in US dollars. The actor stops charging and stops adding results once this amount is reached. Unsent items are kept for the next run.

## `emitUnchanged` (type: `boolean`):

If on, items already seen in earlier runs (changeType "same") are also output. Off by default, so you only get new and amended items. Unchanged items are never charged.

## `stateStoreName` (type: `string`):

Optional name of the key-value store that remembers what earlier runs saw. Use a different name per saved search so each search tracks its own new/amended items. Leave empty to use the run's default store.

## `fixturePath` (type: `string`):

Testing only. Path to a local file to replay instead of calling the live source. Leave empty for normal use.

## Actor input object example

```json
{
  "includeDescriptions": false,
  "lookbackDays": 4,
  "keywords": [],
  "unspsc": [],
  "ignoreLookback": false,
  "maxSpendUsd": 1,
  "emitUnchanged": false
}
```

# Actor output Schema

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

Tender records (new and amended only)

# 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 = {
    "lookbackDays": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("flamelit_constellation/canadabuys-tenders").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 = { "lookbackDays": 4 }

# Run the Actor and wait for it to finish
run = client.actor("flamelit_constellation/canadabuys-tenders").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 '{
  "lookbackDays": 4
}' |
apify call flamelit_constellation/canadabuys-tenders --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,flamelit_constellation/canadabuys-tenders"
        }
    }
}
```

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/kE6tGeikRsfsO6YFZ/builds/Kkfs8Nw27AxYYjudm/openapi.json
