# Canada Government Contracts API (`lentic_clockss/canada-government-contracts-search`) Actor

Searches Canadian federal procurement data from CanadaBuys via SIP API. Covers open tenders, contract awards, and historical contracts.

- **URL**: https://apify.com/lentic\_clockss/canada-government-contracts-search.md
- **Developed by:** [kane liu](https://apify.com/lentic_clockss) (community)
- **Categories:** Lead generation, MCP servers
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Canada Government Contracts Search — Apify Actor

Search and monitor Canadian federal government procurement data directly from CanadaBuys, Canada's official procurement platform. This Apify Actor gives you structured, on-demand access to open tender notices, contract award notices, and historical contract records published by the Government of Canada. Whether you are a business development professional, a government relations consultant, a data journalist, or a procurement analyst, this tool puts the entire CanadaBuys procurement pipeline at your fingertips — no manual browsing required.

### Why Canada Government Contracts Matter

The Canadian federal government is one of the largest buyers of goods and services in the country, spending tens of billions of dollars annually through public procurement. All of this activity flows through CanadaBuys (formerly GETS/BuyAndSell), the centralized portal managed by Public Services and Procurement Canada (PSPC). Tracking CanadaBuys procurement data is essential for companies that want to win government contracts, researchers studying public spending, and journalists investigating how taxpayer money is allocated.

However, manually searching CanadaBuys is time-consuming and difficult to automate. The web interface is not designed for bulk data extraction or continuous monitoring. This Actor solves that problem by providing a clean, programmable API layer on top of official CanadaBuys data, letting you search across tenders, awards, and contract history with a single keyword query.

### What Data Sources Are Covered

This Actor searches three distinct Canadian federal procurement datasets:

#### Open Tender Notices (CanadaBuys Tenders)

These are active solicitation opportunities published by federal departments and agencies. When the government needs to purchase goods or services, it posts a tender notice on CanadaBuys inviting suppliers to submit bids. This dataset includes Requests for Proposals (RFPs), Requests for Quotations (RFQs), Advance Contract Award Notices (ACANs), and other solicitation types. Each record typically contains the solicitation number, title, description, issuing organization, closing date, commodity classification (GSIN/UNSPSC), and links to the full tender documents.

Searching Canadian federal tenders is the first step for any company looking to do business with the Government of Canada. By monitoring this data source, you can identify new opportunities the moment they are published, giving you maximum time to prepare a competitive bid.

#### Award Notices (CanadaBuys Awards)

Once a tender process concludes, the government publishes an award notice identifying the winning supplier and the contract value. This dataset captures those award records, giving you visibility into who is winning Canada government contracts, how much they are worth, and which departments are awarding them. Award data is invaluable for competitive intelligence — understanding which companies are active in your sector, what price points are winning, and where the spending is concentrated.

For data journalists and transparency advocates, CanadaBuys award notices are a primary source for investigating federal procurement patterns, sole-source contracts, and spending trends across departments.

#### Contract History (CanadaBuys Historical Contracts)

Beyond current tenders and recent awards, this Actor also searches the historical contract database. This includes records of past contracts that may span multiple fiscal years, providing a longitudinal view of Canadian federal procurement. Historical contract data is useful for trend analysis, market sizing, and understanding how government purchasing patterns evolve over time.

Combining all three sources — tenders, awards, and history — gives you a complete picture of the CanadaBuys procurement lifecycle, from opportunity identification through to contract completion.

### Key Features

- **Official CanadaBuys data**: All records are sourced from official Government of Canada procurement publications, ensuring accuracy and completeness.
- **Three data sources in one Actor**: Search open tenders, contract awards, and historical contracts with a single run. Select any combination of sources to fit your use case.
- **Keyword search**: Enter any keyword — a commodity, a technology, a company name, a department — and get matching procurement records across all selected sources.
- **Configurable result limits**: Control how many results you get per source, up to 200 records per source per run.
- **Structured output**: Results are pushed to the Apify dataset in structured JSON format, ready for download, integration, or further processing.
- **Zero competitors on Apify**: As of this writing, this is the only Apify Actor providing direct access to CanadaBuys procurement data. There is no other tool on the Apify platform that covers Canadian federal tenders, awards, and contract history in a single, searchable interface.

### Use Cases

- **Business development**: Identify new Canadian federal tender opportunities matching your products or services. Monitor CanadaBuys daily for new RFPs in your sector.
- **Competitive intelligence**: Track which companies are winning Canada government contracts, in which categories, and at what values.
- **Market research**: Analyze federal procurement spending patterns across departments, commodities, and time periods.
- **Journalism and transparency**: Investigate public spending, sole-source awards, and procurement trends using official CanadaBuys data.
- **Integration and automation**: Feed procurement data into CRMs, dashboards, Slack alerts, or custom pipelines using Apify integrations and webhooks.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| keyword | string | Yes | IT services | Search keyword for procurement records |
| sources | array | No | All three | Which sources to search: tenders, awards, history |
| maxResults | integer | No | 50 | Max results per source (1–200) |

### Output Format

Results are stored in the default Apify dataset. Each record contains the fields returned by the CanadaBuys data source, plus a `_source` field indicating whether it came from tenders, awards, or history. You can download results as JSON, CSV, XML, or Excel, or access them via the Apify API.

### Getting Started

1. Click "Start" on the Actor page or call it via the Apify API.
2. Enter your search keyword (e.g., "cybersecurity", "construction", "cloud computing").
3. Select which data sources to include (default: all three).
4. Set your desired result limit.
5. Run the Actor and retrieve your results from the dataset.

This Actor requires a SIP API key, configured as an environment variable. Set the `SIP_API_KEY` secret in your Apify Actor environment before running.

### About CanadaBuys Procurement Data

CanadaBuys is the Government of Canada's official electronic tendering service, operated by Public Services and Procurement Canada. It replaced the former MERX and BuyAndSell platforms and serves as the single point of access for federal procurement opportunities. All federal departments and agencies are required to publish solicitations above certain thresholds on CanadaBuys, making it the most comprehensive source of Canadian federal procurement data available.

By automating access to CanadaBuys through this Apify Actor, you eliminate the need for manual searches and gain the ability to programmatically monitor, analyze, and act on Canadian government contract opportunities and awards at scale.


### Use as MCP Tool (AI Agent Integration)

This Actor works as an MCP tool — AI agents (Claude, GPT, Cursor) can discover and run it automatically.

#### Quick setup (Claude Desktop / Cursor / VS Code)

Add to your MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
````

Then ask your AI: *"Search for IT consulting in Canadian government contracts"*

#### Direct API call

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("lentic_clockss/canada-government-contracts-search").call(
    run_input={"searchTerms": ["IT consulting"], "maxResultsPerSource": 50}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Other Data API Actors

- [US Government Contracts Data API](https://apify.com/lentic_clockss/us-government-contracts-search)
- [EU Legal & Procurement Data API](https://apify.com/lentic_clockss/sip-eu-legal-procurement-search)
- [UK Government Data API](https://apify.com/lentic_clockss/uk-data-search)

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords to search (e.g. 'IT services', 'construction', 'consulting'). Each term is searched across all 3 CanadaBuys procurement sources in parallel.

## `maxResultsPerSource` (type: `integer`):

Maximum records to return per data source (gateway caps at 200).

## Actor input object example

```json
{
  "searchTerms": [
    "IT services"
  ],
  "maxResultsPerSource": 50
}
```

# Actor output Schema

## `records` (type: `string`):

Canadian government procurement records matching the search query.

# 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 = {
    "searchTerms": [
        "IT services"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/canada-government-contracts-search").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 = { "searchTerms": ["IT services"] }

# Run the Actor and wait for it to finish
run = client.actor("lentic_clockss/canada-government-contracts-search").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 '{
  "searchTerms": [
    "IT services"
  ]
}' |
apify call lentic_clockss/canada-government-contracts-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lentic_clockss/canada-government-contracts-search",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Canada Government Contracts API",
        "description": "Searches Canadian federal procurement data from CanadaBuys via SIP API. Covers open tenders, contract awards, and historical contracts.",
        "version": "0.1",
        "x-build-id": "6dCX2isLCLeGnNU86"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lentic_clockss~canada-government-contracts-search/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lentic_clockss-canada-government-contracts-search",
                "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/lentic_clockss~canada-government-contracts-search/runs": {
            "post": {
                "operationId": "runs-sync-lentic_clockss-canada-government-contracts-search",
                "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/lentic_clockss~canada-government-contracts-search/run-sync": {
            "post": {
                "operationId": "run-sync-lentic_clockss-canada-government-contracts-search",
                "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",
                "required": [
                    "searchTerms"
                ],
                "properties": {
                    "searchTerms": {
                        "title": "Search terms",
                        "type": "array",
                        "description": "Keywords to search (e.g. 'IT services', 'construction', 'consulting'). Each term is searched across all 3 CanadaBuys procurement sources in parallel.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResultsPerSource": {
                        "title": "Max results per source",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum records to return per data source (gateway caps at 200).",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
