{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Tenders Monitor: Canada, UK & EU Bid Alerts",
    "description": "New public tenders from official open data in one clean feed: CanadaBuys (federal Canada), UK Find a Tender, EU TED, and US SAM.gov with your own key. Filter by keyword, code, region and closing date. Schedule it with \"only new\" for daily bid alerts. USD 1 per 1,000 notices.",
    "version": "1.0",
    "x-build-id": "eagvyz9mmtWfp81WC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jtpalms~gov-tenders-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jtpalms-gov-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/jtpalms~gov-tenders-monitor/runs": {
      "post": {
        "operationId": "runs-sync-jtpalms-gov-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/jtpalms~gov-tenders-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-jtpalms-gov-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": {
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which official portals to read. canadabuys = CanadaBuys (federal Canada), find-a-tender = UK Find a Tender, ted = EU Tenders Electronic Daily, sam = US SAM.gov (needs your own free API key below).",
            "items": {
              "type": "string",
              "enum": [
                "canadabuys",
                "find-a-tender",
                "ted",
                "sam"
              ],
              "enumTitles": [
                "CanadaBuys (Canada, federal)",
                "Find a Tender (United Kingdom)",
                "TED (European Union)",
                "SAM.gov (United States, your own API key)"
              ]
            },
            "default": [
              "canadabuys",
              "find-a-tender",
              "ted"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "A notice matches when its title or description contains any of these words (whole words, any case). End a word with * to match endings (cyber* matches cybersecurity), or write /regex/. Empty = all notices.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title or description contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "codes": {
            "title": "Classification codes (prefixes)",
            "type": "array",
            "description": "Keep notices with a code that starts with any of these: CPV for the UK and EU (72 = IT services, 48 = software packages), UNSPSC or GSIN for Canada (43 = IT equipment and software), NAICS for the US (5415 = computer systems design). Lists: CPV https://simap.ted.europa.eu/cpv and UNSPSC https://www.unspsc.org.",
            "items": {
              "type": "string"
            }
          },
          "countries": {
            "title": "Countries and regions",
            "type": "array",
            "description": "Keep notices from these places. TED: ISO country codes such as FRA, DEU (or FR, DE). UK: GB, or England, Scotland, Wales, Northern Ireland. Canada: CA, or a province or region name such as Ontario or British Columbia (matched against the buyer's province and the regions of delivery).",
            "items": {
              "type": "string"
            }
          },
          "sinceDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Notices published or updated in the last N days. With Only new, later runs look back to the previous run instead (with one day of overlap).",
            "default": 7
          },
          "closingAfter": {
            "title": "Closing after",
            "type": "string",
            "description": "Hide notices that close before this date (YYYY-MM-DD). Empty or today = hide notices that already closed. Write any to keep them all. Notices without a closing date are kept."
          },
          "minValue": {
            "title": "Minimum estimated value",
            "minimum": 0,
            "type": "integer",
            "description": "Hide notices whose estimated value is below this amount, in the notice's own currency. Notices without a value are kept (CanadaBuys publishes none)."
          },
          "onlyNew": {
            "title": "Only new notices",
            "type": "boolean",
            "description": "Remember which notices earlier runs saw and output only notices that are new. Schedule the actor daily to get bid alerts; runs with nothing new output nothing and cost only the start. The memory is kept per source and per set of filters in your gov-tenders-monitor-state key-value store (the latest 50,000 notice IDs).",
            "default": false
          },
          "firstRunOutput": {
            "title": "First run with Only new",
            "enum": [
              "all",
              "none"
            ],
            "type": "string",
            "description": "All: the first run outputs the current matches. None: the first run outputs nothing and only records what is there, so you get only notices published after today.",
            "default": "all"
          },
          "maxResults": {
            "title": "Maximum notices",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap per run, across all sources. Sources take turns, so each gets a share of the cap.",
            "default": 1000
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "fr"
            ],
            "type": "string",
            "description": "Language of titles and descriptions where the source has it: CanadaBuys (English or French) and TED titles. Find a Tender and SAM.gov are in English.",
            "default": "en"
          },
          "samApiKey": {
            "title": "SAM.gov API key (optional)",
            "type": "string",
            "description": "Your own free SAM.gov public API key, needed only for the sam source. Get it on the Account Details page of SAM.gov. Daily request limits depend on your SAM.gov role. The key is sent only to api.sam.gov and never logged or saved."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}