# Government Contract Watch Scraper (`parseforge/us-gov-contract-watch-scraper`) Actor

Watch open government contract opportunities from SAM.gov, CanadaBuys and UK Contracts Finder in one feed. Each notice comes with its closing date, buyer, description and direct links to the bid documents, plus a new-or-changed-since-last-run mode for scheduled watches.

- **URL**: https://apify.com/parseforge/us-gov-contract-watch-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Government Contract Watch Scraper

**Track open government contract opportunities from SAM.gov, CanadaBuys and UK Contracts Finder in one feed, with their closing dates and their bid documents.** Every notice comes as a flat row with the buyer, the deadline, the notice type, the description and direct links to the RFP, SOW and addenda where the portal publishes them. No API key, no login. Export to CSV, JSON, Excel, or XML.

Opportunities are scattered across three national portals, each with its own search, its own export limits and its own idea of what "open" means. This Actor queries all three from one search term, drops the notices whose deadline has already passed, and returns what is left in a single schema. It can also remember what it has already given you, so a daily schedule returns only what is new or has been amended.

| Who uses it | What they watch it for |
|---|---|
| Real estate and facilities teams | Government space, lease and fit-up solicitations before the deadline |
| Bid managers | New opportunities in their category across the US, Canada and the UK |
| Sales teams | A qualified pipeline of public-sector work with contacts attached |
| Market researchers | Which agencies are buying what, and on what timeline |

### What it does

- 🔍 **One search across three portals:** SAM.gov for US federal opportunities, CanadaBuys for Canadian tenders, UK Contracts Finder for British notices.
- 📎 **Bid documents:** turn on **Include bid documents** and each notice comes back with its attachment list: filename, file type, size and a direct download link. A live US Army office-space solicitation in Nashville returns fourteen of them, including the RLP, the sample lease and the design criteria.
- ⏰ **Deadlines you can trust:** every source keeps notices flagged open whose deadline has already passed. In a measured run, nine rows out of twenty-one. With **Open opportunities only** on, those are dropped.
- 🔔 **New or changed only:** the Actor remembers every notice it has delivered and, on the next run, returns only what is new or has been amended since. Schedule it daily and you are billed for the new work, not for the same list again.
- 🎯 **NAICS filter:** narrow the US results to one code. 531190 is Lessors of Other Real Estate Property.
- 📊 **One schema for three countries:** source, country, title, buyer, closing date, notice type, solicitation number, description, attachments, and the notice URL.

### What you can do with it

**🏢 Watch for government space requirements.**

Search `office lease`, filter to NAICS 531190, and schedule it daily. You get GSA and agency solicitations for space, with the response deadline, the place of performance down to the ZIP code, and the lease exhibits attached.

**📌 Never miss an amendment.**

The watch keys on the notice's last-modified date, so an amended solicitation comes back as new rather than staying hidden behind the version you already saw.

**📥 Feed a bid library.**

Every attachment row carries a direct link, so the documents can be pulled straight into your own storage.

**🌍 Compare across borders.**

The same keyword runs against all three portals in one call, so a category can be sized across the US, Canada and the UK without three integrations.

### Sources

| Source | What it returns | Bid documents |
|---|---|---|
| **SAM.gov** | Open US federal opportunities: presolicitations, solicitations, combined synopses and sources sought, with response deadline, place of performance and NAICS | Yes, the full attachment list |
| **CanadaBuys** | Every open Canadian tender from the official open-data extract, with closing date, contracting entity, contact email and UNSPSC codes | Yes, where the notice hosts them. Around four in ten do |
| **UK Contracts Finder** | British notices from the OCDS feed, with value, CPV code, buyer and tender period | Sometimes. The feed carries documents on roughly one notice in twelve |
| USAspending *(opt-in)* | US federal contracts that were **already awarded**. Market intelligence, not opportunities | No |
| USITC HTS *(opt-in)* | Tariff schedule lines. Trade reference data, not tenders | No |
| CBP CROSS *(opt-in)* | Customs rulings. Trade reference data, not tenders | No |

### Configure the run

The Input tab lists every parameter. **maxItems is the total for the run**, shared evenly across the sources you select. Earlier builds applied it per source, so five sources at 200 could quietly bill 1,000 rows.

Office space opportunities with their documents:

```json
{
 "query": "office lease",
 "sources": ["samgov", "canadabuys", "contractsfinder"],
 "maxItems": 60,
 "openOnly": true,
 "includeAttachments": true
}
```

A daily watch that only returns what is new:

```json
{
 "query": "office lease",
 "sources": ["samgov", "canadabuys"],
 "maxItems": 100,
 "openOnly": true,
 "includeAttachments": true,
 "onlyNewOrChanged": true,
 "watchKey": "office-space"
}
```

US federal real estate only, by NAICS:

```json
{
 "query": "",
 "sources": ["samgov"],
 "naicsCode": "531190",
 "maxItems": 100,
 "openOnly": true,
 "includeAttachments": true
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

With **New or changed only** on, a scheduled run bills for the handful of new notices rather than for the whole list each time.

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Government Contract Watch Scraper](https://apify.com/parseforge/us-gov-contract-watch-scraper?fpr=vmoqkp).
3. Set your search term and sources, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/us-gov-contract-watch-scraper"
```

### Troubleshooting

**A source returned fewer rows than my share of maxItems.**

That source ran out of matches. UK Contracts Finder is the usual one: its feed has no server-side keyword search, so the Actor scans the most recent notices and filters locally within a time budget. A rare keyword will find fewer.

**Why is my watch returning nothing?**

That is the watch working. It returns only notices it has not delivered before under that watch name. Change the watch name, or turn the mode off, to get the full list again.

**Two schedules are hiding each other's results.**

Give them different watch names. Watches with the same name share one memory of what has been delivered.

**Why do some notices have no attachments?**

Not every notice publishes its documents on the portal. Many Canadian ones point bidders at MERX or Ariba instead, and those rows carry an `externalNoticeUrl` you can follow.

**The run takes longer with bid documents on.**

SAM.gov needs one extra request per notice for its attachment list and one for the full description, so a large pull with documents on is slower than one without.

### FAQ

| Question | Answer |
|---|---|
| Do I need an API key? | No. All three portals are read through public endpoints with no registration. |
| Are these open opportunities or past awards? | Open opportunities, by default. USAspending is available as an opt-in source and returns contracts that were already awarded. |
| Does it return the closing date? | Yes, on every source, with the time zone where the portal publishes one. |
| Can I download the bid documents? | The Actor returns direct links with filename, type and size. Fetching the files themselves is up to you. |
| How does the watch decide something changed? | It keys on the notice id plus its last-modified or amendment date, so an amended notice comes back as new. |
| Can I filter by location? | US results carry the place of performance with city, state and ZIP, Canadian ones carry the regions of delivery, and you can filter the exported dataset on those. The NAICS filter narrows the US source directly. |
| What export formats are supported? | CSV, JSON, Excel, or XML from the Apify platform. |
| Is this legal? | All three portals publish this information for public use. This Actor accesses only publicly available data. |

### Related actors

- [CanadaBuys Federal Tenders Scraper](https://apify.com/parseforge/canadabuys-tenders-scraper?fpr=vmoqkp) for the Canadian source on its own, with the full notice record.
- [SAM.gov Contract Opportunities Scraper](https://apify.com/parseforge/sam-gov-contracts-scraper?fpr=vmoqkp) for US federal opportunities on their own.

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by the US General Services Administration, Public Services and Procurement Canada, or the UK Cabinet Office. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL.

# Actor input Schema

## `query` (type: `string`):

Free-text keyword applied to every selected source. Leave empty to return everything the sources publish.

## `sources` (type: `array`):

Which portals to query. The default is the three tender sources. USAspending returns contracts that were already awarded, and the last two are trade reference data rather than tenders, so they are opt-in.

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

Total rows for the whole run, shared across every selected source. This is a change from earlier builds, where the limit applied per source and five sources at 200 could bill 1,000 rows.

## `openOnly` (type: `boolean`):

Skip closed, cancelled and already-awarded notices.

## `includeAttachments` (type: `boolean`):

Return the RFP, SOW and addenda file links for each notice that publishes them, with filename, type and size. CanadaBuys and UK Contracts Finder carry them in the feed. SAM.gov needs one extra request per notice, so runs take longer with this on.

## `onlyNewOrChanged` (type: `boolean`):

Remembers every notice already delivered and returns only what is new or has been amended since. Turn this on for a scheduled watch so you are not billed for the same list every day.

## `watchKey` (type: `string`):

Keeps separate watches apart. Two schedules with different search terms should use different names so they do not hide each other's results.

## `naicsCode` (type: `string`):

Narrow the US federal results to one NAICS code. 531190 is Lessors of Other Real Estate Property, 236220 is Commercial Building Construction.

## `proxyConfiguration` (type: `object`):

CanadaBuys blocks unproxied datacenter addresses, so a proxy is required. The default is fine.

## Actor input object example

```json
{
  "query": "office lease",
  "sources": [
    "samgov",
    "canadabuys",
    "contractsfinder"
  ],
  "maxItems": 20,
  "openOnly": true,
  "includeAttachments": false,
  "onlyNewOrChanged": false,
  "watchKey": "default",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "query": "office lease",
    "sources": [
        "samgov",
        "canadabuys",
        "contractsfinder"
    ],
    "maxItems": 20,
    "watchKey": "default",
    "naicsCode": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/us-gov-contract-watch-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 = {
    "query": "office lease",
    "sources": [
        "samgov",
        "canadabuys",
        "contractsfinder",
    ],
    "maxItems": 20,
    "watchKey": "default",
    "naicsCode": "",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/us-gov-contract-watch-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 '{
  "query": "office lease",
  "sources": [
    "samgov",
    "canadabuys",
    "contractsfinder"
  ],
  "maxItems": 20,
  "watchKey": "default",
  "naicsCode": ""
}' |
apify call parseforge/us-gov-contract-watch-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/us-gov-contract-watch-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/TdSJPDT5d0UIqBd84/builds/0sjSZ1FhJMqdVkFnr/openapi.json
