Home / Guides / Federal contracts
Federal contracts

SAM.gov API Key: How to Get One, Its Limits, and How to Skip It

How to get a SAM.gov public API key, why a personal key without an entity role allows only 10 requests a day and expires every 90 days, and how to search contract opportunities without one.

Every call to the SAM.gov Opportunities API needs a public API key from your SAM.gov account. Getting one takes a few minutes. Living with it is the harder part: the key you get first allows 10 requests a day and has to be replaced every 90 days. This guide covers how to get the key, what each limit means in practice, and how to search contract opportunities without a SAM.gov key at all.

How to get a SAM.gov public API key

GSA's documentation describes these steps (checked 2026-10-28):

  1. Create an account on SAM.gov and sign in.
  2. Open Account Details from your profile.
  3. Request a Public API Key. SAM.gov asks for your password or a one-time code sent to your email before it shows the key.
  4. Copy the key right away. It is visible until you leave the page.

Send it as the api_key parameter on every request to https://api.sam.gov/opportunities/v2/search.

The limits that catch people out

10 requests a day. GSA's rate limit table gives a personal key held by a non-federal user with no role at a registered entity 10 requests a day. The same personal key gets 1,000 a day once the account has a role at an entity, and a non-federal system account also gets 1,000. Federal system accounts get 10,000.

Every page and every description is a request. Results come in pages of at most 1,000, and the description field of each notice is a link, not the text. Pulling the text for a page of 20 notices adds 20 calls, so with the entry level key a single search that reads descriptions spends the whole daily allowance.

Keys expire every 90 days. SAM.gov creates the next key 15 days before the current one expires and both work during that window. A scheduled job has to pick up the new key every quarter or it starts failing.

Dates are required. postedFrom and postedTo must be sent in MM/dd/yyyy format and can be at most one year apart.

How to raise the limit

If your company is registered in SAM.gov, ask its entity administrator to give your account a role. Your personal key then allows 1,000 requests a day at no cost. Companies that need more, or want a key not tied to one person, can request a system account, which goes through its own review.

How to skip the key

SAM.gov also publishes a public extract of every open notice once a day, and downloading it needs no key. SecFeed loads that extract every morning, so you can search the same notices with a SecFeed key and no daily ration:

curl -s "https://secfeedapi.com/v1/sam/opportunities?naics=5415&setAside=SBA&deadlineFrom=2026-10-29&sort=deadline&size=2&description=false" \
  -H "Authorization: Bearer YOUR_KEY"
{
  "total": {
    "value": 13,
    "relation": "eq"
  },
  "opportunities": [
    {
      "noticeId": "7261a4af85cf424e8fa62a10fbf66bc3",
      "title": "NIPR / SIPR drops Basic Purchase Agreement - LOCAL AREA NETWORK (LAN)/DEPLOYABLE LOCAL AREA NETWORK (DLAN) ENGINEERING AND INSTALLATION SUPPORT TO NETWORK ENTERPRISE CENTER (NEC)",
      "department": "DEPT OF DEFENSE",
      "type": "Sources Sought",
      "naicsCode": "541519",
      "setAsideCode": "SBA",
      "responseDeadline": "2026-10-29T15:00:00-10:00",
      "firstSeen": "2026-10-28T00:00:00Z"
    },
    {
      "noticeId": "7d434dab4914473ca2d4a3c93d45b665",
      "title": "IRS Audio-Visual (AV) and Video Teleconferencing (VTC) Enterprise Systems Integration, Support, and Maintenance Master IDIQ",
      "department": "TREASURY, DEPARTMENT OF THE",
      "type": "Combined Synopsis/Solicitation",
      "naicsCode": "541519",
      "setAsideCode": "SBA",
      "responseDeadline": "2026-10-30T17:00:00-04:00",
      "firstSeen": "2026-10-28T00:00:00Z"
    }
  ]
}

That is every small business set-aside notice under NAICS 5415 (computer systems design) still open for responses, soonest deadline first, in one call. naics=5415 covers every six-digit code under it. Leave out description=false to get each notice's full text in the same response.

Two things to know about keyword search. q matches the description as well as the title, which finds notices whose titles are vague. It also matches standard contract clauses: many Defense Logistics Agency notices carry the same cybersecurity language, so a search for cyber* returns parts orders too. Add a NAICS or set-aside filter to keep results on target.

Get new notices pushed to you

Instead of polling, save the search and SecFeed sends new matches to your endpoint after each morning's refresh:

curl -s https://secfeedapi.com/v1/sam/alerts \
  -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/sam", "filters": {"naics": "5415", "setAside": "SBA"}}'

Each delivery is a JSON POST with the matching notices, 100 per request. GET /v1/sam/alerts shows when each alert last sent and whether your endpoint accepted it.

When to use SAM.gov's own API instead

SecFeed has open notices and keeps every notice it has loaded since October 2026. It does not have SAM.gov's archive before that, attachments or entity registrations. If you need those, or your account already has an entity role, the official API is free and fine. See SAM.gov API vs SecFeed API for the full comparison.

Run this guide with your own key

Free key, no card needed. Every example on this page works on the free plan.

Get free API key →