Search government contracts
search_contractsFind U.S. federal and state contract opportunities, RFPs, and solicitations to bid on by NAICS, state, keyword, agency, set-aside, and posting date; paginate for more results.
Instructions
Use this when the user wants US federal or state government contract opportunities to bid on: bids, RFPs, solicitations, set-asides.
Filters: naics (up to 10 codes), state, keyword (title only), set_aside (federal only), type (federal or state), posted_within_days (1 to 180), open (default true), agency (a name; the note says which agency it matched), limit (1 to 50, default 20). If has_more is true, call again with cursor=next_cursor and the same filters. Example: naics="238160", state="VA", keyword="roof". Pass several NAICS codes in one call.
Print each result's url, and sam_url for federal notices, as markdown links.
Do not use for grants (search_grants), jobs (search_jobs) or one result's details (get_opportunity).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| open | No | true (the default): only items with a response deadline of today or later, US Eastern; an item with no deadline counts as closed. false: include closed ones. | |
| type | No | Narrow to federal or to state contracts. Leave empty for both. | |
| limit | No | Number of results to return, 1 to 50. | |
| naics | No | Up to 10 six-digit NAICS codes, comma-separated, e.g. '236220' or '541511,541512'. A notice matches on its own codes (matched_naics says which), or through a code MatchAwards' AI suggested: that one is listed in ai_matched_naics, so call the match AI-suggested. Unknown codes are ignored. | |
| state | No | Two-letter US state code, e.g. 'VA'. Many federal notices have no state, so this filter skips them. | |
| agency | No | Agency name, e.g. 'Department of Veterans Affairs'; matched to the closest MatchAwards agency, which the result note names. | |
| cursor | No | next_cursor from the previous response. Pass it with the same filters to get the next page. | |
| keyword | No | 2 to 100 characters matched against the title only. | |
| set_aside | No | Set-aside code, e.g. 'SBA' or 'SDVOSBC'. Federal contracts only. | |
| posted_within_days | No | Only items posted in the last N days, 1 to 180 (default 180). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| as_of | No | When the API generated the results (ISO time). | |
| results | Yes | ||
| warning | No | Set when paging stopped early; the results so far are still valid. | |
| has_more | Yes | true: call again with cursor=next_cursor and the same filters. | |
| next_cursor | No |