> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SAM.gov Contract Opportunities

> Every contract opportunity US federal agencies list as active on SAM.gov: solicitations, sources sought, presolicitations, special notices and awards from every agency, about 75,000. Search by words, kind of notice, agency, NAICS or product service code, set-aside, state and deadline, and read one notice in full.

SAM.gov is where US federal agencies publish contract opportunities: every
proposed contract action expected to exceed \$25,000, from a sources-sought
notice through the solicitation to the award. Every agency posts there: the
Department of Defense and its services, the General Services Administration,
Veterans Affairs, Agriculture, the Interior, Homeland Security, Justice, State,
Health and Human Services, NASA, Energy and the rest.

Every notice SAM.gov lists as active, about 75,000: some 23,000 combined
synopsis/solicitations, 19,000 solicitations, 14,000 award notices, 7,000
presolicitations, 5,000 special notices and 5,000 sources sought. Each comes
with its title and text, the solicitation number, the department, agency and
office that posted it, the NAICS and product service codes, the set-aside, the
response deadline, the place of performance, the contacts, and for an award the
contractor, the amount and the date. Brought up to date every day; a notice
SAM.gov archives leaves the list.

Search first, then read one notice in full. For the parties barred from
federal awards see [SAM.gov Exclusions](/guides/united-states/sam).

<Note>
  The whole source, organized and ready to query: every endpoint on this page answers in milliseconds. Every response carries `as_of`: how current the data is. [How datasets work](/datasets).
</Note>

## Search opportunities

`POST /us/sam/opportunities-search/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Searches every active notice by any combination of words, kind of notice,
solicitation number, agency, codes, set-aside, state and date.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional. Words in the notice's title, text, awardee or solicitation number. Every word must match; English stemming (`services` finds `service`). |
| `type` | enum | Optional. `solicitation`, `combined_synopsis_solicitation`, `presolicitation`, `sources_sought`, `special_notice`, `award_notice`, `justification`, `justification_and_approval`, `modification`, `sale_of_surplus_property` or `consolidate_bundle`. |
| `solicitation_number` | string | Optional. The solicitation number, as the agency wrote it, e.g. `W912HN25B0012`. Case does not matter. |
| `department` | string | Optional. The department or independent agency, as SAM.gov writes it, e.g. `DEPT OF DEFENSE`, `VETERANS AFFAIRS, DEPARTMENT OF`, `GENERAL SERVICES ADMINISTRATION`. Case does not matter. |
| `sub_tier` | string | Optional. The agency within the department, as SAM.gov writes it, e.g. `DEPT OF THE ARMY`, `DEFENSE LOGISTICS AGENCY`, `FOREST SERVICE`. Case does not matter. |
| `naics_code` | string | Optional. A NAICS code, two to six digits. A shorter code matches every code that starts with it: `23` is all of construction, `541512` computer systems design. |
| `classification_code` | string | Optional. A product service code (PSC), one to four characters. A shorter code matches every code that starts with it: `D` is IT services, `D302` systems development. |
| `set_aside` | string | Optional. The set-aside code, e.g. `SBA` (total small business), `SBP` (partial), `SDVOSBC` (service-disabled veteran-owned), `WOSB` (women-owned), `8A`, `HZC` (HUBZone), or `NONE` for notices that state no set-aside. |
| `performance_state` | string | Optional. The two-letter state of the place of performance, e.g. `VA`. Stated on about a quarter of the notices. |
| `office_state` | string | Optional. The two-letter state of the contracting office, e.g. `PA`. |
| `from_date` | string | Optional. The earliest posting date, yyyy-mm-dd. |
| `to_date` | string | Optional. The latest posting date, yyyy-mm-dd. |
| `deadline_from` | string | Optional. The earliest response deadline, yyyy-mm-dd. Today's date for the notices still open to responses. |
| `deadline_to` | string | Optional. The latest response deadline, yyyy-mm-dd. |
| `sort` | enum | Optional. `recent` (newest posting first, the default), `deadline` (soonest response deadline first, notices with none last) or `amount_desc` (largest award first). Default `recent`. |
| `page` | integer | Optional. 1-based page. Default `1`. |
| `per_page` | integer | Optional. Results per page, 1-50. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/us/sam/opportunities-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "cybersecurity", "type": "sources_sought" }'
```

Returns `as_of` (how current the data is), the applied filters, `sort`, `total` and `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `opportunities[]`.

Every notice carries `id` (SAM.gov's id for the notice, the key), `title`, `solicitation_number`, `type` (the kind of notice now: `Solicitation`, `Combined Synopsis/Solicitation`, `Presolicitation`, `Sources Sought`, `Special Notice`, `Award Notice`, `Justification`, `Justification and Approval (J&A)`, `Modification/Amendment/Cancel`, `Sale of Surplus Property` or `Consolidate/(Substantially) Bundle`), `base_type` (the kind it was first posted as), `department`, `department_code` (CGAC), `sub_tier`, `agency_code` (FPDS), `office`, `office_code` (AAC), `organization_type`, `posted_date` and `posted_at`, `response_deadline` (as SAM.gov writes it, usually with the office's UTC offset) and `response_deadline_date`, `archive_type` and `archive_date`, `set_aside_code` and `set_aside`, `naics_code`, `classification_code` (PSC), the place of performance (`performance_street`, `performance_city`, `performance_state`, `performance_zip`, `performance_country`), for an award `award_number`, `award_date`, `award_amount` (US dollars) and `awardee`, `primary_contact` and `secondary_contact` (each with `title`, `name`, `email`, `phone`, `fax`), the contracting office's `office_city`, `office_state`, `office_zip` and `office_country`, `active`, `description` (the notice's text, cut by SAM.gov at about 32,000 characters), `additional_info_url` and `source_url` (the notice on SAM.gov).

Empty fields are `null`.

<Note>
  The list carries the notices SAM.gov shows as active. Brought up to date
  daily; a notice SAM.gov archives stops matching.
</Note>

## One opportunity

`POST /us/sam/opportunity/v1` <a className="dataset-pill" href="/datasets">Dataset</a>

Resolves one notice by its SAM.gov id and returns the full record.

| Field | Type | Notes |
| - | - | - |
| `id` | string | **Required.** The notice's id in SAM.gov, 32 hex characters, as returned by the search or as it appears in the notice's URL on SAM.gov. |

```bash theme={"dark"}
curl https://api.croma.run/us/sam/opportunity/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "id": "c3ade85bb7aa4603aee667173d4eb588" }'
```

Returns `found`, `id`, `as_of` and `opportunity` (null when not found).

Every notice carries `id` (SAM.gov's id for the notice, the key), `title`, `solicitation_number`, `type` (the kind of notice now: `Solicitation`, `Combined Synopsis/Solicitation`, `Presolicitation`, `Sources Sought`, `Special Notice`, `Award Notice`, `Justification`, `Justification and Approval (J&A)`, `Modification/Amendment/Cancel`, `Sale of Surplus Property` or `Consolidate/(Substantially) Bundle`), `base_type` (the kind it was first posted as), `department`, `department_code` (CGAC), `sub_tier`, `agency_code` (FPDS), `office`, `office_code` (AAC), `organization_type`, `posted_date` and `posted_at`, `response_deadline` (as SAM.gov writes it, usually with the office's UTC offset) and `response_deadline_date`, `archive_type` and `archive_date`, `set_aside_code` and `set_aside`, `naics_code`, `classification_code` (PSC), the place of performance (`performance_street`, `performance_city`, `performance_state`, `performance_zip`, `performance_country`), for an award `award_number`, `award_date`, `award_amount` (US dollars) and `awardee`, `primary_contact` and `secondary_contact` (each with `title`, `name`, `email`, `phone`, `fax`), the contracting office's `office_city`, `office_state`, `office_zip` and `office_country`, `active`, `description` (the notice's text, cut by SAM.gov at about 32,000 characters), `additional_info_url` and `source_url` (the notice on SAM.gov).

Empty fields are `null`.

<Note>
  An id the active list does not carry returns `found: false` with HTTP 200,
  not an error. That is also the answer for a notice SAM.gov has archived.
</Note>

<Card title="Full reference" icon="code" href="/api-reference/overview">
  Schemas, all response fields, and an interactive playground.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.