SAM.gov API key — guide & test panel
Get a free SAM.gov public API key, understand the real limits, and run a test search against the official Get Opportunities Public API.
Keep your key private. It is tied to your SAM.gov account. On this page it is kept only in sessionStorage for this tab (cleared when you close it) and is sent only to
api.sam.gov. Never paste it into pages you don't trust, and never commit it to a public repository.An older version of this page saved a SAM.gov key permanently in this browser's localStorage. Other BarbrickDesign tools may read it from there; if you no longer want it stored, remove it.
1. Get your key
- Sign in (or create an account) at SAM.gov — sign-in uses Login.gov.
- Open your profile's Account Details page (sam.gov/profile/details).
- Under Public API Key, re-enter your password to request/view the key. It is shown until you leave the page, so copy it straight away.
- Rotate it at least every 90 days, as the SAM.gov Terms of Use require.
2. Test your key
No key stored.
| Title | Agency | Type | Posted | Due |
|---|
3. Daily limits (personal API keys)
| Account type | Requests per day |
|---|---|
| Non-federal user, no role in SAM.gov | 10 |
| Non-federal user with a role (e.g. entity registration) | 1,000 |
| Federal user | 1,000 |
System accounts have higher limits (1,000 non-federal, 10,000 federal). Limits are set by GSA and may change; see the sources below. With only 10 calls a day, test sparingly.
How this works / sources
- The test calls
GET https://api.sam.gov/opportunities/v2/search?api_key=KEY&postedFrom=MM/dd/yyyy&postedTo=MM/dd/yyyy&limit=5. A posted date range is mandatory and may span at most one year;limitcan be up to 1,000. - Browser access (CORS): api.sam.gov does not reliably send CORS headers, so a browser page may be blocked from reading the reply even when your key is fine. If that happens, use Open request in new tab: the browser shows the raw JSON directly. For apps, call the API from a server (it also keeps your key secret).
- Sources: GSA: Get Opportunities Public API; GSA: rate limits by account type; SAM.gov Terms of Use (90-day key rotation). Checked 20 Nov 2026.