{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Contracts & RFP Monitor (US + UK Tenders)",
    "description": "Track live government contracts and RFPs from the U.S. and U.K. Automatically filter by keywords and budget, and get structured results with buyer details, values, and deadlines. Ideal for sales teams, consultants, and anyone selling to the public sector.",
    "version": "2.0",
    "x-build-id": "SUhso6yS82LNhhMCh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ishekofficial~goverment-contract-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ishekofficial-goverment-contract-monitor",
        "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/ishekofficial~goverment-contract-monitor/runs": {
      "post": {
        "operationId": "runs-sync-ishekofficial-goverment-contract-monitor",
        "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/ishekofficial~goverment-contract-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-ishekofficial-goverment-contract-monitor",
        "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": [
          "capabilityConnector",
          "pipelineConnector",
          "capabilityDatabaseId",
          "pipelineDatabaseId"
        ],
        "properties": {
          "capabilityConnector": {
            "title": "Notion connector — capability profile (read)",
            "type": "string",
            "description": "Connector used ONLY to read your capability profile database. This determines what the Actor searches for. See the README for the database template."
          },
          "pipelineConnector": {
            "title": "Notion connector — contract pipeline (read + write)",
            "type": "string",
            "description": "Connector used to read existing pipeline rows for deduplication, then write new qualifying contracts back."
          },
          "runMode": {
            "title": "Run mode",
            "type": "string",
            "description": "Leave as 'analyse'. Set to 'discover' only when connecting a new MCP server for the first time: it prints every tool the connector exposes with its annotations and input schema, then exits without scraping anything.",
            "default": "analyse"
          },
          "capabilityDatabaseId": {
            "title": "Capability profile database ID",
            "type": "string",
            "description": "The 32-character ID from your Notion capability profile database URL."
          },
          "pipelineDatabaseId": {
            "title": "Contract pipeline database ID",
            "type": "string",
            "description": "The 32-character ID from your Notion contract pipeline database URL. Qualifying contracts are written here."
          },
          "capabilityViewUrl": {
            "title": "Capability view URL (fallback if SQL is over quota)",
            "type": "string",
            "description": "Open the capability profile database in Notion and copy the FULL browser URL — it must contain ?v=... The view ID cannot be derived from the database ID, so without this the database-view read path is unavailable. Only used when notion-query-data-sources is over your workspace quota."
          },
          "pipelineViewUrl": {
            "title": "Pipeline view URL (fallback if SQL is over quota)",
            "type": "string",
            "description": "Same thing for the contract pipeline database. Full URL including ?v=..."
          },
          "minimumScore": {
            "title": "Minimum score to write back",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only contracts scoring at or above this are written to Notion. Everything scraped still lands in the dataset regardless.",
            "default": 65
          },
          "dryRun": {
            "title": "Dry run — score but do not write",
            "type": "boolean",
            "description": "Runs the full read + scrape + score pipeline and logs exactly what would be written, without touching your Notion pipeline. Use this on your first run.",
            "default": true
          },
          "maxWritesPerRun": {
            "title": "Max rows written per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap. Notion rate-limits at roughly 3 requests/second, and an unbounded first run against a fresh pipeline can write hundreds of rows.",
            "default": 50
          },
          "excludeKeywords": {
            "title": "Exclude Keywords — BLOCKLIST, not a search list",
            "type": "array",
            "description": "⚠️ Anything you type here REMOVES results. This is not where you put what you are looking for. Your search terms live in the Notion capability profile as rows with Type = Keyword. Leave this empty unless you have something specific to filter out (e.g. 'janitorial', 'catering'). Exclusions can also be kept in Notion as rows with Type = ExcludeKeyword.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Target Countries",
            "type": "array",
            "description": "List of countries to monitor. Leave empty for all available (currently USA and UK).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minimumBudget": {
            "title": "Minimum Budget (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum estimated value converted to USD.",
            "default": 0
          },
          "deadlineWithinDays": {
            "title": "Deadline Within (Days)",
            "minimum": 1,
            "type": "integer",
            "description": "Only include tenders expiring within this many days.",
            "default": 60
          },
          "maxResultsPerSource": {
            "title": "Max Results Per Source",
            "minimum": 1,
            "type": "integer",
            "description": "Limit the number of results scraped per source.",
            "default": 200
          },
          "includeNoDeadline": {
            "title": "Include notices with no published deadline",
            "type": "boolean",
            "description": "RFIs and Sources Sought notices often have no response date. They are early-stage signals — you hear about a requirement before the solicitation exists — so they are kept by default. Turn off to only see opportunities with a firm deadline.",
            "default": true
          },
          "includeExpired": {
            "title": "Include Expired",
            "type": "boolean",
            "description": "Whether to include tenders that have already passed their deadline.",
            "default": false
          },
          "samApiKey": {
            "title": "SAM.gov API Key",
            "type": "string",
            "description": "Optional — required only to include U.S. federal tenders from the official SAM.gov API. Free from sam.gov. Leave empty to run UK only."
          },
          "samMaxRequestsPerRun": {
            "title": "SAM.gov requests per run",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "SAM.gov allows non-federal API keys only 10 requests PER DAY. Each profile signal costs one request, so this caps how many are spent per run. Classification codes are prioritised over keywords because they return far more results per request.",
            "default": 4
          },
          "samCacheHours": {
            "title": "SAM.gov cache lifetime (hours)",
            "minimum": 0,
            "maximum": 168,
            "type": "integer",
            "description": "Reuse SAM.gov responses this recent instead of spending a request. Set higher while developing so debugging runs don't burn the daily allowance; the tender feed changes slowly enough that 6 hours is safe in production.",
            "default": 6
          },
          "notifyWebhook": {
            "title": "Notification Webhook URL",
            "type": "string",
            "description": "Optional URL to POST a run summary to on completion."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}