{
  "openapi": "3.0.1",
  "info": {
    "title": "Government Contract Watch Scraper",
    "description": "Watch open government contract opportunities from SAM.gov, CanadaBuys and UK Contracts Finder in one feed. Each notice comes with its closing date, buyer, description and direct links to the bid documents, plus a new-or-changed-since-last-run mode for scheduled watches.",
    "version": "0.2",
    "x-build-id": "iucvfknECZEi9uazn"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~us-gov-contract-watch-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-us-gov-contract-watch-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/parseforge~us-gov-contract-watch-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-us-gov-contract-watch-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/parseforge~us-gov-contract-watch-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-us-gov-contract-watch-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": {
          "query": {
            "title": "Search term",
            "type": "string",
            "description": "Free-text keyword applied to every selected source. Leave empty to return everything the sources publish. SEAO publishes in French, so an English term returns nothing from Quebec: use a French term for it, or the UNSPSC code filter, which does not depend on the language."
          },
          "sources": {
            "title": "Sources",
            "uniqueItems": true,
            "type": "array",
            "description": "Which portals to query. The default is the four tender sources. CanadaBuys is the Canadian federal portal and SEAO is the Quebec provincial one, so a Quebec notice only shows up on SEAO. USAspending returns contracts that were already awarded, and the last two are trade reference data rather than tenders, so they are opt-in.",
            "items": {
              "type": "string",
              "enum": [
                "samgov",
                "canadabuys",
                "seao",
                "contractsfinder",
                "fpds",
                "usitc",
                "cbpcross"
              ],
              "enumTitles": [
                "SAM.gov open US federal opportunities",
                "CanadaBuys open tenders (Canada federal)",
                "SEAO open tenders (Quebec)",
                "UK Contracts Finder",
                "USAspending federal awards (already awarded)",
                "USITC HTS tariff schedule (not tenders)",
                "US Customs CROSS rulings (not tenders)"
              ]
            },
            "default": [
              "samgov",
              "canadabuys",
              "seao",
              "contractsfinder"
            ]
          },
          "maxItems": {
            "title": "Maximum results (total for the run)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Total rows for the whole run, shared across every selected source. This is a change from earlier builds, where the limit applied per source and five sources at 200 could bill 1,000 rows."
          },
          "openOnly": {
            "title": "Open opportunities only",
            "type": "boolean",
            "description": "Skip closed, cancelled and already-awarded notices.",
            "default": true
          },
          "includeAttachments": {
            "title": "Include bid documents",
            "type": "boolean",
            "description": "Return the RFP, SOW and addenda file links for each notice that publishes them, with filename, type and size. CanadaBuys and UK Contracts Finder carry them in the feed. SAM.gov needs one extra request per notice, so runs take longer with this on. SEAO publishes the document inventory, with page count and filename, but Quebec keeps the files themselves behind a free SEAO account, so those entries link to the notice the document is ordered from.",
            "default": false
          },
          "onlyNewOrChanged": {
            "title": "Only new or changed since the last run",
            "type": "boolean",
            "description": "Remembers every notice already delivered and returns only what is new or has been amended since. Turn this on for a scheduled watch so you are not billed for the same list every day.",
            "default": false
          },
          "watchKey": {
            "title": "Watch name",
            "type": "string",
            "description": "Keeps separate watches apart. Two schedules with different search terms should use different names so they do not hide each other's results.",
            "default": "default"
          },
          "unspscCode": {
            "title": "UNSPSC codes (SEAO only)",
            "type": "string",
            "description": "Narrow the Quebec results to one or more UNSPSC codes, one per line or separated by commas. A short code covers everything under it: 8013 is the whole Real estate services family, 80131500 only Lease and rental of property or building. A notice matching any of the codes is returned. You can paste lines like \"8013 Real estate services\", the description is ignored."
          },
          "naicsCode": {
            "title": "NAICS code (SAM.gov only)",
            "type": "string",
            "description": "Narrow the US federal results to one NAICS code. 531190 is Lessors of Other Real Estate Property, 236220 is Commercial Building Construction."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "CanadaBuys blocks unproxied datacenter addresses, so a proxy is required. The default is fine.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}