{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Opportunity & Amendment Change Tracker",
    "description": "Track federal contract opportunities from SAM.gov public data and see exactly what changed when a notice is amended: deadline moves, set-aside, NAICS, place of performance, contacts and description text.",
    "version": "1.0",
    "x-build-id": "lhVwvMzf3b8LsGLxT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hollowoaklabs~samgov-amendment-change-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hollowoaklabs-samgov-amendment-change-tracker",
        "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/hollowoaklabs~samgov-amendment-change-tracker/runs": {
      "post": {
        "operationId": "runs-sync-hollowoaklabs-samgov-amendment-change-tracker",
        "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/hollowoaklabs~samgov-amendment-change-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-hollowoaklabs-samgov-amendment-change-tracker",
        "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": {
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Match opportunities whose NAICS code starts with any of these (e.g. 561720 for janitorial, or 2382 for all building-equipment contractors). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Keep only these set-asides. Leave empty for all, including unrestricted.",
            "items": {
              "type": "string",
              "enum": [
                "ANY_SMALL_BUSINESS",
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BI",
                "NONE"
              ],
              "enumTitles": [
                "Any small-business set-aside (all codes below except NONE)",
                "Total Small Business Set-Aside (SBA)",
                "Partial Small Business Set-Aside (SBP)",
                "8(a) Set-Aside (8A)",
                "8(a) Sole Source (8AN)",
                "HUBZone Set-Aside (HZC)",
                "HUBZone Sole Source (HZS)",
                "Service-Disabled Veteran-Owned Small Business Set-Aside (SDVOSBC)",
                "SDVOSB Sole Source (SDVOSBS)",
                "Women-Owned Small Business Set-Aside (WOSB)",
                "WOSB Sole Source (WOSBSS)",
                "Economically Disadvantaged WOSB Set-Aside (EDWOSB)",
                "EDWOSB Sole Source (EDWOSBSS)",
                "Veteran-Owned Small Business Set-Aside (VA) (VSA)",
                "VOSB Sole Source (VA) (VSS)",
                "Indian Small Business Economic Enterprise (ISBEE)",
                "Indian Economic Enterprise (IEE)",
                "Buy Indian (BI)",
                "No set-aside (NONE)"
              ]
            }
          },
          "states": {
            "title": "States (place of performance)",
            "type": "array",
            "description": "Two-letter state codes, e.g. AL, GA, TX. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "useOfficeStateWhenNoPlaceOfPerformance": {
            "title": "Use contracting-office state when place of performance is blank",
            "type": "boolean",
            "description": "Some notices leave the place of performance empty. When on, the contracting office's state is used for the state filter instead.",
            "default": true
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep opportunities whose title or description contains at least one of these words or phrases (case-insensitive, matches word starts). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop opportunities whose title or description contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted (or last amended) within days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only opportunities whose latest version was posted in the last N days. Use 1-2 for a daily schedule.",
            "default": 7
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Defaults to biddable notice types. Add Award Notice to follow awards.",
            "items": {
              "type": "string",
              "enum": [
                "Combined Synopsis/Solicitation",
                "Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Modification/Amendment/Cancel",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle"
              ]
            },
            "default": [
              "Combined Synopsis/Solicitation",
              "Solicitation",
              "Presolicitation",
              "Sources Sought",
              "Special Notice",
              "Modification/Amendment/Cancel"
            ]
          },
          "onlyChanged": {
            "title": "Only amended / changed opportunities",
            "type": "boolean",
            "description": "Output only opportunities that have an earlier version to compare against (amended, or updated since your last run). New, never-amended notices are skipped.",
            "default": false
          },
          "openOnly": {
            "title": "Open opportunities only",
            "type": "boolean",
            "description": "Skip notices whose response deadline has passed or that SAM.gov marks inactive.",
            "default": true
          },
          "skipAlreadyDelivered": {
            "title": "Skip results already delivered by this tracker",
            "type": "boolean",
            "description": "On scheduled runs, don't output (or charge for) an opportunity again unless it changed since this tracker last delivered it.",
            "default": true
          },
          "trackerName": {
            "title": "Tracker name",
            "type": "string",
            "description": "Version history is remembered per tracker name in a named key-value store in your account (samgov-change-tracker-<name>). Use different names for independent watchlists.",
            "default": "default"
          },
          "maxResults": {
            "title": "Max results per run",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit on items output (and charged) per run. 0 = no limit.",
            "default": 1000
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Include the notice's full description text.",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Description max characters",
            "minimum": 0,
            "type": "integer",
            "description": "Trim description text in the output to this many characters. 0 = no trimming. Diffs always use the full text.",
            "default": 0
          },
          "includeContacts": {
            "title": "Include points of contact",
            "type": "boolean",
            "description": "Include the contracting officer contacts SAM.gov publishes with each notice, and report contact changes.",
            "default": true
          },
          "skipIfFileUnchanged": {
            "title": "Skip run if SAM.gov has not published a new file",
            "type": "boolean",
            "description": "SAM.gov refreshes the data file about once a day. If it has not changed since this tracker's last run, finish immediately with no results and no charge.",
            "default": true
          },
          "samApiKey": {
            "title": "SAM.gov API key (optional, for attachment changes)",
            "type": "string",
            "description": "Optional. Your own free api.sam.gov key. When set, attachment lists are fetched from the official SAM.gov Opportunities API for amended notices so added/removed files can be reported. Public keys have low daily limits."
          },
          "maxAttachmentLookups": {
            "title": "Max attachment API calls per run",
            "minimum": 0,
            "type": "integer",
            "description": "Two calls are used per amended opportunity (current and previous version). Keep within your SAM.gov key's daily limit.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}