{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contract Opportunities Monitor",
    "description": "Find & monitor federal contract opportunities (RFPs, RFQs, solicitations) from SAM.gov's official daily file. Filter by NAICS, set-aside, agency, state & deadline. Get new/amended alerts.",
    "version": "0.1",
    "x-build-id": "xctIiKRYpZdwaFvwI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/starwebdigital~samgov-contract-notice-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-starwebdigital-samgov-contract-notice-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/starwebdigital~samgov-contract-notice-monitor/runs": {
      "post": {
        "operationId": "runs-sync-starwebdigital-samgov-contract-notice-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/starwebdigital~samgov-contract-notice-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-starwebdigital-samgov-contract-notice-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": {
          "keywords": {
            "title": "Keywords (any match)",
            "type": "array",
            "description": "Return notices whose title or description contains ANY of these words or phrases (case-insensitive). Leave empty for no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Skip notices whose title or description contains any of these words or phrases.",
            "items": {
              "type": "string"
            }
          },
          "keywordSearchIn": {
            "title": "Search keywords in",
            "enum": [
              "titleAndDescription",
              "title"
            ],
            "type": "string",
            "description": "Where to look for keywords. 'Title only' gives fewer, more precise matches (many descriptions contain boilerplate clauses that mention e.g. cybersecurity).",
            "default": "titleAndDescription"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS codes or prefixes. '5415' matches 541511, 541512, etc. Any listed code matches.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes",
            "type": "array",
            "description": "Product Service Codes or prefixes, e.g. 'D3' (IT services) or 'Z1' (maintenance of real property).",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Small-business set-aside codes. Common: SBA (total small business), SBP (partial), 8A, 8AN, HZC, HZS, SDVOSBC, SDVOSBS, WOSB, WOSBSS, EDWOSB, VSA, ISBEE, IEE, NONE.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to these notice types. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle",
                "Modification/Amendment/Cancel"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Sale of Surplus Property",
                "Consolidate/Bundle",
                "Modification/Amendment/Cancel"
              ]
            }
          },
          "agencyKeywords": {
            "title": "Agency keywords",
            "type": "array",
            "description": "Match against department, sub-tier agency and office names, e.g. 'VETERANS AFFAIRS', 'ARMY', 'FOREST SERVICE'.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state codes for the place of performance, e.g. VA, MD, TX.",
            "items": {
              "type": "string"
            }
          },
          "postedWithinDays": {
            "title": "Posted within last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only notices posted (or last updated) in the last N days. 0 = no limit."
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Only notices posted on or after this date (YYYY-MM-DD)."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "Only notices whose response deadline is on or after this date (YYYY-MM-DD). Notices without a deadline are excluded when a deadline window is set."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "Only notices whose response deadline is on or before this date (YYYY-MM-DD)."
          },
          "deadlineWithinDays": {
            "title": "Deadline within next N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Shortcut: only notices due within the next N days. 0 = no limit."
          },
          "excludeExpired": {
            "title": "Hide notices whose deadline has passed",
            "type": "boolean",
            "description": "Skip notices whose response deadline is already in the past. Notices without a deadline are kept.",
            "default": true
          },
          "deadlineSoonDays": {
            "title": "Deadline-soon threshold (days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "Rows due within this many days get deadlineSoon = true.",
            "default": 7
          },
          "monitorMode": {
            "title": "Monitor mode (only new or amended)",
            "type": "boolean",
            "description": "Remember what was returned before and only return notices that are new or changed since the previous run with the same state key. Schedule the Actor daily to get a feed of fresh opportunities.",
            "default": false
          },
          "monitorStateKey": {
            "title": "Monitor state key",
            "type": "string",
            "description": "Name for this saved search. Use a different key for each separate monitor (e.g. 'it-va', 'construction-tx').",
            "default": "default"
          },
          "monitorFirstRunOutputs": {
            "title": "Return matches on the first monitor run",
            "type": "boolean",
            "description": "On the first run of a new monitor, return all current matches (charged as new). Turn off to save a silent baseline and only get changes from the next run on.",
            "default": true
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Include the notice description. Emails and phone numbers inside the text are removed.",
            "default": true
          },
          "descriptionMaxLength": {
            "title": "Max description length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate descriptions to this many characters. 0 = no limit.",
            "default": 5000
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum notices to return in this run. 0 = no limit.",
            "default": 1000
          },
          "sourceUrl": {
            "title": "Source URL override (advanced)",
            "type": "string",
            "description": "Leave empty. Only for testing with a mirror of the official extract."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}