# Find open bids for your NAICS code and set-aside

To find open bids for your NAICS code and set-aside with an AI agent, ask it to call search_opportunities with naics, set_aside and open=true, sorted by deadline. It returns active SAM.gov notices whose response deadline has not passed, closing soonest first, each with the notice ID, agency, deadline and a sam.gov link.

Small businesses and capture managers who scan SAM.gov every morning for work they can actually bid. The SAM.gov search page needs a login for saved searches and pages ten results at a time; an agent with this tool reads the same nightly opportunities data and filters by code and set-aside in one call, so the shortlist arrives in the chat with deadlines already sorted.

## The prompt

```
Find open federal bids under NAICS 561720 that are set aside for small business. Sort them by response deadline, closing soonest first, and give me the title, agency, deadline, place of performance and the SAM.gov link for each.
```

## What the agent calls

1. search_opportunities: open=true keeps active notices whose deadline has not passed and drops award notices; sort=deadline puts the ones closing first on top.

```json
{"name":"search_opportunities","arguments":{"naics":"561720","set_aside":"SBA","open":true,"sort":"deadline","limit":25,"user_request":"open small business janitorial bids by deadline"}}
```

## Sample output

Trimmed; field names and structure match the live response, values are shortened or illustrative.

```json
{
  "data": [
    {
      "notice_id": "5d8aa2693f7c4dd7adf3f6494c77eb5d",
      "solicitation_number": "140PP027Q0034",
      "title": "JANITORIAL SERVICES, Channel Islands NP",
      "department": "INTERIOR, DEPARTMENT OF THE",
      "type": "Solicitation",
      "set_aside_code": "SBA",
      "set_aside": "Small Business Set Aside - Total",
      "response_deadline": "2026-11-20T23:00:00.000Z",
      "naics": "561720",
      "psc": "S201",
      "active": true,
      "link": "https://sam.gov/workspace/contract/opp/5d8aa2693f7c4dd7adf3f6494c77eb5d/view"
    }
  ],
  "meta": {
    "as_of": "2026-11-12",
    "credits_charged": 1,
    "next_cursor": null
  }
}
```

## How to read the answer

- response_deadline is in UTC. An agent should convert it to your time zone before telling you a bid closes today, because a 23:00 UTC deadline is the same afternoon on the East Coast.
- set_aside_code is the code SAM.gov prints on the notice: SBA is a total small business set-aside, SBP a partial one, 8A, HZC, SDVOSBC and WOSB the program set-asides. Ask for a comma list such as SBA,SBP to catch both kinds of small business set-aside.
- meta.as_of is the date of the opportunities load. Notices posted after it are not in the answer yet, so the agent should say the date when it lists results.

## Make it yours

- Add state=VA to keep only work performed in Virginia (place of performance, not the office location).
- Swap set_aside for 8A, HZC, SDVOSBC or WOSB to see program set-asides only.
- Use a 4 or 5 digit NAICS prefix such as 5415 to cover a whole industry group in one call.
- Ask for type Solicitation only when you want to skip presolicitations and special notices.

## Pitfalls

- Many notices carry the NAICS code the contracting officer picked, not the one you registered under. Search two or three neighbouring codes before deciding a market is empty.
- A notice with no response deadline stays open only if it was posted in the last 90 days; older ones without a deadline drop out of open results on purpose.
- Amendments change deadlines. Before you bid, open the SAM.gov link and read the latest version of the notice.

## The same job over REST

```bash
curl "https://samgovapi.io/api/v1/opportunities?naics=561720&set_aside=SBA&open=true&sort=deadline&limit=25" -H "Authorization: Bearer $SAMGOVAPI_API_KEY"
```

Plan: every plan. Credits: 1 credit per 100 rows returned, minimum 1.

## Questions

### Does this replace a saved search on SAM.gov?

It gives the same notices from the nightly SAM.gov opportunities data without a login, filtered by code and set-aside in one call. SAM.gov saved searches still email you; for scheduled delivery here, see the daily bid digest recipe.

### Can the agent tell me if I qualify for a set-aside?

It can check your NAICS size standard and your SAM.gov certifications, but eligibility is decided by SBA rules and the contracting officer. Treat the agent's answer as a first screen, not a determination.

All recipes: https://samgovapi.io/agents/recipes.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.
