{
  "openapi": "3.0.1",
  "info": {
    "title": "CanadaBuys Tenders Scraper: Government Contracts to Excel",
    "description": "Search Canadian federal tenders and contract awards from CanadaBuys open data by keyword, UNSPSC/GSIN, region, buyer, date and value. Normalized JSON/CSV, monitoring mode, privacy-safe defaults. No API key.",
    "version": "0.1",
    "x-build-id": "XGnxkqNRdcYhn9ARC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenderfeed~canada-canadabuys-tenders/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenderfeed-canada-canadabuys-tenders",
        "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/tenderfeed~canada-canadabuys-tenders/runs": {
      "post": {
        "operationId": "runs-sync-tenderfeed-canada-canadabuys-tenders",
        "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/tenderfeed~canada-canadabuys-tenders/run-sync": {
      "post": {
        "operationId": "run-sync-tenderfeed-canada-canadabuys-tenders",
        "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": {
          "dataset": {
            "title": "What to search",
            "enum": [
              "open",
              "new",
              "tenders",
              "awards"
            ],
            "type": "string",
            "description": "Open tenders is the fastest and best for bid alerts. 'All tender notices' and 'Contract award notices' read the CanadaBuys yearly files for the publication window below (default: last 30 days).",
            "default": "open"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases matched in the title, description and UNSPSC/GSIN descriptions (word-start match, so 'cloud' also matches 'cloud-based'). Leave empty for everything.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match notices containing ANY or ALL of the keywords.",
            "default": "any"
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "YYYY-MM-DD or relative (e.g. \"7 days\"). Default: no limit for open/new tenders, last 30 days for 'All tender notices' and awards. Yearly files start in fiscal year 2022-2023."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "onlyOpen": {
            "title": "Only tenders still accepting bids",
            "type": "boolean",
            "description": "Skip tenders whose closing date has passed (some 'open' notices are standing lists with old closing dates).",
            "default": false
          },
          "closingFrom": {
            "title": "Closing date from",
            "type": "string",
            "description": "Only tenders closing on or after this date (YYYY-MM-DD)."
          },
          "closingTo": {
            "title": "Closing date to",
            "type": "string",
            "description": "Only tenders closing on or before this date (YYYY-MM-DD)."
          },
          "categories": {
            "title": "Procurement categories",
            "type": "array",
            "description": "Leave empty for all categories.",
            "items": {
              "type": "string",
              "enum": [
                "GD",
                "SRV",
                "CNST",
                "SRVTGD"
              ],
              "enumTitles": [
                "Goods",
                "Services",
                "Construction",
                "Services related to goods"
              ]
            }
          },
          "unspscCodes": {
            "title": "UNSPSC codes",
            "type": "array",
            "description": "UNSPSC codes or prefixes, e.g. 4323 (software), 8111 (computer services), 72 (building and construction services).",
            "items": {
              "type": "string"
            }
          },
          "gsinCodes": {
            "title": "GSIN codes",
            "type": "array",
            "description": "Goods and Services Identification Numbers or prefixes, e.g. D302 (IT systems development), N70 (IT equipment).",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Region of delivery or opportunity (text match), e.g. Ontario, Quebec, British Columbia, National Capital Region, Canada.",
            "items": {
              "type": "string"
            }
          },
          "buyers": {
            "title": "Buyers (contracting or end-user entity)",
            "type": "array",
            "description": "Text match on the department or agency name, e.g. Public Services and Procurement Canada, Department of National Defence, Shared Services Canada.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Text match, e.g. Request for Proposal, Request for Standing Offer, Request for Supply Arrangement, Request for Information, Advance Contract Award Notice.",
            "items": {
              "type": "string"
            }
          },
          "suppliers": {
            "title": "Suppliers (awards only)",
            "type": "array",
            "description": "Track competitors: text match on the winning supplier's legal name.",
            "items": {
              "type": "string"
            }
          },
          "minValue": {
            "title": "Minimum contract value (awards)",
            "minimum": 0,
            "type": "integer",
            "description": "Award value filter (total contract value, else contract amount), usually in CAD."
          },
          "maxValue": {
            "title": "Maximum contract value (awards)",
            "minimum": 0,
            "type": "integer",
            "description": "Award value upper bound."
          },
          "includeUnknownValue": {
            "title": "Keep awards without a value",
            "type": "boolean",
            "description": "When a value filter is set, keep awards whose value is missing or 0.",
            "default": true
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of titles, descriptions and notice links (falls back to the other language when empty).",
            "default": "en"
          },
          "includeBuyerContacts": {
            "title": "Include buyer contact person (name, email, phone)",
            "type": "boolean",
            "description": "Off by default (privacy-friendly): person-level contact data is removed and emails in descriptions are masked. Turn on to get the contracting officer's name, email and phone.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of notices to save (newest first). 0 = no limit.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new notices (monitoring mode)",
            "type": "boolean",
            "description": "Remember what earlier runs delivered and return (and charge for) only notices you have not received yet. Ideal for scheduled daily alerts.",
            "default": false
          },
          "monitoringId": {
            "title": "Monitoring ID",
            "type": "string",
            "description": "Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule."
          },
          "includeRawData": {
            "title": "Include raw CanadaBuys row",
            "type": "boolean",
            "description": "Adds the original CSV row (non-empty columns) under `raw`.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}