{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Recompete Finder: Expiring Contracts",
    "description": "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.",
    "version": "0.5",
    "x-build-id": "jCTe2K1cZEDH0jcXk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/powerwise~gov-procurement-recompete-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-powerwise-gov-procurement-recompete-mcp",
        "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/powerwise~gov-procurement-recompete-mcp/runs": {
      "post": {
        "operationId": "runs-sync-powerwise-gov-procurement-recompete-mcp",
        "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/powerwise~gov-procurement-recompete-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-powerwise-gov-procurement-recompete-mcp",
        "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": [
          "sources",
          "intelligenceMode"
        ],
        "properties": {
          "sources": {
            "title": "Official Open-Data Portals",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Select one or more statutory public procurement open-data feeds to query.",
            "items": {
              "type": "string",
              "enum": [
                "uk_find_a_tender_ocds",
                "uk_contracts_finder_ocds",
                "eu_ted_v3",
                "us_usaspending_v2",
                "us_grants_gov_v1",
                "au_austender_ocds",
                "au_austender_atm_rss",
                "ca_canadabuys_open_tenders"
              ],
              "enumTitles": [
                "UK Find a Tender (OCDS)",
                "UK Contracts Finder (OCDS)",
                "EU TED eForms Search v3",
                "US USAspending.gov Awards v2",
                "US Grants.gov Opportunities v1",
                "AU AusTender Contract Notices (OCDS)",
                "AU AusTender Current ATMs (RSS)",
                "CA CanadaBuys Open Tenders (CSV)"
              ]
            },
            "default": [
              "uk_find_a_tender_ocds",
              "uk_contracts_finder_ocds",
              "eu_ted_v3",
              "us_usaspending_v2",
              "au_austender_ocds",
              "au_austender_atm_rss"
            ]
          },
          "intelligenceMode": {
            "title": "Procurement Intelligence Mode",
            "enum": [
              "active_tenders",
              "expiring_recompetes",
              "recent_awards",
              "unified"
            ],
            "type": "string",
            "description": "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.",
            "default": "unified"
          },
          "keywords": {
            "title": "Include Keywords",
            "type": "array",
            "description": "Case-insensitive keywords matched across title, description, contracting authority, or incumbent supplier.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Exclude Keywords",
            "type": "array",
            "description": "Case-insensitive negative keywords excluded from results.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "classificationCodes": {
            "title": "CPV / UNSPSC / NAICS Prefixes",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string",
              "pattern": "^[0-9A-Za-z*.-]{2,16}$"
            },
            "default": []
          },
          "countries": {
            "title": "ISO Country Filter",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional uppercase ISO 3166-1 alpha-2 country codes (or 'EU') such as ['GB', 'AU', 'DE', 'IE', 'US', 'CA'].",
            "items": {
              "type": "string",
              "pattern": "^([A-Z]{2}|EU)$"
            },
            "default": []
          },
          "publishedWithinDays": {
            "title": "Published / Modified Lookback (Days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Lookback window in days for active tenders and newly published contract awards.",
            "default": 7
          },
          "recompeteWindowDays": {
            "title": "Expiring Contract Recompete Window (Days Ahead)",
            "minimum": 15,
            "maximum": 730,
            "type": "integer",
            "description": "Capture awarded contracts whose contract end date falls between today+14 days and today+recompeteWindowDays (15 to 730 days).",
            "default": 180
          },
          "minValueAmount": {
            "title": "Minimum Contract Value (Whole Currency Units)",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Minimum estimated or awarded contract value in the specified minValueCurrency (require minValueCurrency when > 0 across multi-currency portals).",
            "default": 0
          },
          "minValueCurrency": {
            "title": "Minimum Value ISO-4217 Currency",
            "pattern": "^([A-Z]{3})?$",
            "type": "string",
            "description": "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.",
            "default": ""
          },
          "onlyChanges": {
            "title": "Stateful Delta Mode (Only New Notices & Material Amendments)",
            "type": "boolean",
            "description": "Compares deterministic SHA-256 material state hashes against sharded durable Apify Named Key-Value Store records and emits only new notices or material changes.",
            "default": false
          },
          "stateStoreName": {
            "title": "Named Key-Value Store for Delta State",
            "pattern": "^[a-z0-9](?:[a-z0-9-]{1,61}[a-z0-9])$",
            "type": "string",
            "description": "Lowercase alphanumeric and hyphenated Apify Named Key-Value Store name (3-63 chars, no leading/trailing hyphen) used when onlyChanges=true.",
            "default": "gov-procurement-delta-state"
          },
          "verifyIncumbentRegistry": {
            "title": "Verify Incumbent Supplier Registry Status (GLEIF 20-char LEI; Live EU VIES & AU ABR Disabled)",
            "type": "boolean",
            "description": "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).",
            "default": false
          },
          "mcpFastMode": {
            "title": "MCP Synchronous Fast Mode (< 15s Target)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum Billable Records",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard ceiling (1 to 500) on harmonized dataset items emitted in this run.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}