{
  "openapi": "3.0.1",
  "info": {
    "title": "SAM.gov Federal Contract Opportunities & Awards API Sole Source",
    "description": "Search SAM.gov for US federal procurement: bid opportunities, solicitations, sources sought, set aside, request for information, contract award notices. Filter by keyword, NAICS, agency, state. No login or API key. Monitor mode for contract alerts.",
    "version": "0.1",
    "x-build-id": "1kLUig3wTa8ccoSgJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/practicalmodules~sam-gov-opportunities/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-practicalmodules-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/practicalmodules~sam-gov-opportunities/runs": {
      "post": {
        "operationId": "runs-sync-practicalmodules-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/practicalmodules~sam-gov-opportunities/run-sync": {
      "post": {
        "operationId": "run-sync-practicalmodules-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",
        "properties": {
          "noticeIds": {
            "title": "Notice IDs (direct lookup)",
            "type": "array",
            "description": "Look up specific notices by their SAM.gov notice ID (32 characters, e.g. 2631a77e6a0d4e49b4f6637fec9fb969). A full sam.gov/opp/<id>/view URL works too. Up to 100 identifiers per run, all found in a single pass.",
            "items": {
              "type": "string"
            }
          },
          "solicitationNumbers": {
            "title": "Solicitation numbers (direct lookup)",
            "type": "array",
            "description": "Look up notices by the agency's solicitation number, e.g. 030ADV27Q0034. One solicitation can carry several notices (the original and its amendments) and all of them are returned, so this search reads every permitted file rather than stopping at the first hit. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Return notices that mention any of these words in the title or description, e.g. \"cybersecurity\", \"janitorial\", \"drone\". Leave empty for all notices.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop notices that mention any of these words, e.g. \"ammunition\", \"classified\". Useful for cutting noise out of a broad keyword search.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS industry codes or prefixes. Sub-codes are included, e.g. \"541\" = all professional/scientific/technical services, \"541511\" = custom computer programming, \"236\" = building construction, \"561720\" = janitorial services.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC / FSC codes",
            "type": "array",
            "description": "Product Service Codes or prefixes. Letters are services, numbers are products, e.g. \"D\" = all IT and telecom services, \"D307\" = IT systems development, \"R\" = professional support, \"70\" = IT equipment, \"Y\" = construction. Combines with NAICS using AND, so a notice must match both when you set both.",
            "items": {
              "type": "string"
            }
          },
          "noticeCategories": {
            "title": "Notice categories",
            "type": "array",
            "description": "Which kinds of notice to return. Opportunities are Solicitations and Combined Synopsis/Solicitations - the ones you can bid on today. Planning covers Presolicitation, Sources Sought and Special Notices. Awards show who won and for how much.",
            "items": {
              "type": "string",
              "enum": [
                "opportunity",
                "planning",
                "award",
                "other"
              ],
              "enumTitles": [
                "Opportunities (Solicitation, Combined Synopsis)",
                "Planning (Presolicitation, Sources Sought, Special Notice)",
                "Awards (winner and amount)",
                "Other (justifications, surplus sales, …)"
              ]
            },
            "default": [
              "opportunity"
            ]
          },
          "postedWithinDays": {
            "title": "Posted within the last N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How far back to search. For a daily schedule use 2 together with \"Only new notices\". Ignored when \"Posted from\" is set.",
            "default": 3
          },
          "postedFrom": {
            "title": "Posted from (YYYY-MM-DD)",
            "type": "string",
            "description": "Start of an exact posted-date range, e.g. 2026-04-01. Use this instead of \"Posted within the last N days\" for a historical period such as a quarter. Leave empty for a rolling window ending today."
          },
          "postedTo": {
            "title": "Posted to (YYYY-MM-DD)",
            "type": "string",
            "description": "End of the posted-date range, inclusive, e.g. 2026-06-30. Leave empty for \"up to the newest notice\"."
          },
          "includeArchived": {
            "title": "Include archived notices",
            "type": "boolean",
            "description": "SAM.gov's daily extract holds only notices that are still active, so on its own it answers a question about the past with just the few still open. SAM also publishes one archive file per federal fiscal year; with this on, the relevant ones are read too and merged in by posted date. Measured on 2026-10-26, the week 1-7 May 2026 held 635 notices in the daily extract and 9,987 in the FY2026 archive. Only used when your window reaches back more than 14 days, so a default run is unaffected and stays fast. Each archive file is about 1 GB to scan, so expect tens of seconds to a few minutes for a historical range; at most 3 fiscal years per run.",
            "default": true
          },
          "activeOnly": {
            "title": "Only active notices",
            "type": "boolean",
            "description": "Keep only notices SAM.gov still flags as active, and drop any whose response deadline has already passed.",
            "default": true
          },
          "onlySetAside": {
            "title": "Only set-aside notices",
            "type": "boolean",
            "description": "Keep only notices reserved for small business, 8(a), HUBZone, SDVOSB, WOSB and similar programs. Turn off to include full and open competitions.",
            "default": false
          },
          "setAsideCodes": {
            "title": "Specific set-aside codes",
            "type": "array",
            "description": "Exact SAM.gov set-aside codes, e.g. SBA (total small business), 8A, 8AN, HZC/HZS (HUBZone), SDVOSBC/SDVOSBS, WOSB, EDWOSB, VSA/VSS (veteran-owned, VA). Leave empty for any.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Match part of the department, sub-tier or office name, e.g. \"VETERANS AFFAIRS\", \"NAVY\", \"GENERAL SERVICES\". Case-insensitive, any match wins.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "2-letter state codes, e.g. TX, CA, VA. Matches the place of performance or, when that is missing, the contracting office's state.",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only relevant for awards: skip awards below this dollar amount. Notices with no published amount are skipped when this is set."
          },
          "latestPerSolicitation": {
            "title": "Collapse amendments",
            "type": "boolean",
            "description": "Agencies re-post an amended notice under a new notice ID but the same solicitation number. Keep only the most recent version of each solicitation, so you don't pay for the same tender several times.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new notices (monitor mode)",
            "type": "boolean",
            "description": "Remember which notices earlier runs with the same filters returned, and deliver only ones you have not seen. Ideal for a daily schedule - you only pay for new notices.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many notices. You pay per notice delivered.",
            "default": 100
          },
          "fitPreferredKeywords": {
            "title": "Fit score: preferred keywords (optional)",
            "type": "array",
            "description": "Nice-to-have words that make a notice a stronger fit, e.g. \"cloud\", \"cybersecurity\". Separate from the required \"Keywords\" filter above - this only affects the fitScore, not which notices are returned. Setting this (or either field below) turns on fitScore, fitReason and recommendedAction on every item.",
            "items": {
              "type": "string"
            }
          },
          "fitMinValue": {
            "title": "Fit score: minimum value (USD, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Award value you'd consider a strong fit. Only checked on awards, since opportunities rarely publish an estimated value; opportunities get a note that value could not be checked."
          },
          "fitMinDaysUntilDeadline": {
            "title": "Fit score: minimum days until deadline (optional)",
            "minimum": 0,
            "type": "integer",
            "description": "How many days' notice you need to put together a response. Notices with fewer days left score lower."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}