{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Contracts Monitor & API — Federal Bid Alerts",
    "description": "Monitor new U.S. federal contract opportunities from official SAM.gov data. It works with no key, using SAM.gov's nightly public file, or you can add your free SAM.gov API key for live same-day data. Filter by NAICS, set-aside, agency, state, deadline, keywords and minimum value. Only-new alerts.",
    "version": "0.1",
    "x-build-id": "cSmeTxkzRGSDG51cl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cranewell~sam-gov-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cranewell-sam-gov-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/cranewell~sam-gov-monitor/runs": {
      "post": {
        "operationId": "runs-sync-cranewell-sam-gov-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/cranewell~sam-gov-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-cranewell-sam-gov-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": {
          "apiKey": {
            "title": "SAM.gov public API key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use SAM.gov's official public Contract Opportunities extract (no key, no account; rebuilt once a day, so it can lag the live site by about a day). Add your own free key (sam.gov > Account Details > Public API Key) to query the live SAM.gov Opportunities API instead. Non-federal keys without a SAM.gov role get 10 requests/day; with a role 1,000/day."
          },
          "postedFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Posted from (YYYY-MM-DD)."
          },
          "postedTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Default today. Max range 1 year (API rule; also applied without a key)."
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "When no from-date is set, look back this many days.",
            "default": 7
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep notices whose title/buyer contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices whose title/buyer contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "title": {
            "title": "Title contains",
            "type": "string",
            "description": "Title contains this text (server-side with a key; matched on the extract without a key)."
          },
          "codes": {
            "title": "NAICS codes / prefixes",
            "type": "array",
            "description": "One full 6-digit code is filtered by the API; several codes or prefixes are filtered after download.",
            "items": {
              "type": "string"
            }
          },
          "classificationCode": {
            "title": "PSC classification code",
            "type": "string",
            "description": "PSC classification code."
          },
          "procurementTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Notice types.",
            "items": {
              "type": "string",
              "enum": [
                "o",
                "k",
                "p",
                "r",
                "s",
                "a",
                "u",
                "g",
                "i"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification (J&A)",
                "Sale of Surplus Property",
                "Intent to Bundle (DoD)"
              ]
            }
          },
          "setAside": {
            "title": "Set-aside",
            "enum": [
              "SBA",
              "SBP",
              "8A",
              "8AN",
              "HZC",
              "HZS",
              "SDVOSBC",
              "SDVOSBS",
              "WOSB",
              "WOSBSS",
              "EDWOSB",
              "EDWOSBSS",
              "LAS",
              "IEE",
              "ISBEE",
              "BICiv",
              "VSA",
              "VSS"
            ],
            "type": "string",
            "description": "Set-aside."
          },
          "state": {
            "title": "Place of performance state",
            "type": "string",
            "description": "2-letter place-of-performance state code, e.g. VA. Without a key this matches the extract's PopState column, which is blank on many notices (about 3 in 4 on 2026-10-28), so those notices are excluded when this is set."
          },
          "organizationName": {
            "title": "Agency / organization name",
            "type": "string",
            "description": "Agency / organization name."
          },
          "deadlineFrom": {
            "title": "Response deadline from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Response deadline from."
          },
          "deadlineTo": {
            "title": "Response deadline to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Response deadline to."
          },
          "minValue": {
            "title": "Minimum value",
            "type": "integer",
            "description": "Drop notices with a value below this (notices without a value are dropped when set)."
          },
          "onlyNew": {
            "title": "Only new since last run",
            "type": "boolean",
            "description": "Output only notices not seen in previous runs with the same filters (state is kept in a named key-value store, keyed by a hash of your filters).",
            "default": true
          },
          "resetState": {
            "title": "Reset seen-ID state",
            "type": "boolean",
            "description": "Forget previously seen notices for this filter set before running.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on results output (and charged) per run.",
            "default": 1000
          },
          "webhookSummary": {
            "title": "Write run summary",
            "type": "boolean",
            "description": "Save a compact JSON summary (counts + new items) to the default key-value store under key SUMMARY, for use in Apify webhooks/integrations.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store for seen IDs. Leave default unless you want separate state."
          },
          "maxPages": {
            "title": "Max API pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "API mode only (with a key): each page is 1 API request (up to 1,000 notices). Keep low on 10-requests/day keys.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}