# SAM.gov API: Search contract opportunities

> Finds active federal contract notices on SAM.gov that match keywords, agency, place of performance, set-aside, notice type and posting period.

Unofficial. Not affiliated with or endorsed by SAM.gov.

- Page: https://fous.com/methods/sam.gov/search-contract-opportunities
- Method: `sam.gov/search_contract_opportunities`, version 1
- Website: sam.gov
- Returns: title, agency, office, notice type, dates, place, industry, set-aside, link, ids
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `state` | string | no |  | Place-of-performance state, such as Texas or TX. |
| `agency` | string | no |  | Federal agency name, such as Department of Veterans Affairs. |
| `keywords` | string | yes | `"janitorial services"` | Words to search for, such as janitorial services. |
| `set_aside` | string | no |  | Business preference, such as hubzone. One of "any", "small_business", "women_owned", "veteran_owned", "service_disabled_veteran_owned", "hubzone", "8a". Default "any". |
| `max_results` | integer | no |  | Maximum notices to return, such as 25. Default 25. |
| `notice_type` | string | no |  | Kind of notice, such as solicitation. One of "any", "solicitation", "presolicitation", "sources_sought", "combined_synopsis", "award_notice". Default "any". |
| `posted_within_days` | integer | no |  | Only notices posted within this many days, such as 30. Default 30. |

## Output

From a run on Oct 23, 2026, shortened. Its input:

```json
{
  "keywords": "janitorial services"
}
```

Its output:

```json
{
  "opportunities": [
    {
      "link": "https://sam.gov/workspace/contract/opp/546f260eefcc42e996f4d6ac7df2b460/view",
      "title": "Swan Lake Ranger District Janitorial Contract, Flathead National Forest",
      "agency": "AGRICULTURE, DEPARTMENT OF",
      "office": "USDA-FS, CSA INTERMOUNTAIN 7",
      "industry": "Janitorial Services",
      "notice_id": "546f260eefcc42e996f4d6ac7df2b460",
      "set_aside": "Small Business Set Aside - Total",
      "naics_code": "561720",
      "notice_type": "Combined Synopsis/Solicitation",
      "posted_date": "2026-10-22",
      "response_deadline": "2026-11-12T13:00:00-07:00",
      "solicitation_number": "1240LS26Q0044",
      "place_of_performance": "Montana, UNITED STATES"
    },
    {
      "link": "https://sam.gov/workspace/contract/opp/0602507394964d76986220e4c04c2194/view",
      "title": "CFO JANITORIAL SERVICES (5 YEAR)",
      "agency": "INTERIOR, DEPARTMENT OF THE",
      "office": "ELY DISTRICT OFFICE",
      "industry": "Janitorial Services",
      "notice_id": "0602507394964d76986220e4c04c2194",
      "set_aside": "Small Business Set Aside - Total",
      "naics_code": "561720",
      "notice_type": "Solicitation",
      "posted_date": "2026-10-22",
      "response_deadline": "2026-11-16T11:00:00-08:00",
      "solicitation_number": "140L3926Q0031",
      "place_of_performance": null
    },
    {
      "link": "https://sam.gov/workspace/contract/opp/52157360719345188f4407ea74392ec7/view",
      "title": "Janitorial Contract Eagle Pass, TX",
      "agency": "DEPT OF DEFENSE",
      "office": "W076 ENDIST FT WORTH",
      "industry": "Janitorial Services",
      "notice_id": "52157360719345188f4407ea74392ec7",
      "set_aside": "Small Business Set Aside - Total",
      "naics_code": "561720",
      "notice_type": "Combined Synopsis/Solicitation",
      "posted_date": "2026-10-22",
      "response_deadline": "2026-11-05T12:00:00-06:00",
      "solicitation_number": "W9126G27QA003",
      "place_of_performance": null
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"sam.gov/search_contract_opportunities","input":{"keywords":"janitorial services"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find active federal solicitations for janitorial services in Texas posted in the last 14 days
- Show me small business set-aside notices from the Department of Veterans Affairs for medical equipment maintenance
- Search sources sought notices about cybersecurity consulting for any agency, posted within 60 days, up to 40 results
- Look up combined synopsis notices in Ohio for HVAC repair with veteran-owned set-aside on SAM.gov
- Any presolicitation for construction of roads or bridges in TX from the Army Corps of Engineers this month, max 15 results

## Input schema

```json
{
  "type": "object",
  "required": [
    "keywords"
  ],
  "properties": {
    "state": {
      "type": "string",
      "description": "Place-of-performance state, such as Texas or TX."
    },
    "agency": {
      "type": "string",
      "description": "Federal agency name, such as Department of Veterans Affairs."
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "description": "Words to search for, such as janitorial services."
    },
    "set_aside": {
      "enum": [
        "any",
        "small_business",
        "women_owned",
        "veteran_owned",
        "service_disabled_veteran_owned",
        "hubzone",
        "8a"
      ],
      "type": "string",
      "default": "any",
      "description": "Business preference, such as hubzone."
    },
    "max_results": {
      "type": "integer",
      "default": 25,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum notices to return, such as 25."
    },
    "notice_type": {
      "enum": [
        "any",
        "solicitation",
        "presolicitation",
        "sources_sought",
        "combined_synopsis",
        "award_notice"
      ],
      "type": "string",
      "default": "any",
      "description": "Kind of notice, such as solicitation."
    },
    "posted_within_days": {
      "type": "integer",
      "default": 30,
      "maximum": 365,
      "minimum": 1,
      "description": "Only notices posted within this many days, such as 30."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "opportunities"
  ],
  "properties": {
    "opportunities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "link": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "agency": {
            "type": [
              "string",
              "null"
            ]
          },
          "office": {
            "type": [
              "string",
              "null"
            ]
          },
          "industry": {
            "type": [
              "string",
              "null"
            ]
          },
          "notice_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "set_aside": {
            "type": [
              "string",
              "null"
            ]
          },
          "naics_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "notice_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "posted_date": {
            "type": [
              "string",
              "null"
            ]
          },
          "response_deadline": {
            "type": [
              "string",
              "null"
            ]
          },
          "solicitation_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "place_of_performance": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}
```

## See more

- [find-tender.service.gov.uk API: Search UK tenders](https://fous.com/methods/find-tender.service.gov.uk/search-tenders.md): Finds open UK public-sector tender notices on Find a Tender matching keywords, optionally filtered by contract region, estimated value and closing date, newest first.
- [Grants.gov API: Search grant opportunities](https://fous.com/methods/grants.gov/search-grants.md): Finds U.S. federal grant opportunities by topic, agency, applicant type and status, with funding and eligibility details. Open results exclude opportunities whose closing date has passed.
- [USAspending API: Search federal awards](https://fous.com/methods/usaspending.gov/search-federal-awards.md): Searches USAspending federal awards by keywords, awarding agency, state of performance and date across contracts, grants, loans and direct payments. Searches from October 1, 2007 onward.
- [USAJOBS API: Search federal jobs](https://fous.com/methods/usajobs.gov/search-jobs.md): Searches USAJOBS federal jobs by keywords, location, salary threshold and applicant group, in website relevance order. Salary ranges may start below the threshold; annual pay or remote status is null when the announcement does not state it.
- [European Union API: Search EU contract awards](https://fous.com/methods/ted.europa.eu/search-contract-awards.md): Finds published EU contract award notices on Tenders Electronic Daily by contract topic or winning company, newest publication first, optionally limited to a buyer country and a start date. Values and tender counts are included when published; counts across lots are summed.
- [Federal Register API: Search rules and notices](https://fous.com/methods/federalregister.gov/search-rules.md): Find Federal Register rules, proposed rules, notices, and presidential documents by topic, agency, publication dates, and comment status. Significant means designated significant by the source; documents without that designation show no.
- [European Union API: Search EU public procurement notices](https://fous.com/methods/ted.europa.eu/search-tenders.md): Finds recently published EU procurement notices matching what is being bought, with buyer, estimated value, submission deadline and TED notice link. Open-only results must have a future submission deadline.
- [USAspending API: Get company federal awards](https://fous.com/methods/usaspending.gov/get-company-federal-awards.md): Returns federal obligations and distinct awards for a company or organization, including its parent and child recipient records. Covers the selected fiscal year or the last five fiscal years.
