{
  "openapi": "3.0.1",
  "info": {
    "title": "US Federal Tender Monitor (SAM.gov)",
    "description": "New US federal contract opportunities from SAM.gov by keyword and NAICS code: only new notices since the last run, award notices excluded, set-asides and an alert digest. Bring your own free SAM.gov API key.",
    "version": "0.1",
    "x-build-id": "N1v93JYUXC6J6fjfX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mikee368~us-federal-tender-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mikee368-us-federal-tender-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/mikee368~us-federal-tender-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mikee368-us-federal-tender-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/mikee368~us-federal-tender-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mikee368-us-federal-tender-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "English keywords searched in SAM.gov notice titles, e.g. software, cybersecurity, janitorial. One SAM.gov request per keyword (if you list more keywords than your request cap, one date-window search is made and titles are matched locally).",
            "default": [
              "software"
            ],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (optional)",
            "type": "array",
            "description": "US NAICS codes (2-6 digits, e.g. 541511 = custom computer programming, 541512 = computer systems design). One SAM.gov request per code; your keywords (if any) are then matched on the notice title.",
            "items": {
              "type": "string"
            }
          },
          "samGovApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your own free public API key: sign in at SAM.gov, open Account Details and request a Public API Key. Keys must be renewed every 90 days (SAM.gov terms); update it here when it expires. A basic key allows about 10 requests per day."
          },
          "samGovMaxRequests": {
            "title": "SAM.gov requests per run",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Hard cap on SAM.gov API calls per run, to stay within your key's daily quota (basic keys: about 10/day). Each call returns up to 1,000 notices. If the cap stops a run early, the next run continues from the same date.",
            "default": 3
          },
          "strictMatch": {
            "title": "Strict keyword match",
            "type": "boolean",
            "description": "Keep only notices whose title contains one of your keywords.",
            "default": true
          },
          "dateFrom": {
            "title": "Published on or after",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Leave EMPTY for incremental monitoring (recommended): each run starts from the day of the previous successful run of this Monitor ID, and already-seen notices are skipped. The first run looks back 'First-run lookback' days. Set a date (YYYY-MM-DD) only for one-off backfills."
          },
          "firstRunLookbackDays": {
            "title": "First-run lookback (days)",
            "minimum": 0,
            "maximum": 90,
            "type": "integer",
            "description": "How many days back the very first run of a Monitor ID searches when 'Published on or after' is empty.",
            "default": 3
          },
          "maxItemsPerSource": {
            "title": "Max notices per run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap per source, which also caps cost.",
            "default": 50
          },
          "excludeAwards": {
            "title": "Skip award notices",
            "type": "boolean",
            "description": "Skip award notices (contracts already awarded). Recommended for finding opportunities to bid on.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new notices (monitor mode)",
            "type": "boolean",
            "description": "Remember notice IDs between runs (per Monitor ID) and output only notices not seen before. Default on; combine with an empty 'Published on or after' for a clean incremental feed.",
            "default": true
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of this monitor. Each monitor ID remembers which SAM.gov notices it has already returned, so scheduled runs give only new ones. Use a different ID per search.",
            "default": "default"
          },
          "resetState": {
            "title": "Reset monitor memory",
            "type": "boolean",
            "description": "Forget the seen notices and last-run time of this Monitor ID before running (starts again with the first-run lookback).",
            "default": false
          },
          "createDigest": {
            "title": "Write alert digest",
            "type": "boolean",
            "description": "Store a DIGEST record per run (counts per source, list of new notices, ready-made email subject/text/HTML) in the run's key-value store.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "If set, the DIGEST JSON is POSTed here at the end of each run that found new notices (e.g. a Make, Zapier, n8n or Slack-workflow webhook that emails or posts it)."
          },
          "notifyWhenEmpty": {
            "title": "Notify even when nothing new",
            "type": "boolean",
            "description": "Also call the webhook when a run finds 0 new notices.",
            "default": false
          },
          "digestEmailTo": {
            "title": "Digest e-mail recipient (optional)",
            "type": "string",
            "description": "Copied into DIGEST.email.to so your webhook/automation knows where to send it. The Actor itself does not send e-mails."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}