Search SAM.gov Contract Opportunities
sam_opportunities_searchSearch SAM.gov for solicitation opportunities using keywords, NAICS codes, procurement type, set-aside, and office state. Apply place-of-performance filters after retrieval.
Instructions
Search the official SAM.gov Opportunities API by title keywords, NAICS codes, procurement type, set-aside, contracting office state, and posted date range. Place-of-performance state and city filters are applied client-side because SAM.gov's v2 API does not support them server-side. Note: SAM.gov returns SOLICITATIONS (announcements), not awarded contracts; awardAmount is null on most rows. For awarded federal contracts with dollar amounts, use USAspending.gov instead.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sam_opportunities_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | No | Deprecated alias for officeState. SAM.gov's state parameter filters by contracting office, not place of performance. | |
| dryRun | No | Return sample opportunities without calling SAM.gov. Defaults to true when no SAM key is configured. | |
| keywords | No | Opportunity title keywords. | |
| maxResults | No | Maximum opportunities to return after filtering. | |
| naicsCodes | No | NAICS codes to search; each code is queried separately and deduplicated. | |
| officeState | No | Two-letter contracting OFFICE state code. Sent server-side as SAM.gov's `state=` filter; does NOT filter by where the work is performed. | |
| setAsideType | No | SAM.gov typeOfSetAside code, such as SBA, 8A, HZC, SDVOSBC, WOSB, or EDWOSB. | |
| postedDaysAgo | No | Search opportunities posted within the last N days. | |
| procurementTypes | No | SAM.gov procurement type codes, such as o, k, r, p, a, or s. Defaults to o and k. | |
| placeOfPerformanceCity | No | Place-of-performance city substring (case-insensitive). Filtered client-side after fetch because SAM.gov has no server-side city filter. For metro areas fan out across multiple cities (e.g., Lansing, East Lansing) and merge. | |
| placeOfPerformanceState | No | Two-letter place-of-performance state code. Filtered client-side after fetch because SAM.gov's API has no server-side POP state filter. |