# Find bids closing this week

To find bids closing this week with an AI agent, ask it to call search_opportunities with open=true, deadline_to set seven days out, sort=deadline and your state and NAICS codes. It returns solicitations that are still open and due within the week, closing soonest first, each with the deadline and a SAM.gov link.

Small firms with no full-time capture staff, who look at SAM.gov once or twice a week and need to know what cannot wait. Filtering by deadline instead of posting date surfaces the short-fuse requests for quotes that are easy to miss.

## The prompt

```
Which open solicitations in Texas under NAICS 236220 and 238210 are due in the next seven days? Sort by deadline, show the deadline in Central time, and flag any that are small business set-asides.
```

## What the agent calls

1. search_opportunities: deadline_to bounds the window; open=true keeps notices whose deadline has not passed.

```json
{"name":"search_opportunities","arguments":{"naics":"236220,238210","state":"TX","open":true,"deadline_to":"2026-11-20","sort":"deadline","user_request":"TX construction bids due this week"}}
```

## Sample output

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

```json
{
  "data": [
    {
      "notice_id": "a1b2c3d4e5f60718293a4b5c6d7e8f90",
      "title": "Repair HVAC Building 1450",
      "type": "Combined Synopsis/Solicitation",
      "set_aside_code": "SBA",
      "response_deadline": "2026-11-18T21:00:00.000Z",
      "pop_state": "TX",
      "naics": "238220"
    }
  ],
  "meta": {
    "as_of": "2026-11-12"
  }
}
```

## How to read the answer

- Combined Synopsis/Solicitation notices are usually small, fast purchases with short response windows; they cluster at the top of a deadline sort.
- state filters on place of performance. Work bought by an office in another state but performed in Texas is included.

## Make it yours

- Ask for 14 days instead of 7 if you need lead time for site visits.
- Drop NAICS and use q with a few keywords (for example HVAC repair) when notices use inconsistent codes.

## Pitfalls

- The agent needs today's date to compute deadline_to. If your client does not know the date, include it in the prompt.
- Site visits and question deadlines come before the response deadline; read the notice.

## The same job over REST

```bash
curl "https://samgovapi.io/api/v1/opportunities?naics=236220,238210&state=TX&open=true&deadline_to=2026-11-20&sort=deadline" -H "Authorization: Bearer $SAMGOVAPI_API_KEY"
```

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

## Questions

### Why are some notices missing a place of performance?

Not every notice states one. Notices without it do not match a state filter; run a second search without state if coverage matters.

### Is the deadline the time the offer must be received?

It is the response date and time SAM.gov shows for the notice, in UTC in the API. The notice text and amendments govern.

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.
