{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Deadline & Watchlist Change Monitor",
    "description": "Monitor SAM.gov watchlists for response deadline, status, attachment, and amendment-like metadata changes.",
    "version": "0.1",
    "x-build-id": "uhdXtNYpJ4cmdyWjZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/orbiscribe~sam-gov-amendment-deadline-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-orbiscribe-sam-gov-amendment-deadline-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/orbiscribe~sam-gov-amendment-deadline-monitor/runs": {
      "post": {
        "operationId": "runs-sync-orbiscribe-sam-gov-amendment-deadline-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/orbiscribe~sam-gov-amendment-deadline-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-orbiscribe-sam-gov-amendment-deadline-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": {
          "watchlist": {
            "title": "Watchlist",
            "type": "array",
            "description": "SAM.gov opportunity identifiers to monitor. Use notice IDs or solicitation numbers.",
            "default": [
              {
                "id": "FA8750-26-R-0001",
                "type": "solicitationNumber",
                "label": "Demo cybersecurity pursuit",
                "owner": "BD lead",
                "client": "Demo client"
              }
            ]
          },
          "watchlistCsv": {
            "title": "Watchlist CSV",
            "type": "string",
            "description": "Optional CSV paste with columns like solicitationNumber, noticeId, label, owner, client, externalId.",
            "default": ""
          },
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Optional. Required for live SAM.gov API lookup and richer resource-link monitoring. Dry runs do not require it."
          },
          "enrichmentMode": {
            "title": "Enrichment mode",
            "enum": [
              "none",
              "api_if_key_present",
              "require_api"
            ],
            "type": "string",
            "description": "Use no API, use SAM.gov API if a key is present, or require API enrichment.",
            "default": "api_if_key_present"
          },
          "dataSourceUrl": {
            "title": "Data source URL",
            "type": "string",
            "description": "Optional CSV or JSON URL with SAM.gov-like records. Useful for bulk exports or controlled tests without a SAM.gov API key."
          },
          "profileFilters": {
            "title": "Profile filters",
            "type": "object",
            "description": "Optional fit scoring profile. Discovery is secondary; watchlist monitoring works without these fields.",
            "default": {
              "naicsCodes": [],
              "pscCodes": [],
              "setAsideCodes": [],
              "agencies": [],
              "keywords": [],
              "excludeKeywords": [],
              "locations": []
            }
          },
          "includeDiscovery": {
            "title": "Include discovery mode",
            "type": "boolean",
            "description": "Experimental. Use profile filters to emit matched_new_opportunity rows from official SAM.gov search results when an API key is provided.",
            "default": false
          },
          "emitInitialFound": {
            "title": "Emit initial found events",
            "type": "boolean",
            "description": "Emit new_watchlist_item_found rows on the first baseline run.",
            "default": true
          },
          "emitCosmeticChanges": {
            "title": "Emit cosmetic changes",
            "type": "boolean",
            "description": "Emit title-only punctuation/case changes. Usually leave this off to reduce noise.",
            "default": false
          },
          "maxDiscoveryResults": {
            "title": "Max discovery results",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum discovery matches to normalize when discovery mode is enabled.",
            "default": 100
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap for SAM.gov API requests per run.",
            "default": 50
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "SAM.gov API posted-from date in MM/DD/YYYY format. Leave blank to default to one year before the run date."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "SAM.gov API posted-to date in MM/DD/YYYY format. Leave blank to default to the run date."
          },
          "snapshotStoreName": {
            "title": "Snapshot store name",
            "type": "string",
            "description": "Named key-value store used to persist previous successful snapshots across scheduled runs.",
            "default": "sam-gov-amendment-deadline-monitor"
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Run against bundled demo records. Turn off for live dataSourceUrl or SAM.gov API checks.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}