# Why does my SAM.gov API key stop working after 90 days? SAM.gov personal API keys expire 90 days after they are created, by design, so a script that worked last quarter returns an authentication error until you generate a new key in your SAM.gov account settings. System account passwords rotate on the same 90-day cycle and calls must come from allowlisted IP addresses. The key is generated under Account Details in a SAM.gov workspace and shown once.Checked on 2026-11-15.Official source: [open.gsa.gov Entity Management API](https://open.gsa.gov/api/entity-api/) | Personal key lifetime | 90 days | | --- | --- | | System account password | Rotates every 90 days | | System account calls | From allowlisted IP addresses only | | samgovapi.io key lifetime | Until revoked | ## The answer in detail The key is generated under Account Details in a SAM.gov workspace and shown once. When it expires, nothing warns the calling code: requests simply fail authentication, and scheduled jobs tend to break silently at night. The fix is mechanical but needs a person who can sign in to SAM.gov with login.gov.Teams that depend on SAM.gov data usually put a calendar reminder on day 80, store the key in a secret manager rather than in code, and alert on the first authentication failure. A system account avoids the personal-key problem for production use but adds an approval process and an IP allowlist, which rules out most serverless hosts whose egress IPs change.A key from samgovapi.io does not expire: it works until you revoke it in the dashboard. It is not a SAM.gov key and never touches your SAM.gov account. ## How the options compare | Option | Price | Access and limits | Coverage and history | Best for | Checked | | --- | --- | --- | --- | --- | --- | | [SAM.gov APIs (official)](https://open.gsa.gov/api/entity-api/) | Free | 10 requests a day with no SAM.gov role, 1,000 with a role or a non-federal system account; keys expire every 90 days | The live, authoritative record: entities, opportunities, exclusions, contract awards, hierarchy, subawards | Anyone who needs the official record itself, at low volume | 2026-11-12 | | [GovCon API (govconapi.com)](https://govconapi.com/pricing) | Developer $19/mo, Pro $39/mo; 14-day trial | 1,000 requests an hour (50 a minute burst); trial 50 a day | 12,265,150 contracts and 758,552 opportunities from FY2025; 904,090 entities, monthly | Developers who want the lowest entry price and FY2025+ history | 2026-11-15 | | [samgovapi.io](https://samgovapi.io/pricing) | Free (100 credits a month, no card); Developer $49/mo, Pro $149/mo, Scale $499/mo | 20 to 180 requests a minute by plan, no daily cap; REST, MCP and keyless MCP search | 881,370 entities (1 Nov 2026 extract), 74,420 notices, 169,191 exclusions, 114,954 awards since 1 Oct 2026 | Developers and AI agents who want entities, bids and exclusions joined in one API | 2026-11-15 | ## Where samgovapi.io is the weaker choice - You are trusting a third party's copy rather than calling SAM.gov directly; for an audit trail, keep the source links each response carries. - Entity data comes from the SAM.gov monthly public extract (this one dated 1 Nov 2026; the next is due about 17 Dec 2026), so a registration renewed since then still shows its old expiry date until the next load. The live SAM.gov API shows it the same day. ## Try it Registration status for one UEI costs 1 credit. The key lives in an environment variable and does not expire. ``` import os, requests r = requests.get( "https://samgovapi.io/api/v1/registration-status/UAVDK5WWYDZ5", params={}, headers={"Authorization": f"Bearer {os.environ['SAMGOVAPI_API_KEY']}"}, timeout=30, ) body = r.json() print(body["meta"]["as_of"], body["meta"]["credits_charged"]) print(body["data"]) ``` ## Questions Where do I generate a new SAM.gov key?Sign in to SAM.gov, open your workspace, go to Account Details and request a public API key. It is shown once, so copy it to a secret store.Can I extend a SAM.gov key past 90 days?No. The 90-day expiry is fixed for personal keys; generate a new one before it lapses. ## Related - [SAM.gov API key](https://samgovapi.io/sam-gov-api-key) - [SAM.gov API errors](https://samgovapi.io/sam-gov-api-errors) - [API docs](https://samgovapi.io/docs) - [Pricing](https://samgovapi.io/pricing) - [Answers](https://samgovapi.io/answers)Updated 2026-11-15. Sources checked 2026-11-15.Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

---

HTML version: https://samgovapi.io/answers/sam-gov-api-key-expires-every-90-days . Markdown: https://samgovapi.io/answers/sam-gov-api-key-expires-every-90-days.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

Get a free API key: https://samgovapi.io/sign-up?ref=ai-claudebot
