{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contract Opportunities Monitor",
    "description": "SAM.gov federal contract opportunities feed: solicitations, sources sought, awards. Filter by NAICS, set-aside, agency, state, keywords. Monitor mode delivers only new notices each run. No login or API key. $2 per 1,000 notices.",
    "version": "1.0",
    "x-build-id": "pazpyDWVOr55u1j0m"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hanielazevedo~samgov-contract-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hanielazevedo-samgov-contract-opportunities",
        "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/hanielazevedo~samgov-contract-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-hanielazevedo-samgov-contract-opportunities",
        "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/hanielazevedo~samgov-contract-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-hanielazevedo-samgov-contract-opportunities",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "monitor"
            ],
            "type": "string",
            "description": "<b>search</b> returns every matching notice. <b>monitor</b> remembers what it already delivered (in the named key-value store <code>samgov-opportunities-state</code>, one entry per saved search) and only delivers new or changed notices, so you pay once per notice. Schedule it daily.",
            "default": "search"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases matched (case/accent-insensitive, word-prefix) against title, solicitation number and, by default, the full description. Example: <code>cybersecurity</code>, <code>janitorial</code>, <code>zero trust</code>.",
            "items": {
              "type": "string"
            }
          },
          "keywordMatch": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Whether a notice must contain any or all of the keywords.",
            "default": "any"
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices containing any of these words.",
            "items": {
              "type": "string"
            }
          },
          "searchDescription": {
            "title": "Search descriptions too",
            "type": "boolean",
            "description": "Also match keywords inside the full notice description (more matches). Turn off to match title and solicitation number only.",
            "default": true
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2-6 digit NAICS prefixes. <code>5415</code> matches 541511, 541512, 541519... Example: <code>541512</code>, <code>236220</code>.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC (product/service) codes",
            "type": "array",
            "description": "1-4 character PSC/classification prefixes, e.g. <code>D3</code> (IT services), <code>R4</code>, <code>S201</code>.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Keep only notices with these set-asides. <b>ANY</b> = any small-business set-aside, <b>NONE</b> = full and open.",
            "items": {
              "type": "string",
              "enum": [
                "ANY",
                "NONE",
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "ESB"
              ],
              "enumTitles": [
                "Any set-aside (all small-business programs)",
                "Full & open (no set-aside)",
                "Total Small Business (SBA)",
                "Partial Small Business (SBP)",
                "8(a) competed (8A)",
                "8(a) sole source (8AN)",
                "HUBZone (HZC)",
                "HUBZone sole source (HZS)",
                "Service-Disabled Veteran-Owned SB (SDVOSBC)",
                "SDVOSB sole source (SDVOSBS)",
                "Women-Owned SB (WOSB)",
                "WOSB sole source (WOSBSS)",
                "Economically Disadvantaged WOSB (EDWOSB)",
                "EDWOSB sole source (EDWOSBSS)",
                "Veteran-Owned SB, VA (VSA)",
                "Veteran-Owned SB sole source, VA (VSS)",
                "Local Area Set-Aside (LAS)",
                "Indian Economic Enterprise (IEE)",
                "Indian Small Business Economic Enterprise (ISBEE)",
                "Buy Indian (BICiv)",
                "Emerging Small Business (ESB)"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Keep only these notice types (e.g. Solicitation, Combined Synopsis/Solicitation, Sources Sought). Empty = all types.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Modification/Amendment/Cancel",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Department, sub-tier or office names (word match, e.g. <code>Veterans Affairs</code>, <code>Army</code>, <code>NASA</code>), or exact CGAC / FPDS / AAC codes (e.g. <code>036</code>, <code>W912DY</code>).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "2-letter US state codes, e.g. <code>VA</code>, <code>MD</code>, <code>DC</code>.",
            "items": {
              "type": "string"
            }
          },
          "stateField": {
            "title": "State applies to",
            "enum": [
              "placeOfPerformance",
              "office",
              "either"
            ],
            "type": "string",
            "description": "Which address the state filter checks.",
            "default": "placeOfPerformance"
          },
          "postedWithinDays": {
            "title": "Posted (or updated) within the last N days",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Only notices posted or amended in the last N days (US Eastern dates). 0 = no limit (the extract holds all active notices). Smaller windows are faster and download less.",
            "default": 3
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "YYYY-MM-DD. Combined with the window above, the later date wins."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive)."
          },
          "responseDeadlineFrom": {
            "title": "Response deadline from",
            "type": "string",
            "description": "YYYY-MM-DD. Notices without a deadline are excluded when a deadline range is set."
          },
          "responseDeadlineTo": {
            "title": "Response deadline to",
            "type": "string",
            "description": "YYYY-MM-DD (inclusive)."
          },
          "openOnly": {
            "title": "Open opportunities only",
            "type": "boolean",
            "description": "Drop award notices and notices whose response deadline has passed.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many notices. You pay per notice delivered, so this caps your cost per run.",
            "default": 50
          },
          "includeDescription": {
            "title": "Include full description",
            "type": "boolean",
            "description": "Include the full plain-text notice description.",
            "default": true
          },
          "descriptionMaxChars": {
            "title": "Truncate description to N characters",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "0 = full text (descriptions can reach 32,000 characters).",
            "default": 0
          },
          "includeUpdated": {
            "title": "Monitor: also deliver changed notices",
            "type": "boolean",
            "description": "In monitor mode, re-deliver a notice already seen when its row changed (amendment, new deadline, award). Marked <code>changeType: \"updated\"</code>.",
            "default": true
          },
          "firstRun": {
            "title": "Monitor: first run",
            "enum": [
              "deliver",
              "baseline"
            ],
            "type": "string",
            "description": "<b>baseline</b> records current matches without delivering them, so you are only alerted about later notices.",
            "default": "deliver"
          },
          "stateKey": {
            "title": "Monitor: state key",
            "type": "string",
            "description": "Optional name for this monitor's memory. By default it is derived from your filters, so changing filters starts a new monitor. Letters, digits, ! - _ . ' ( )."
          },
          "fullScan": {
            "title": "Read the whole file",
            "type": "boolean",
            "description": "Disable the early stop (the extract is sorted newest first, so by default reading stops once rows fall out of the date window). Only needed for unusual data.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}