{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Scraper - Search US Federal Contract Opportunities",
    "description": "Search US federal contract opportunities, RFPs and awards on SAM.gov (no API key). Input: keywords, notice types, NAICS/PSC codes, set-asides, agencies, states, posted dates. Returns per notice: title, agency, NAICS, set-aside, response deadline, place of performance, URL. Default: 20 notices.",
    "version": "1.0",
    "x-build-id": "YjRvjhGNDmoK2gwSR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kadi_bence~sam-gov-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kadi_bence-sam-gov-scraper",
        "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/kadi_bence~sam-gov-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kadi_bence-sam-gov-scraper",
        "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/kadi_bence~sam-gov-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kadi_bence-sam-gov-scraper",
        "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": "Searched in the title, solicitation number and full description. One line = all its words must appear (e.g. 'cloud migration'); put a line in quotes for an exact phrase (\"janitorial services\"). Several lines = any of them. Leave empty to get every notice that matches the other filters.",
            "items": {
              "type": "string"
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. 'Solicitation' and 'Combined synopsis/solicitation' are open bids; 'Award notice' shows who won and for how much.",
            "items": {
              "type": "string",
              "enum": [
                "solicitation",
                "combined_synopsis_solicitation",
                "presolicitation",
                "sources_sought",
                "special_notice",
                "award_notice",
                "justification",
                "intent_to_bundle",
                "sale_of_surplus_property",
                "modification_amendment_cancel"
              ],
              "enumTitles": [
                "Solicitation (RFP / RFQ / IFB)",
                "Combined synopsis/solicitation",
                "Presolicitation",
                "Sources sought (market research, RFI)",
                "Special notice",
                "Award notice (winner and amount)",
                "Justification (J&A, sole source)",
                "Intent to bundle requirements",
                "Sale of surplus property",
                "Modification / amendment / cancel"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, e.g. 541511 (custom programming) or 236220 (commercial construction). Prefixes work: 5415 returns every 5415xx code, 23 all construction.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (product / service codes)",
            "type": "array",
            "description": "e.g. D302 (IT systems development), R425 (engineering support), 7030 (software). Prefixes work: D3 returns all D3xx codes.",
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside types",
            "type": "array",
            "description": "Small-business set-asides. Leave empty for all. 'No set-aside' = full and open competition.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "VSA",
                "VSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICIV",
                "NONE"
              ],
              "enumTitles": [
                "Total small business (SBA)",
                "Partial small business (SBP)",
                "8(a) set-aside",
                "8(a) sole source",
                "HUBZone set-aside",
                "HUBZone sole source",
                "Service-disabled veteran-owned (SDVOSB) set-aside",
                "SDVOSB sole source",
                "Women-owned (WOSB) set-aside",
                "WOSB sole source",
                "Economically disadvantaged WOSB (EDWOSB)",
                "EDWOSB sole source",
                "Veteran-owned (VA only)",
                "Veteran-owned sole source (VA only)",
                "Local area set-aside",
                "Indian Economic Enterprise (DOI)",
                "Indian Small Business Economic Enterprise (DOI)",
                "Buy Indian (IHS)",
                "No set-aside (full and open)"
              ]
            }
          },
          "agencies": {
            "title": "Agencies / offices",
            "type": "array",
            "description": "Words from the department, agency or office name, e.g. 'Veterans Affairs', 'Navy', 'Army Corps of Engineers', or an abbreviation (DOD, VA, GSA, DHS, NASA, HHS, NIH, USDA...). Several lines = any of them.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance (US states)",
            "type": "array",
            "description": "2-letter state codes. Note: only about 1 in 3 notices lists a place-of-performance state; tick the option below to fall back to the contracting office's state.",
            "items": {
              "type": "string",
              "enum": [
                "AL",
                "AK",
                "AZ",
                "AR",
                "CA",
                "CO",
                "CT",
                "DE",
                "DC",
                "FL",
                "GA",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NE",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "ND",
                "OH",
                "OK",
                "OR",
                "PA",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY",
                "PR",
                "GU",
                "VI",
                "AS",
                "MP"
              ],
              "enumTitles": [
                "Alabama",
                "Alaska",
                "Arizona",
                "Arkansas",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware",
                "District of Columbia",
                "Florida",
                "Georgia",
                "Hawaii",
                "Idaho",
                "Illinois",
                "Indiana",
                "Iowa",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Maine",
                "Maryland",
                "Massachusetts",
                "Michigan",
                "Minnesota",
                "Mississippi",
                "Missouri",
                "Montana",
                "Nebraska",
                "Nevada",
                "New Hampshire",
                "New Jersey",
                "New Mexico",
                "New York",
                "North Carolina",
                "North Dakota",
                "Ohio",
                "Oklahoma",
                "Oregon",
                "Pennsylvania",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "West Virginia",
                "Wisconsin",
                "Wyoming",
                "Puerto Rico",
                "Guam",
                "US Virgin Islands",
                "American Samoa",
                "Northern Mariana Islands"
              ]
            }
          },
          "stateFallbackToOffice": {
            "title": "Use the contracting office's state when no place of performance is given",
            "type": "boolean",
            "description": "Broadens the state filter: notices without a place-of-performance state are matched on the state of the buying office.",
            "default": false
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "e.g. 7 for the last week, 1 for yesterday and today. Leave empty to use the date range below (or no date limit). Short windows are also faster."
          },
          "postedFrom": {
            "title": "Posted from",
            "type": "string",
            "description": "First posted date (YYYY-MM-DD)."
          },
          "postedTo": {
            "title": "Posted to",
            "type": "string",
            "description": "Last posted date (YYYY-MM-DD)."
          },
          "responseDeadlineAfter": {
            "title": "Response deadline on or after",
            "type": "string",
            "description": "Only bids you can still answer: notices whose response deadline is on or after this date (notices without a deadline are left out). Accepts YYYY-MM-DD, 'today' or '+7 days'."
          },
          "minAwardAmount": {
            "title": "Min award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only award notices with at least this awarded amount. Leave empty for all notices."
          },
          "activeOnly": {
            "title": "Active notices only",
            "type": "boolean",
            "description": "Archived (inactive) notices are only available with your own SAM.gov API key (see Advanced).",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many opportunities. 0 = no limit (there is no 10,000 cap). The default without input (API, MCP and AI-agent calls) is 20.",
            "default": 20
          },
          "onlyNewOpportunities": {
            "title": "Only new opportunities (monitoring mode)",
            "type": "boolean",
            "description": "Remember returned notices and output only NEW ones on the next runs with the same search. Ideal for a daily schedule: you only pay for new opportunities.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keeps separate 'already seen' lists for different schedules.",
            "default": "default"
          },
          "apiKey": {
            "title": "SAM.gov API key (optional)",
            "type": "string",
            "description": "Not needed for active notices. Your own free public API key from SAM.gov (Account Details > Public API Key) unlocks archived notices and attachment links through the official Get Opportunities API. Personal keys allow 10 requests per day (1,000 records each). Stored encrypted, never logged."
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "auto",
              "extract",
              "api"
            ],
            "type": "string",
            "description": "Auto: the keyless official daily extract of all active notices; the official API (needs your key) only when you ask for archived notices or attachment links.",
            "default": "auto"
          },
          "includeAttachments": {
            "title": "Include attachment links (needs API key)",
            "type": "boolean",
            "description": "Adds direct download links to the notice's documents (RFP, SOW, amendments). Uses the official API, so it needs your key.",
            "default": false
          },
          "fetchDescriptions": {
            "title": "Fetch full descriptions in API mode",
            "type": "boolean",
            "description": "The official API returns descriptions as separate links: each one costs one request of your key's daily quota. The keyless extract always includes descriptions.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: SAM.gov publishes this data as official open data.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}