{
  "openapi": "3.0.1",
  "info": {
    "title": "🇺🇸 SAM.gov Contracts Monitor",
    "description": "Pull live federal contract opportunities from the official SAM.gov API, enriched with award history from USAspending. For BD teams, capture managers, and AI agents tracking federal procurement. Export, run via API, schedule, or integrate with other tools.",
    "version": "0.1",
    "x-build-id": "zbUXzj5VqVjfmqWLD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/skootle~sam-gov-federal-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-skootle-sam-gov-federal-contracts",
        "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/skootle~sam-gov-federal-contracts/runs": {
      "post": {
        "operationId": "runs-sync-skootle-sam-gov-federal-contracts",
        "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/skootle~sam-gov-federal-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-skootle-sam-gov-federal-contracts",
        "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": [
          "samGovApiKey"
        ],
        "properties": {
          "samGovApiKey": {
            "title": "SAM.gov API key (paste here)",
            "type": "string",
            "description": "Required. Get a free key in 4 steps: (1) Sign in at https://sam.gov with login.gov. (2) Click your name → My Account. (3) Skip the optional 'Request Role' step. (4) On Account Details, scroll to 'Public API Keys' → click 'Request API Key' → confirm with your password. Copy the key and paste it here. Stored encrypted; never visible to anyone, including the actor author. Rotate every 90 days per SAM.gov terms."
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Free-text full-text search across opportunity titles and descriptions, e.g. ['cybersecurity', 'logistics'].",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Comma-separated NAICS codes to filter by industry, e.g. ['541511', '541512'] for software development services.",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Small business set-aside categories.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "8A",
                "HZC",
                "SDVOSBC",
                "WOSB",
                "EDWOSB",
                "VSA",
                "VOSB",
                "ISBEE"
              ],
              "enumTitles": [
                "Small Business Total Set-Aside (SBA)",
                "8(a) Sole Source / Competitive (8A)",
                "HUBZone Set-Aside (HZC)",
                "Service-Disabled Veteran-Owned Small Business Set-Aside (SDVOSBC)",
                "Women-Owned Small Business Set-Aside (WOSB)",
                "Economically Disadvantaged WOSB (EDWOSB)",
                "Veteran-Owned Small Business Sole Source (VSA)",
                "Veteran-Owned Small Business Set-Aside (VOSB)",
                "Indian Small Business Economic Enterprise (ISBEE)"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Filter by federal agency name keyword(s), e.g. ['Defense', 'GSA', 'NASA'].",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Filter by U.S. state codes for place of performance, e.g. ['VA', 'CA', 'TX'].",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Limit to specific notice categories.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Presolicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Award Notice",
                "Special Notice"
              ],
              "enumTitles": [
                "Solicitation",
                "Presolicitation",
                "Combined Synopsis/Solicitation",
                "Sources Sought",
                "Award Notice",
                "Special Notice"
              ]
            }
          },
          "postedFrom": {
            "title": "Posted from (ISO date)",
            "type": "string",
            "description": "Earliest posted date (YYYY-MM-DD). Defaults to 7 days ago."
          },
          "postedTo": {
            "title": "Posted to (ISO date)",
            "type": "string",
            "description": "Latest posted date (YYYY-MM-DD). Defaults to today."
          },
          "enrichWithUsaspending": {
            "title": "Enrich with USAspending award history",
            "type": "boolean",
            "description": "When true, every opportunity is augmented with recent NAICS-matched award history from USAspending (recipient, amount, date, agency).",
            "default": true
          },
          "enrichmentLookbackMonths": {
            "title": "USAspending lookback (months)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How far back to query USAspending awards by NAICS for enrichment.",
            "default": 24
          },
          "detectChanges": {
            "title": "Detect changes since previous run (monitoring mode)",
            "type": "boolean",
            "description": "When true, the actor reads the previous run's record set from the key-value store, diffs by noticeId + fingerprint, and emits changeStatus = new | updated | unchanged plus changedFields[].",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum opportunity records to save. Default is conservative so the daily auto-test fits Apify's 5-minute window. Raise it for production runs.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}