{
  "openapi": "3.0.1",
  "info": {
    "title": "Canadian Federal Tender Alerts & Change Monitor",
    "description": "Find relevant Canadian federal tenders and detect amendments, deadline changes, and removals using the official CanadaBuys open-data feed.",
    "version": "0.2",
    "x-build-id": "Jvj3nwim3nx6t3Is7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tender_signall~canadian-federal-tenders-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tender_signall-canadian-federal-tenders-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/tender_signall~canadian-federal-tenders-monitor/runs": {
      "post": {
        "operationId": "runs-sync-tender_signall-canadian-federal-tenders-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/tender_signall~canadian-federal-tenders-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-tender_signall-canadian-federal-tenders-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",
        "properties": {
          "preset": {
            "title": "Quick-start preset",
            "enum": [
              "custom",
              "it_software",
              "cybersecurity",
              "construction",
              "consulting"
            ],
            "type": "string",
            "description": "Choose a ready-made market watchlist. A preset replaces the custom keywords and categories below; choose Custom to use your own.",
            "default": "custom"
          },
          "monitorId": {
            "title": "Monitor ID",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{1,79}$",
            "minLength": 2,
            "maxLength": 80,
            "type": "string",
            "description": "Stable name for this watchlist. Reuse it on scheduled runs to compare with the previous snapshot. Use a different ID for each independent watchlist.",
            "default": "canada-it-opportunities"
          },
          "keywords": {
            "title": "Keywords or exact phrases",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Custom mode only. Whole words or phrases matched across bilingual titles, descriptions, classifications, organizations, and regions. Leave empty to keep every tender that passes the other filters.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": [
              "software",
              "cloud",
              "cybersecurity",
              "data analytics"
            ]
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Discard a tender when any excluded whole word or phrase appears in its searchable fields.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": []
          },
          "matchMode": {
            "title": "Keyword matching",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "ANY keeps a tender matching at least one keyword. ALL requires every configured keyword.",
            "default": "any"
          },
          "categories": {
            "title": "Procurement categories",
            "maxItems": 4,
            "uniqueItems": true,
            "type": "array",
            "description": "Custom mode only. Leave empty for all official CanadaBuys categories.",
            "items": {
              "type": "string",
              "enum": [
                "CNST",
                "GD",
                "SRV",
                "SRVTGD"
              ],
              "enumTitles": [
                "Construction",
                "Goods",
                "Services",
                "Services related to goods"
              ]
            },
            "default": [
              "SRV",
              "GD"
            ]
          },
          "gsinCodes": {
            "title": "GSIN codes or prefixes",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional classification targeting, for example D302A. A tender may match any configured exact code or code prefix.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "default": []
          },
          "unspscCodes": {
            "title": "UNSPSC codes or prefixes",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional classification targeting. Use a full code such as 81111500 or a broader prefix such as 8111.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "default": []
          },
          "organizations": {
            "title": "Contracting organizations",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional partial organization names, for example National Defence. A tender may match any listed organization.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "default": []
          },
          "regions": {
            "title": "Opportunity or delivery regions",
            "maxItems": 50,
            "uniqueItems": true,
            "type": "array",
            "description": "Optional region names, matched against official opportunity and delivery regions in either language.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "default": []
          },
          "publishedWithinDays": {
            "title": "Published within",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Optional publication-age filter. Use 0 for any publication date; amendments to older notices are excluded when this filter is active.",
            "default": 0
          },
          "minDaysRemaining": {
            "title": "Minimum days remaining",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Exclude opportunities closing sooner than this. Partial days are rounded up.",
            "default": 0
          },
          "closingWithinDays": {
            "title": "Closing within",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only keep opportunities whose official closing time is within this many days.",
            "default": 90
          },
          "minScore": {
            "title": "Minimum opportunity score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Suppress lower-priority results using the Actor's transparent 0–100 score. Use 0 for maximum recall, 40 for a cleaner feed, or 70 for strict triage.",
            "default": 0
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "changes_only",
              "new_only",
              "all_matching"
            ],
            "type": "string",
            "description": "Changes only is best for schedules. All matching also returns unchanged current opportunities. New only suppresses amendments and removals.",
            "default": "changes_only"
          },
          "emitBaseline": {
            "title": "Return matches on the first run",
            "type": "boolean",
            "description": "Recommended. The first run has no earlier snapshot, so matches are labelled baseline—not falsely labelled new.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum output rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Limits rows written in one run. Undelivered rows are queued and delivered first on the next run, so the monitor does not lose changes.",
            "default": 500
          },
          "resetState": {
            "title": "Reset this monitor's baseline",
            "type": "boolean",
            "description": "Ignore the stored snapshot and create a new baseline for this monitor ID. Leave off for normal and scheduled runs.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}