# Government Recompete Finder: Expiring Contracts (`powerwise/gov-procurement-recompete-mcp`) Actor

Find expiring government contracts (recompetes), open tenders, grants and awards from official US (USAspending, Grants.gov), UK (Find a Tender, Contracts Finder), EU (TED) and Canada (CanadaBuys) open-data feeds. Delta alerts, GLEIF LEI checks; MCP-ready for Claude, Cursor and n8n.

- **URL**: https://apify.com/powerwise/gov-procurement-recompete-mcp.md
- **Developed by:** [Travis WILLIAMS](https://apify.com/powerwise) (community)
- **Categories:** AI, Automation, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Public Tenders, Awards & Expiring-Contract Recompete Intelligence (`gov-procurement-recompete-mcp`)

Harmonized government tender, contract award, and **expiring-contract recompete** intelligence across **8 official keyless statutory portals** in the **United Kingdom, European Union, United States, Australia, and Canada**—built for B2G capture teams, scheduled automation (`n8n`, `Make`, `Zapier`), and synchronous AI agents via **Apify Hosted MCP**.

### Why Use This Actor?

- **Pre-RFP Expiring Recompete Radar (`15` to `730` days ahead):** Identify awarded contracts approaching expiration (`[today + 14 days, today + recompeteWindowDays]`) across US Federal (`USAspending.gov`), UK (`Find a Tender` & `Contracts Finder`), and Australia (`AusTender OCDS`) *before* replacement RFPs hit the street.
- **Zero-Duplicate Stateful Delta Alerts (`onlyChanges: true`):** Uses a sharded Apify Named Key-Value Store (`DELTA_STATE_INDEX_V2` + 16 archive shards) to emit and bill **only** when a new notice appears or a deadline, award, or contract value materially changes (`$0` event charge on unchanged notices).
- **Agent-Ready Hosted MCP (`LIMITED_PERMISSIONS`, `256 MB` RAM):** Enable `mcpFastMode: true` for bounded `< 15s` concurrent execution through `https://mcp.apify.com` with structured dataset and `OUTPUT_SUMMARY` schema inference.
- **Optional GLEIF 20-Character LEI Verification (`verifyIncumbentRegistry: true`):** Validates explicit 20-character ISO 17442 LEIs (MOD 97-10 check digits) against the official GLEIF v1 API and flags `LAPSED` / `INACTIVE` registrations (`displacementRiskFlag: true`). *(Note: Live EU VIES VAT lookup is disabled pending legal clearance and live Australian ABR lookup is unavailable without an official ABR GUID; disabled registries make zero network calls and incur zero event charges.)*
- **100% Keyless Statutory Open Data:** Requires zero user API keys, zero browser/Playwright overhead, and preserves mandatory open-government attribution on every record.

### Supported Statutory Open-Data Portals

| Source ID | Jurisdiction | Official Source | Intelligence Coverage |
| :--- | :--- | :--- | :--- |
| `uk_find_a_tender_ocds` | United Kingdom | Find a Tender OCDS API (`OGL v3.0`) | Active Tenders, Recent Awards, Expiring Recompetes |
| `uk_contracts_finder_ocds` | United Kingdom | Contracts Finder OCDS API (`OGL v3.0`) | Active Tenders, Recent Awards, Expiring Recompetes |
| `eu_ted_v3` | European Union / EEA | EU TED Search API v3 (`Decision 2011/833/EU`) | Active Tenders, Recent Awards |
| `us_usaspending_v2` | United States | USAspending.gov API v2 (`17 U.S.C. § 105`) | Recent Awards, Expiring Recompetes |
| `us_grants_gov_v1` | United States | Grants.gov Search2 API v1 (`17 U.S.C. § 105`) | Federal Grant Opportunities |
| `au_austender_ocds` | Australia | AusTender OCDS API (`CC BY 3.0 AU`) | Recent Awards, Expiring Recompetes |
| `au_austender_atm_rss` | Australia | AusTender Current ATMs RSS (`CC BY 3.0 AU`) | Active Tenders (ATMs) |
| `ca_canadabuys_open_tenders` | Canada | CanadaBuys Open Data CSV (`OGL-Canada`) | Active Tenders |

### Connect to AI Agents via Apify Hosted MCP

Add this Actor directly to **Claude Desktop**, **Cursor**, or **VS Code** via [Apify Hosted MCP](https://mcp.apify.com) (replace `<YOUR_APIFY_USERNAME>` and `<YOUR_APIFY_API_TOKEN>`):

```json
{
  "mcpServers": {
    "gov-procurement-recompete": {
      "url": "https://mcp.apify.com?tools=<YOUR_APIFY_USERNAME>/gov-procurement-recompete-mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

Recommended agent input overrides for real-time tool calls:

- `"mcpFastMode": true` (caps total pipeline wall-clock execution under 15 seconds)
- `"maxResults": 25`
- `"intelligenceMode": "unified"` (or `"expiring_recompetes"`, `"active_tenders"`, `"recent_awards"`)

### Transparent Pay-Per-Event (PPE) Pricing

| Event Name | When It Fires | Standard Rate | Tiered Store Discounts (Bronze / Silver / Gold) |
| :--- | :--- | :--- | :--- |
| `apify-actor-start` | Once per Actor run start (256 MB RAM) | `$0.00005` / start | `$0.00005` across all tiers |
| `procurement-record` | Per harmonized record emitted in Snapshot mode (`onlyChanges: false`) | `$0.0040` (`$4.00` / 1k) | `$3.60` / `$3.20` / `$2.80` per 1k |
| `delta-change-alert` | Per new or materially amended notice in Stateful Delta mode (`onlyChanges: true`; unchanged notices cost `$0`) | `$0.0060` (`$6.00` / 1k) | `$5.40` / `$4.80` / `$4.20` per 1k |
| `incumbent-kyb-verified` | Only when `verifyIncumbentRegistry: true` resolves an explicit 20-char ISO 17442 LEI via GLEIF (`HTTP 200 RESOLVED`) | `$0.0030` (`$3.00` / 1k) | `$2.70` / `$2.40` / `$2.10` per 1k |

*Spend-cap guarantee:* Set a maximum cost per run (`ACTOR_MAX_TOTAL_CHARGE_USD`) in Apify Console or via API at any time—the Actor pre-clamps `maxResults` against your remaining budget via `ChargingManager` before fetching portals and halts cleanly when your limit is reached.

# Actor input Schema

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

Select one or more statutory public procurement open-data feeds to query.

## `intelligenceMode` (type: `string`):

active_tenders: open bidding and grant opportunities; expiring_recompetes: awarded contracts expiring between today+14d and today+recompeteWindowDays; recent_awards: newly published contract awards; unified: combines active tenders and expiring recompetes.

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

Case-insensitive keywords matched across title, description, contracting authority, or incumbent supplier.

## `excludeKeywords` (type: `array`):

Case-insensitive negative keywords excluded from results.

## `classificationCodes` (type: `array`):

Optional classification prefixes applied only to portals using the matching scheme (CPV for UK/EU, UNSPSC for AU/CA, NAICS for US) without dropping cross-scheme portals.

## `countries` (type: `array`):

Optional uppercase ISO 3166-1 alpha-2 country codes (or 'EU') such as \['GB', 'AU', 'DE', 'IE', 'US', 'CA'].

## `publishedWithinDays` (type: `integer`):

Lookback window in days for active tenders and newly published contract awards.

## `recompeteWindowDays` (type: `integer`):

Capture awarded contracts whose contract end date falls between today+14 days and today+recompeteWindowDays (15 to 730 days).

## `minValueAmount` (type: `integer`):

Minimum estimated or awarded contract value in the specified minValueCurrency (require minValueCurrency when > 0 across multi-currency portals).

## `minValueCurrency` (type: `string`):

3-letter ISO-4217 currency code (e.g. GBP, EUR, USD, AUD, CAD) required when minValueAmount > 0 across multi-currency portals so cross-currency values are never compared unsafely.

## `onlyChanges` (type: `boolean`):

Compares deterministic SHA-256 material state hashes against sharded durable Apify Named Key-Value Store records and emits only new notices or material changes.

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

Lowercase alphanumeric and hyphenated Apify Named Key-Value Store name (3-63 chars, no leading/trailing hyphen) used when onlyChanges=true.

## `verifyIncumbentRegistry` (type: `boolean`):

Opt-in enrichment on awards and expiring recompetes: verifies explicit 20-character ISO 17442 LEIs via GLEIF. Live EU/XI VIES VAT lookup is disabled pending legal/commercial-use clearance (returns UNAVAILABLE with diagnosticCode VIES_DISABLED_V041; zero network calls, zero charge). Live Australian ABN registration lookup is held unavailable without an official ABR GUID (local modulus-89 syntax check only; zero charge).

## `mcpFastMode` (type: `boolean`):

Bounds per-portal pagination to a single page and tightens per-source timeouts (< 14s total wall-clock budget) for interactive MCP tool invocations. Disabled by default for standard batch Actor runs.

## `maxResults` (type: `integer`):

Hard ceiling (1 to 500) on harmonized dataset items emitted in this run.

## Actor input object example

```json
{
  "sources": [
    "uk_contracts_finder_ocds",
    "us_grants_gov_v1",
    "au_austender_atm_rss"
  ],
  "intelligenceMode": "unified",
  "keywords": [],
  "excludeKeywords": [],
  "classificationCodes": [],
  "countries": [],
  "publishedWithinDays": 7,
  "recompeteWindowDays": 180,
  "minValueAmount": 0,
  "minValueCurrency": "",
  "onlyChanges": false,
  "stateStoreName": "gov-procurement-delta-state",
  "verifyIncumbentRegistry": false,
  "mcpFastMode": false,
  "maxResults": 25
}
```

# Actor output Schema

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

Harmonized procurement dataset items validated against dataset_schema.json.

## `runSummary` (type: `string`):

Execution telemetry, source error diagnostics, OS RSS snapshot, delta reconciliation, and PPE billing ledger.

# 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 = {
    "sources": [
        "uk_contracts_finder_ocds",
        "us_grants_gov_v1",
        "au_austender_atm_rss"
    ],
    "intelligenceMode": "unified",
    "publishedWithinDays": 7,
    "recompeteWindowDays": 180,
    "stateStoreName": "gov-procurement-delta-state",
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("powerwise/gov-procurement-recompete-mcp").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 = {
    "sources": [
        "uk_contracts_finder_ocds",
        "us_grants_gov_v1",
        "au_austender_atm_rss",
    ],
    "intelligenceMode": "unified",
    "publishedWithinDays": 7,
    "recompeteWindowDays": 180,
    "stateStoreName": "gov-procurement-delta-state",
    "maxResults": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("powerwise/gov-procurement-recompete-mcp").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 '{
  "sources": [
    "uk_contracts_finder_ocds",
    "us_grants_gov_v1",
    "au_austender_atm_rss"
  ],
  "intelligenceMode": "unified",
  "publishedWithinDays": 7,
  "recompeteWindowDays": 180,
  "stateStoreName": "gov-procurement-delta-state",
  "maxResults": 25
}' |
apify call powerwise/gov-procurement-recompete-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,powerwise/gov-procurement-recompete-mcp"
        }
    }
}
```

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/PdBsdG8ES6sWRkD0U/builds/jCTe2K1cZEDH0jcXk/openapi.json
