{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Federal Opportunities Finder (Official API + Awards)",
    "description": "Search official SAM.gov contract opportunities by NAICS, PSC, set-aside, agency and dates. Export a clean dataset with public notice links, add optional USAspending award history, and schedule \"what's new\" monitoring. Official SAM.gov API with your own free key, no scraping.",
    "version": "0.1",
    "x-build-id": "s0emb2QZoDRIg7qLc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leecrowesoftware~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leecrowesoftware-sam-gov-opportunities",
        "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/leecrowesoftware~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-leecrowesoftware-sam-gov-opportunities",
        "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/leecrowesoftware~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-leecrowesoftware-sam-gov-opportunities",
        "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": [
          "samApiKey"
        ],
        "properties": {
          "samApiKey": {
            "title": "SAM.gov API key",
            "type": "string",
            "description": "Your own free SAM.gov public API key (SAM.gov → Account Details → Public API Key). Each user must use their own key: SAM.gov terms forbid sharing it. Keys without an entity role are usually limited to 10 requests a day."
          },
          "keywords": {
            "title": "Title keywords",
            "type": "string",
            "description": "Words to match in the notice title (the SAM.gov API searches titles, not full text). Example: cybersecurity"
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "2 to 6 digit NAICS codes. Example: 541511. Each code is one API request.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product Service Codes (classification). Example: D302. Each code is one API request.",
            "items": {
              "type": "string"
            }
          },
          "setAsides": {
            "title": "Set-asides",
            "type": "array",
            "description": "Set-aside types. Each one selected is one API request.",
            "items": {
              "type": "string",
              "enum": [
                "SBA",
                "SBP",
                "8A",
                "8AN",
                "HZC",
                "HZS",
                "SDVOSBC",
                "SDVOSBS",
                "WOSB",
                "WOSBSS",
                "EDWOSB",
                "EDWOSBSS",
                "LAS",
                "IEE",
                "ISBEE",
                "BICiv",
                "VSA",
                "VSS"
              ],
              "enumTitles": [
                "SBA – Total Small Business Set-Aside (FAR 19.5)",
                "SBP – Partial Small Business Set-Aside (FAR 19.5)",
                "8A – 8(a) Set-Aside (FAR 19.8)",
                "8AN – 8(a) Sole Source (FAR 19.8)",
                "HZC – HUBZone Set-Aside (FAR 19.13)",
                "HZS – HUBZone Sole Source (FAR 19.13)",
                "SDVOSBC – Service-Disabled Veteran-Owned Small Business Set-Aside (FAR 19.14)",
                "SDVOSBS – Service-Disabled Veteran-Owned Small Business Sole Source (FAR 19.14)",
                "WOSB – Women-Owned Small Business Set-Aside (FAR 19.15)",
                "WOSBSS – Women-Owned Small Business Sole Source (FAR 19.15)",
                "EDWOSB – Economically Disadvantaged WOSB Set-Aside (FAR 19.15)",
                "EDWOSBSS – Economically Disadvantaged WOSB Sole Source (FAR 19.15)",
                "LAS – Local Area Set-Aside (FAR 26.2)",
                "IEE – Indian Economic Enterprise Set-Aside (Interior)",
                "ISBEE – Indian Small Business Economic Enterprise Set-Aside (Interior)",
                "BICiv – Buy Indian Set-Aside (HHS, Indian Health Service)",
                "VSA – Veteran-Owned Small Business Set-Aside (VA)",
                "VSS – Veteran-Owned Small Business Sole Source (VA)"
              ]
            }
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Leave empty for all types. Each one selected is one API request.",
            "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 Requirements (DoD-Funded)"
              ]
            }
          },
          "organizationName": {
            "title": "Agency or office name",
            "type": "string",
            "description": "Department, sub-tier or office name. Example: Department of the Navy"
          },
          "organizationCode": {
            "title": "Agency or office code",
            "type": "string",
            "description": "Organization code, if you know it."
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter state codes. Example: VA. Each state is one API request.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceZip": {
            "title": "Place of performance ZIP",
            "type": "string",
            "description": "5-digit ZIP code."
          },
          "solicitationNumber": {
            "title": "Solicitation number",
            "type": "string",
            "description": "Find notices for one solicitation number."
          },
          "noticeId": {
            "title": "Notice ID",
            "type": "string",
            "description": "Look up a single notice by its SAM.gov notice ID."
          },
          "postedFrom": {
            "title": "Posted from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest posted date. Defaults to 7 days before Posted to. The posted range can span at most one year."
          },
          "postedTo": {
            "title": "Posted to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest posted date. Defaults to today (UTC)."
          },
          "responseFrom": {
            "title": "Response deadline from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Earliest response deadline. The range can span at most one year."
          },
          "responseTo": {
            "title": "Response deadline to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Latest response deadline."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop once this many unique notices are collected. Capped at 10,000 to protect your SAM.gov quota.",
            "default": 100
          },
          "incremental": {
            "title": "Only new or changed notices",
            "type": "boolean",
            "description": "For scheduled runs: output (and charge for) only notices that are new or changed since the last run with the same monitor key.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Required when 'Only new or changed notices' is on. A stable name for this search. Example: it-software-daily"
          },
          "includeDescription": {
            "title": "Include description text",
            "type": "boolean",
            "description": "Fetch each notice's full description. Costs one extra SAM.gov API request per notice, which quickly uses up a 10-request-a-day key.",
            "default": false
          },
          "enrichWithAwards": {
            "title": "Add USAspending award history",
            "type": "boolean",
            "description": "Look up past contract awards on USAspending.gov for each notice saved. No extra SAM.gov requests. Charged per notice that gets award history; notices with nothing to match on, or whose lookup fails, are not charged.",
            "default": false
          },
          "awardLookbackYears": {
            "title": "Award history years",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many years of awards to look back, counting back from the day of the run.",
            "default": 3
          },
          "awardMaxPerNotice": {
            "title": "Awards per notice",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Most recent awards (by start date) to list per notice. The total count and dollars cover every award in the window.",
            "default": 10
          },
          "awardSearchBy": {
            "title": "Match awards by",
            "type": "array",
            "description": "Which notice details to match award history on; several are combined. Recipient only works on award notices, which name an awardee: for solicitations, pick agency and/or NAICS to see who has won similar work. Details a notice lacks are left out, and a notice with none of them gets no award history (it is never guessed).",
            "items": {
              "type": "string",
              "enum": [
                "recipient",
                "agency",
                "naics"
              ],
              "enumTitles": [
                "Recipient (the awardee on award notices)",
                "Awarding agency (the notice's sub-agency)",
                "NAICS code"
              ]
            },
            "default": [
              "recipient"
            ]
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}