{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper – New Contract Opportunity Alerts",
    "description": "SAM.gov scraper for federal contract opportunities by NAICS, set-aside, agency and state. Newest 25 per run, or only new/amended with a saved monitor name.",
    "version": "0.2",
    "x-build-id": "dH44qMT15YbsTOY7a"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cce_partners~samgov-opportunity-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cce_partners-samgov-opportunity-radar",
        "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/cce_partners~samgov-opportunity-radar/runs": {
      "post": {
        "operationId": "runs-sync-cce_partners-samgov-opportunity-radar",
        "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/cce_partners~samgov-opportunity-radar/run-sync": {
      "post": {
        "operationId": "run-sync-cce_partners-samgov-opportunity-radar",
        "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": {
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Optional. Free SAM.gov public API key (sam.gov > Account Details) for real-time results. Leave empty for keyless mode: official SAM.gov public nightly extract, up to 24h old."
          },
          "keywords": {
            "title": "Title keywords",
            "type": "string",
            "description": "Search within opportunity titles, e.g. 'cybersecurity'."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "e.g. 541512, 238210",
            "items": {
              "type": "string"
            }
          },
          "setAside": {
            "title": "Set-aside code",
            "enum": [
              "",
              "SBA",
              "SBP",
              "8A",
              "8AN",
              "HZC",
              "HZS",
              "SDVOSBC",
              "SDVOSBS",
              "WOSB",
              "WOSBSS",
              "EDWOSB",
              "EDWOSBSS",
              "VSA",
              "VSS"
            ],
            "type": "string",
            "description": "Optional SAM.gov set-aside filter."
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "SAM.gov ptype codes: o=Solicitation, p=Presolicitation, k=Combined Synopsis, r=Sources Sought, s=Special Notice, a=Award, u=J&A, g=Sale of Surplus, i=Intent to Bundle.",
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "Two-letter code, e.g. VA."
          },
          "organizationCode": {
            "title": "Agency/organization code",
            "type": "string",
            "description": "Optional SAM.gov organization code."
          },
          "lookbackDays": {
            "title": "Posted in last N days",
            "minimum": 1,
            "maximum": 364,
            "type": "integer",
            "description": "Only notices posted within this many days (1–364). Without a monitor name, each run returns the newest notices from this window.",
            "default": 7
          },
          "maxItems": {
            "title": "Max opportunities",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of opportunities returned (and charged) per run, newest first. Leave empty for the default: 25 without a monitor name, 1,000 with one. Without a monitor name there is no change tracking (unless saved state from version 0.2.7 or earlier exists for these filters): each run returns the newest notices in the lookback window, including ones earlier runs returned. With a monitor name, the newest matching notices are compared with the saved state first (up to 10,000 in keyless mode; with an API key the first 1,000, or this value if larger), and new or changed ones beyond this limit come on the next run."
          },
          "monitorName": {
            "title": "Monitor name (only new results)",
            "type": "string",
            "description": "Set a name (e.g. '8a-it-daily') to get only NEW or AMENDED notices: the Actor saves a fingerprint of every notice this monitor returned, and later runs with the same name return only notices that are new or changed. Use one name per filter set. Leave empty to get the newest notices in the lookback window each run (nothing saved, up to 25 by default)."
          },
          "emitUnchanged": {
            "title": "Also output unchanged",
            "type": "boolean",
            "description": "Monitor name only: also output notices this monitor already returned with no changes (marked unchanged; not charged).",
            "default": false
          },
          "resetState": {
            "title": "Reset memory (treat all as new)",
            "type": "boolean",
            "description": "Monitor name only: forget this monitor's saved state so all matching notices are treated as new.",
            "default": false
          },
          "aiTagging": {
            "title": "Add tags (sector, set-aside category, stage, days to respond)",
            "type": "boolean",
            "description": "Free rule-based tags. Add an AI key below to also get a plain-English summary.",
            "default": false
          },
          "aiApiKey": {
            "title": "AI API key (optional)",
            "type": "string",
            "description": "OpenAI-compatible key for the one-line 'what they're buying' summary. Only title and codes are sent; never contact data."
          },
          "aiBaseUrl": {
            "title": "AI base URL",
            "type": "string",
            "description": "OpenAI-compatible API base URL used for optional AI summaries.",
            "default": "https://api.openai.com/v1"
          },
          "aiModel": {
            "title": "AI model",
            "type": "string",
            "description": "e.g. a small, cheap chat model."
          },
          "includeDetails": {
            "title": "Include full notice description",
            "type": "boolean",
            "description": "Adds the notice description text to each row (emails, phone numbers and labeled contact names removed). Keyless: from the nightly extract, free. With an API key: only up to maxDescriptionFetches (default 0), since each costs a SAM.gov API request.",
            "default": true
          },
          "maxDescriptionChars": {
            "title": "Max description length (characters)",
            "minimum": 200,
            "maximum": 100000,
            "type": "integer",
            "description": "Longer descriptions are cut.",
            "default": 10000
          },
          "maxDescriptionFetches": {
            "title": "Max description requests per run (API key mode)",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "API key mode only. Default 0 = no descriptions in key mode, because each one is a SAM.gov API request against your daily limit (non-federal keys without a SAM.gov role: 10/day; with a role: 1,000/day). Set e.g. 25 to opt in. Keyless mode always includes descriptions for free.",
            "default": 0
          },
          "attachmentKeywords": {
            "title": "Attachment keywords (API key required)",
            "type": "array",
            "description": "Optional. Downloads each returned notice's public attachments via the official API resourceLinks (with your key), and reports which of these keywords appear in PDF/text attachments (attachmentKeywordHits). Attachment text itself is not returned. Each download counts toward your SAM.gov daily limit.",
            "items": {
              "type": "string"
            }
          },
          "maxAttachmentDownloads": {
            "title": "Max attachment downloads per run",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Hard cap on attachment downloads (API key mode).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}