{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper: Federal Contract Opportunities & RFP Alerts",
    "description": "SAM.gov scraper for U.S. federal government contract opportunities and RFPs. Filter by keyword, NAICS, PSC, set-aside, agency, state and response deadline, and get daily alerts for new and updated bids. Official public data, no API key.",
    "version": "1.0",
    "x-build-id": "7Pim9hmp8Yc17gHYS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~samgov-opportunities-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-samgov-opportunities-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/mosaicked_sponge~samgov-opportunities-monitor/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-samgov-opportunities-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/mosaicked_sponge~samgov-opportunities-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-samgov-opportunities-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 (boolean)",
            "type": "array",
            "description": "One query per line; a notice matches if ANY line matches. Supports AND, OR, NOT, parentheses, \"exact phrases\" and prefix* wildcards, e.g. cyber AND (cloud OR \"zero trust\") NOT training. Whole-word, case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices matching any of these queries (same syntax), e.g. janitorial, \"brand name only\".",
            "items": {
              "type": "string"
            }
          },
          "keywordScope": {
            "title": "Search keywords in",
            "enum": [
              "titleAndDescription",
              "titleOnly"
            ],
            "type": "string",
            "description": "Where keywords are matched.",
            "default": "titleAndDescription"
          },
          "naicsCodes": {
            "title": "NAICS codes or prefixes",
            "type": "array",
            "description": "Full 6-digit codes or prefixes, e.g. 541511 or 5415 (all computer systems design services).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / classification codes or prefixes",
            "type": "array",
            "description": "Product Service Codes or prefixes, e.g. DA01, D3 or R4.",
            "items": {
              "type": "string"
            }
          },
          "setAsideCodes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Keep only these set-asides (leave empty for all). 'No set-aside' matches full-and-open notices.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "ISBEE",
                "IEE",
                "BICiv",
                "LAS",
                "ESB",
                "NONE"
              ],
              "enumTitles": [
                "Small Business Set-Aside (Total)",
                "Small Business Set-Aside (Partial)",
                "8(a) Set-Aside",
                "8(a) Sole Source",
                "HUBZone Set-Aside",
                "HUBZone Sole Source",
                "Service-Disabled Veteran-Owned SB Set-Aside",
                "Service-Disabled Veteran-Owned SB Sole Source",
                "Women-Owned SB Program Set-Aside",
                "Women-Owned SB Program Sole Source",
                "Economically Disadvantaged WOSB Set-Aside",
                "Economically Disadvantaged WOSB Sole Source",
                "Veteran-Owned SB Set-Aside (VA)",
                "Veteran-Owned SB Sole Source (VA)",
                "Indian Small Business Economic Enterprise",
                "Indian Economic Enterprise",
                "Buy Indian Set-Aside (IHS)",
                "Local Area Set-Aside",
                "Emerging Small Business Set-Aside",
                "No set-aside"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Keep only these notice types (matched against the current and the original type). Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Modification/Amendment/Cancel",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle"
              ],
              "enumTitles": [
                "Solicitation",
                "Combined Synopsis/Solicitation",
                "Presolicitation",
                "Sources Sought",
                "Special Notice",
                "Award Notice",
                "Justification",
                "Justification and Approval (J&A)",
                "Modification/Amendment/Cancel",
                "Sale of Surplus Property",
                "Consolidate/(Substantially) Bundle"
              ]
            }
          },
          "agencies": {
            "title": "Agency / office contains",
            "type": "array",
            "description": "Case-insensitive match on department, sub-tier, office, AAC or CGAC code, e.g. 'VETERANS AFFAIRS', 'DEFENSE LOGISTICS', 'SPE4A6', '036'.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter codes, e.g. FL, VA, DC. Many notices have no place of performance; see the next option.",
            "items": {
              "type": "string"
            }
          },
          "stateMatchesOfficeIfNoPlaceOfPerformance": {
            "title": "Use office state when place of performance is blank",
            "type": "boolean",
            "description": "About three in four notices have no place-of-performance state. If enabled, the contracting office's state is used for those.",
            "default": true
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices posted in the last N days (0 = any).",
            "default": 0
          },
          "postedAfter": {
            "title": "Posted on or after",
            "type": "string",
            "description": "Keep notices posted on or after this date (YYYY-MM-DD)."
          },
          "responseDueWithinDays": {
            "title": "Response due within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep notices whose response deadline is between today and N days from now (0 = any). Notices without a deadline are dropped when this is set.",
            "default": 0
          },
          "excludeExpired": {
            "title": "Skip notices whose deadline has passed",
            "type": "boolean",
            "description": "The extract still lists notices for a while after their response deadline.",
            "default": true
          },
          "awardAmountMin": {
            "title": "Award amount at least (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Award notices only - notices without an award amount are dropped when set."
          },
          "awardAmountMax": {
            "title": "Award amount at most (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Award notices only."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "newAndChanged",
              "newOnly",
              "all"
            ],
            "type": "string",
            "description": "Monitor modes return only notices not returned before (plus, in the default mode, notices whose title, deadline, description, set-aside or award changed). The first run returns everything that matches. The form opens on \"All matching notices\" so a first test run always shows results; pick a monitor mode for scheduled runs. API calls that omit this field use \"New and updated notices\".",
            "default": "newAndChanged"
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name of this saved search. Runs with the same ID share memory of returned notices; use one ID per search.",
            "default": "default"
          },
          "firstRunBaseline": {
            "title": "First run: record baseline only",
            "type": "boolean",
            "description": "The first run remembers current matches without returning (or charging for) them; later runs return only what's new.",
            "default": false
          },
          "forceReprocess": {
            "title": "Reprocess even if the extract has not changed",
            "type": "boolean",
            "description": "SAM.gov publishes the extract once a day. By default a monitor run that finds the same file its search already fully processed stops immediately (no run fee). Changed filters, or a previous run that stopped at Max notices or your max cost, always re-scan. Enable to re-scan anyway.",
            "default": false
          },
          "includeDescription": {
            "title": "Include description",
            "type": "boolean",
            "description": "Include the notice description text (e-mail addresses and phone numbers removed).",
            "default": true
          },
          "maxResults": {
            "title": "Max notices per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop returning after this many notices (0 = no limit). Protects you from an unfiltered first run returning the whole extract (~70,000 notices). Notices not returned are returned next run, even if SAM.gov has not published a new file yet.",
            "default": 1000
          },
          "digest": {
            "title": "Save a digest",
            "type": "boolean",
            "description": "Save DIGEST_HTML and DIGEST_CSV (first 500 returned notices) to the run's key-value store for e-mail or Slack integrations.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that keeps monitor memory between runs.",
            "default": "samgov-monitor-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}