{
  "openapi": "3.0.1",
  "info": {
    "title": "AusTender Contract Expiry & Recompete Monitor",
    "description": "Track AusTender contract expiry, extensions and supplier changes. Monitor Australian Government contracts by CN ID, agency or supplier, with persistent baselines and 365/180/90/60/30-day recompete alerts. Export changes as JSON, CSV or an API feed.",
    "version": "0.1",
    "x-build-id": "04hDOsNz2g9tUnfRf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~austender-contract-expiry-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-austender-contract-expiry-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/automa-flow~austender-contract-expiry-monitor/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-austender-contract-expiry-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/automa-flow~austender-contract-expiry-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-austender-contract-expiry-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": {
          "contracts": {
            "title": "Contract Notice watchlist (CN IDs)",
            "maxItems": 1000,
            "type": "array",
            "description": "Exact Contract Notice IDs, the safest thing to monitor. Case, spaces, a leading # and a trailing amendment suffix are normalized away, so CN4258099, cn4258099 and CN4258099-A1 are the same contract - an amendment ID resolves to its parent's whole release chain. A repeated ID is fetched, charged and compared once. Every listed contract is checked on every run.",
            "items": {
              "type": "string"
            }
          },
          "supplierNames": {
            "title": "Supplier names",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive partial match on the awarded supplier's name. Combined with supplier ABNs as OR.",
            "items": {
              "type": "string"
            }
          },
          "supplierAbns": {
            "title": "Supplier ABNs",
            "maxItems": 100,
            "type": "array",
            "description": "Exact match on the supplier's 11-digit ABN as AusTender publishes it. Spaces and dashes are normalized away. The ABN check digit is deliberately not validated: a wrong ABN simply matches nothing, and a false rejection would silently stop a monitor.",
            "items": {
              "type": "string"
            }
          },
          "agencyNames": {
            "title": "Buyer agency names",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive partial match on the procuring entity. Combined with agency ABNs as OR.",
            "items": {
              "type": "string"
            }
          },
          "agencyAbns": {
            "title": "Buyer agency ABNs",
            "maxItems": 100,
            "type": "array",
            "description": "Exact match on the procuring entity's 11-digit ABN.",
            "items": {
              "type": "string"
            }
          },
          "unspscPrefixes": {
            "title": "UNSPSC category prefixes",
            "maxItems": 50,
            "type": "array",
            "description": "Digits only. A prefix matches any UNSPSC code on the contract, so 43 covers all IT and telecommunications categories and 4323 narrows to software.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Title or description keywords",
            "maxItems": 50,
            "type": "array",
            "description": "Case-insensitive partial match on the contract title or description. Bounded text matching only - no semantic search.",
            "items": {
              "type": "string"
            }
          },
          "minValueAud": {
            "title": "Minimum contract value (AUD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only watch contracts published at or above this value. A contract AusTender publishes without a value never clears the floor."
          },
          "lookaheadDays": {
            "title": "Expiry horizon (days)",
            "minimum": 30,
            "maximum": 730,
            "type": "integer",
            "description": "How far ahead the market watch looks for expiring contracts. Discovery covers at most 180 days per run, soonest expiry first; later runs continue uncovered ranges and reconcile modifications. Ignored for exact Contract Notice IDs, which are always checked.",
            "default": 365
          },
          "recompeteWindowsDays": {
            "title": "Recompete windows (days to expiry)",
            "maxItems": 8,
            "type": "array",
            "description": "Emit a signal when a contract crosses from outside one of these windows to inside it. Each threshold fires once and is not repeated while the end date stands; if an extension pushes the contract back outside a window, that window can fire again when the calendar catches up. Values must be within the expiry horizon; the defaults are clipped to it automatically. Leave empty to use 365, 180, 90, 60 and 30 days clipped to lookaheadDays."
          },
          "monitorKey": {
            "title": "Monitor key",
            "pattern": "^[A-Za-z0-9_-]{1,80}$",
            "minLength": 1,
            "maxLength": 80,
            "type": "string",
            "description": "Names the stored baseline this run compares against. Use one key per portfolio (for example defence-it). Changing it starts a fresh baseline. Two runs sharing a key never run at the same time; the second waits or fails rather than corrupting the baseline.",
            "default": "default"
          },
          "mode": {
            "title": "What to return",
            "enum": [
              "changesOnly",
              "snapshotAndChanges"
            ],
            "type": "string",
            "description": "changesOnly returns the first-run baseline and, after that, only recompete signals and contract changes - and it only re-reads contracts that could have moved, which is what makes a scheduled run cheap. snapshotAndChanges re-verifies every watched contract on every run and also returns the unchanged ones.",
            "default": "changesOnly"
          },
          "baselineMode": {
            "title": "First run under a monitor key",
            "enum": [
              "emitSnapshot",
              "storeOnly"
            ],
            "type": "string",
            "description": "emitSnapshot returns the current record for every contract discovered on the first run. storeOnly saves the baseline silently, so the first scheduled alert is a real signal rather than a full export.",
            "default": "emitSnapshot"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}