Search Opportunities
search_opportunitiesSearch SAM.gov federal contract opportunities by NAICS, PSC, agency, keywords, state, set-aside, notice type, dates, or value. Get matching opportunities with pagination and applied filters.
Instructions
Search federal contract opportunities (SAM.gov data) with filters.
At least one filter is required. Use specific values:
naics: 6-digit NAICS code, e.g. "541330" (engineering services)
psc: 1-4 char Product Service Code, e.g. "D302" (IT services)
naics_multiple: comma-separated NAICS codes, e.g. "541511,541512"
agency: agency name substring (use full names, e.g. "FEDERAL EMERGENCY MANAGEMENT" not "FEMA"; use lookup_agency tool first)
keywords: full-text search across title, agency, description (min 3 chars)
state: 2-letter state code (CA, TX) or full name (California)
set_aside: a plain term (HUBZone, WOSB, 8(a), Veteran, Small Business, Indian Small Business, Buy Indian, ...) or an exact SAM code (SBA, SDVOSBC, HZC, ...). An unrecognized value returns 400 WITH THE FULL VALID-TERM LIST in the response body, retry using that list rather than guessing another synonym.
notice_type: Solicitation, Combined Synopsis/Solicitation, Presolicitation, Sources Sought, Award Notice, Justification, Justification and Approval (J&A), Special Notice, Sale of Surplus Property, Modification/Amendment/Cancel, Consolidate/ (Substantially) Bundle. Comma-separate several to match any. Invalid values 400 the same way as set_aside, the full list comes back in the error.
posted_after / due_before / due_after / date_from / date_to: YYYY-MM-DD. A date_from before your plan's history window is not silently dropped, it's clamped, and the response's
windowblock (clamped,date_from_requested,reason) discloses exactly what happened.value_min / value_max: USD amounts (only Award Notice records have values)
has_attachments: true/false
sort_by: posted_date, due_date, award_amount, title, agency, relevance (used automatically when keywords is set and sort_by is omitted)
sort_order: asc | desc (default desc), e.g. sort_by=due_date + sort_order=asc for "what's due soonest first"
limit: max 1000
Returns JSON with data (matching opportunities), pagination, filters_applied,
and (only when a date_from clamp applied) window. For full-database sync use the
recent_changes tool instead. Each result's award_uei_sam (when present) is the same
identifier get_entity/get_company_profile take as uei, and notice_id is what
get_opportunity takes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| psc | No | ||
| limit | No | ||
| naics | No | ||
| state | No | ||
| agency | No | ||
| offset | No | ||
| date_to | No | ||
| sort_by | No | ||
| keywords | No | ||
| date_from | No | ||
| due_after | No | ||
| set_aside | No | ||
| value_max | No | ||
| value_min | No | ||
| due_before | No | ||
| sort_order | No | ||
| notice_type | No | ||
| posted_after | No | ||
| naics_multiple | No | ||
| has_attachments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |