{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Opportunities Scraper",
    "description": "Collect public SAM.gov opportunities and return structured records with titles, notice types, solicitation numbers, agencies, dates, NAICS codes, and contact details. Search by multiple keywords, set a modification-date lookback, and use scheduled runs to emit only new or changed notices.",
    "version": "0.1",
    "x-build-id": "uQVgiWprb94wZs2Kh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/axiomworks~sam-gov-opportunities-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-axiomworks-sam-gov-opportunities-scraper",
        "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/axiomworks~sam-gov-opportunities-scraper/runs": {
      "post": {
        "operationId": "runs-sync-axiomworks-sam-gov-opportunities-scraper",
        "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/axiomworks~sam-gov-opportunities-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-axiomworks-sam-gov-opportunities-scraper",
        "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",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Opportunity keyword searches",
            "type": "array",
            "description": "Search public active SAM.gov notices with one search per term, e.g. [\"cybersecurity\", \"janitorial services\"]. Each term accepts 1-200 characters; URLs and IDs are not direct lookups. Results are deduplicated across terms and share maxItems. Required; no API default.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice type labels",
            "type": "array",
            "description": "Include notice labels, e.g. [\"Solicitation\", \"Sources Sought\"], using the listed choices (case-insensitive). Default [] includes all types. Combined with keyword, modification-window and code filters.",
            "items": {
              "type": "string",
              "enum": [
                "Presolicitation",
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Intent to Bundle Requirements",
                "Justification",
                "Sale of Surplus Property"
              ]
            },
            "default": []
          },
          "naicsCodes": {
            "title": "Primary NAICS code strings",
            "type": "array",
            "description": "Include exact primary NAICS code strings, e.g. [\"541512\"]. Default [] includes all codes. Applied after detail retrieval; missing codes cannot match. Values within this list are alternatives; all selected filter fields must match.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "postedWithinDays": {
            "title": "Modification lookback in days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Include notices modified in the last 1-3650 days, e.g. 30; default 7. Uses modifiedDate, not publishDate, and can include older notices that changed recently. Increase this window if a keyword returns no results.",
            "default": 7
          },
          "onlyNewSinceLastRun": {
            "title": "Suppress previously seen unchanged notices",
            "type": "boolean",
            "description": "Set true to emit only new IDs or changed modifiedDate values, e.g. true for scheduled monitoring; default false returns matching notices each run. History is shared in named store sam-gov-opportunities-monitor across this account’s runs. An unchanged search can return zero rows.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum notices across all keywords",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limit total emitted notices across all keywords to 1-10000, e.g. 20; default 50. Duplicates and filtered notices do not count. Returns exactly this many when enough matches exist, otherwise fewer. This limits results, not requests.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "SAM.gov request proxy settings",
            "type": "object",
            "description": "Choose SAM.gov routing, e.g. {\"useApifyProxy\":true}; default enables Apify datacenter proxy with fresh-session retries. Persistent datacenter blocks trigger RESIDENTIAL fallback if available. Set apifyProxyGroups to [\"RESIDENTIAL\"] to use it initially. Persistent blocks yield zero rows successfully; retry later or change proxyConfiguration.",
            "default": {
              "useApifyProxy": true
            }
          },
          "pscCodes": {
            "title": "Exact Product Service Code strings",
            "type": "array",
            "description": "Include exact classificationCode values, e.g. [\"D302\", \"R499\"], case-insensitive. Default [] includes all PSC codes. Applied after detail retrieval together with other filters; missing codes cannot match.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "setAsideCodes": {
            "title": "Exact set-aside code strings",
            "type": "array",
            "description": "Include exact setAside values, e.g. [\"SBA\", \"8A\", \"NONE\"], case-insensitive. Default [] includes all set-asides. Applied after detail retrieval together with other filters. NONE matches an explicit source code; missing values cannot match.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "agencyNames": {
            "title": "Agency or office name matches",
            "type": "array",
            "description": "Include notices whose published agency, subagency or office name contains any supplied text, case-insensitive, e.g. [\"DEFENSE\"]. Default [] includes all organizations. Applied before detail requests and combined with all other filters.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance state codes",
            "type": "array",
            "description": "Include exact published place-of-performance state codes, case-insensitive, e.g. [\"CO\", \"VA\"]. Default [] includes all states. Applied after detail retrieval; notices without a state cannot match. This is the work location, not the contracting office address.",
            "items": {
              "type": "string"
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}