{
  "openapi": "3.0.1",
  "info": {
    "title": "Canada Government Tenders - Aggregated & Normalized",
    "description": "Every open Canadian government tender - federal, provincial, and municipal - pulled live and normalized into one schema, with bid documents, amendment tracking, and procurement method. Delta mode turns it into a bid-alert feed.",
    "version": "0.2",
    "x-build-id": "TgbNu5EN5tencfjjc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/goodland.consulting~canada-government-tenders-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-goodland.consulting-canada-government-tenders-scraper",
        "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/goodland.consulting~canada-government-tenders-scraper/runs": {
      "post": {
        "operationId": "runs-sync-goodland.consulting-canada-government-tenders-scraper",
        "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/goodland.consulting~canada-government-tenders-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-goodland.consulting-canada-government-tenders-scraper",
        "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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Tender portals to pull from. Failures on one source are logged and skipped, never fatal to the run.",
            "items": {
              "type": "string",
              "enum": [
                "canadabuys",
                "seao",
                "apc",
                "civicinfobc",
                "sasktenders",
                "novascotia",
                "bidsandtenders"
              ],
              "enumTitles": [
                "CanadaBuys (federal, validated)",
                "SEAO (Quebec open data)",
                "Alberta Purchasing Connection (working)",
                "CivicInfo BC - BC local government (RSS)",
                "SaskTenders (working)",
                "Nova Scotia incl. MASH sector (working)",
                "bids&tenders platform - municipalities/school boards (working)"
              ]
            },
            "default": [
              "canadabuys"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Case-insensitive match against title and description. Empty = all tenders.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "provinces": {
            "title": "Provinces (delivery region)",
            "type": "array",
            "description": "Only tenders deliverable in these provinces. Tenders deliverable Canada-wide always match. Empty = all provinces.",
            "items": {
              "type": "string",
              "enum": [
                "AB",
                "BC",
                "MB",
                "NB",
                "NL",
                "NS",
                "NT",
                "NU",
                "ON",
                "PE",
                "QC",
                "SK",
                "YT"
              ],
              "enumTitles": [
                "Alberta",
                "British Columbia",
                "Manitoba",
                "New Brunswick",
                "Newfoundland and Labrador",
                "Nova Scotia",
                "Northwest Territories",
                "Nunavut",
                "Ontario",
                "Prince Edward Island",
                "Quebec",
                "Saskatchewan",
                "Yukon"
              ]
            },
            "default": []
          },
          "categories": {
            "title": "Procurement categories",
            "type": "array",
            "description": "CNST=construction, GD=goods, SRV=services, SRVTGD=services related to goods.",
            "items": {
              "type": "string",
              "enum": [
                "CNST",
                "GD",
                "SRV",
                "SRVTGD"
              ]
            },
            "default": []
          },
          "newSinceHours": {
            "title": "Only tenders published in last N hours",
            "type": "integer",
            "description": "0 = all open tenders. 1-24 uses the fast 'new tenders' feed.",
            "default": 0
          },
          "deltaMode": {
            "title": "Delta mode (only new since last run)",
            "type": "boolean",
            "description": "Skip tenders already emitted by previous runs. Pair with a schedule for alerts.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "type": "integer",
            "description": "Maximum number of tenders to push to the dataset across all sources.",
            "default": 1000
          },
          "bidsAndTendersOrgs": {
            "title": "bids&tenders org subdomains",
            "type": "array",
            "description": "Org subdomains for the 'bidsandtenders' source ({org}.bidsandtenders.ca). Empty = a diverse national starter set (saskatoon, metrovancouver, tdsb, yukon, halifax, reddeer). Examples by province — ON: durham, guelph, kitchener, waterloo, regionofwaterloo, barrie, london, cityofpeterborough, burlington; AB: reddeer, ae-ab; SK: saskatoon, ae-sk; BC: metrovancouver, bidcentral; NS: halifax; MB: mwsb; Indigenous orgs: fnesl; plus national co-ops canoe and bids. See the README for the full list.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeExpired": {
            "title": "Include expired notices",
            "type": "boolean",
            "description": "Keep notices whose closing date has already passed. Off by default — SEAO's weekly dumps in particular contain many closed notices.",
            "default": false
          },
          "includeRaw": {
            "title": "Include raw source row",
            "type": "boolean",
            "description": "Attach the original source record to each item as 'raw'. Useful for debugging missing fields.",
            "default": false
          },
          "indigenousOnly": {
            "title": "Indigenous set-aside only",
            "type": "boolean",
            "description": "Keep only Indigenous-procurement notices: CanadaBuys notices detected as Procurement Strategy for Indigenous Business (PSIB) set-asides. Other sources produce nothing under this filter, so pair it with canadabuys.",
            "default": false
          },
          "enrich": {
            "title": "Enrich (deep record)",
            "type": "boolean",
            "description": "Emit the deep record: bid documents, amendment tracking, procurement method, selection criteria, trade agreements, bilingual title/description, and the full contact block. Turn this off for a leaner, cheaper record — the 'tender enriched' event is not charged when it's off.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}