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

# SAM.gov

> US federal contract opportunities (solicitations, presolicitations, award notices) and the registry of entities registered to do business with the US government, from the GSA's SAM.gov APIs.

![](https://mintcdn.com/webrouter/T_A5Quwg50s_JK2y/logo/data-apis/sam-gov.webp?fit=max\&auto=format\&n=T_A5Quwg50s_JK2y\&q=85\&s=0ef8d3ffafddf0cb1b221cd42273f7bb)

[Web Catalog · Government](https://docs.webrouter.net/data-apis.md?category=government)

Needs&#x20;

`SAM_GOV_API_KEY`

Endpoints

2

Auth

Key in query

[Vendor docs](https://open.gsa.gov/api/get-opportunities-public-api/)

## Setup

| Variable | | What it is |
| - | - | - |
| `SAM_GOV_API_KEY` | required | A personal public API key from the Account Details page of a SAM.gov account. Sent as the api\_key query parameter. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Daily request limits depend on the account: a personal key of a non-federal user with no SAM.gov role gets 10 requests a day; with a role, or a federal user, 1,000.
* Dates are MM/dd/yyyy, not ISO.
* This entry reads public data only; FOUO and sensitive entity data need a federal system account.

## Endpoints

GET

Search contract opportunities

Federal contract notices posted in a date range, filtered by type, NAICS, set-aside, agency, place or deadline.

[Open](#sam-gov-opportunities-search)

GET

Search registered entities

Entities registered in SAM (contractors and grantees) by UEI, CAGE code, name, NAICS, state or free text, with registration and core data.

[Open](#sam-gov-entities-search)

### Search contract opportunities

GET

`/opportunities/v2/search`

`sam-gov.opportunities.search`

Federal contract notices posted in a date range, filtered by type, NAICS, set-aside, agency, place or deadline.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`postedFrom` required</td><td>string</td><td>query</td><td>Start of the posted-date range, MM/dd/yyyy. Example `01/01/2026`</td></tr>
    <tr><td>`postedTo` required</td><td>string</td><td>query</td><td>End of the posted-date range, MM/dd/yyyy; at most one year after postedFrom. Example `03/31/2026`</td></tr>
    <tr><td>`ptype`</td><td>string</td><td>query</td><td>Notice type: u justification, p presolicitation, a award notice, r sources sought, s special notice, o solicitation, g sale of surplus property, k combined synopsis/solicitation, i intent to bundle (DoD). One of `u`, `p`, `a`, `r`, `s`, `o`, `g`, `k`, `i`</td></tr>

    <tr>
      <td>
        `noticeid`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Notice id.
      </td>
    </tr>

    <tr>
      <td>
        `solnum`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Solicitation number.
      </td>
    </tr>

    <tr>
      <td>
        `title`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Opportunity title.
      </td>
    </tr>

    <tr>
      <td>
        `state`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Place-of-performance state.
      </td>
    </tr>

    <tr>
      <td>
        `zip`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Place-of-performance ZIP code.
      </td>
    </tr>

    <tr><td>`status`</td><td>string</td><td>query</td><td>Notice status. One of `active`, `inactive`, `archived`, `cancelled`, `deleted`</td></tr>

    <tr>
      <td>
        `organizationCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Code of the issuing organization.
      </td>
    </tr>

    <tr>
      <td>
        `organizationName`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Department or sub-tier name; general text search.
      </td>
    </tr>

    <tr>
      <td>
        `typeOfSetAside`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Set-aside code, e.g. SBA, 8A, WOSB, VSA.
      </td>
    </tr>

    <tr>
      <td>
        `ncode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        NAICS code, up to 6 digits.
      </td>
    </tr>

    <tr>
      <td>
        `ccode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Classification (product/service) code.
      </td>
    </tr>

    <tr>
      <td>
        `rdlfrom`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Response-deadline range start, MM/dd/yyyy.
      </td>
    </tr>

    <tr>
      <td>
        `rdlto`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Response-deadline range end, MM/dd/yyyy; at most one year after rdlfrom.
      </td>
    </tr>

    <tr><td>`limit`</td><td>integer</td><td>query</td><td>Records per page, at most 1000; the default is 1, so set it. Example `100`</td></tr>

    <tr>
      <td>
        `offset`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page index, from 0.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://open.gsa.gov/api/get-opportunities-public-api/) · Same job: [PNCP (Portal Nacional de Contratações Públicas)](https://docs.webrouter.net/data-apis/pncp.md#pncp-tenders-open)

```python Python theme={null}
router.call_data_api("sam-gov.opportunities.search", {'postedFrom': '01/01/2026', 'postedTo': '03/31/2026', 'limit': 100})
```

```text MCP theme={null}
call_data_api(endpoint="sam-gov.opportunities.search", params={"postedFrom": "01/01/2026", "postedTo": "03/31/2026", "limit": 100})
```

> [!NOTE]
>
> * Returns only the latest version of each notice. The description field is a link that needs api\_key appended to download the text.

### Search registered entities

GET

`/entity-information/v4/entities`

`sam-gov.entities.search`

Entities registered in SAM (contractors and grantees) by UEI, CAGE code, name, NAICS, state or free text, with registration and core data.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `ueiSAM`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        12-character UEI, or up to 100 of them.
      </td>
    </tr>

    <tr>
      <td>
        `legalBusinessName`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Legal business name, partial or complete.
      </td>
    </tr>

    <tr>
      <td>
        `cageCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        5-character CAGE code, or up to 100 of them.
      </td>
    </tr>

    <tr>
      <td>
        `q`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Free-text search.
      </td>
    </tr>

    <tr><td>`registrationStatus`</td><td>string</td><td>query</td><td>A active, E expired. One of `A`, `E`</td></tr>
    <tr><td>`samRegistered`</td><td>string</td><td>query</td><td>Yes for registered entities (the default), No for ID-assigned-only entities. One of `Yes`, `No`</td></tr>

    <tr>
      <td>
        `naicsCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        NAICS code.
      </td>
    </tr>

    <tr>
      <td>
        `pscCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Product/service code.
      </td>
    </tr>

    <tr>
      <td>
        `physicalAddressProvinceOrStateCode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        State or province of the physical address.
      </td>
    </tr>

    <tr><td>`includeSections`</td><td>string</td><td>query</td><td>Comma-separated sections: entityRegistration, coreData, assertions, pointsOfContact, repsAndCerts, integrityInformation, or All (which leaves out integrityInformation). Example `entityRegistration,coreData`</td></tr>

    <tr>
      <td>
        `page`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number.
      </td>
    </tr>

    <tr>
      <td>
        `size`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Records per page, at most 10.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://open.gsa.gov/api/entity-api/) · Same job: [Adzuna](https://docs.webrouter.net/data-apis/adzuna.md#adzuna-companies-top), [AI Ark](https://docs.webrouter.net/data-apis/aiark.md#aiark-company-search), [Airscale](https://docs.webrouter.net/data-apis/airscale.md#airscale-companies-search), [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-company-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-symbol-search), [Apollo.io](https://docs.webrouter.net/data-apis/apollo.md#apollo-organizations-search)

```python Python theme={null}
router.call_data_api("sam-gov.entities.search", {'includeSections': 'entityRegistration,coreData'})
```

```text MCP theme={null}
call_data_api(endpoint="sam-gov.entities.search", params={"includeSections": "entityRegistration,coreData"})
```

> [!NOTE]
>
> * At most 10 records per page and only the first 10,000 records of a result; page times size cannot exceed 10,000.
> * Values cannot contain & | \{ } ^ or backslash.
> * Adding format or emailId turns the call into an asynchronous bulk extract; this entry does not cover that flow.


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