# Can an AI agent get a SAM.gov data API key for me? Yes, here. The agent sends POST /api/v1/agent/signup with what the user wants and why, shows the user the approval link it gets back, and polls /api/v1/agent/token until the user approves; the key then goes straight to the agent. No password, card or SAM.gov account is involved, and the free plan applies until the user upgrades. This is a device-code flow, like signing in to a TV app.Checked on 2026-11-15.Source: [agents.md](https://samgovapi.io/agents.md) | Start | POST /api/v1/agent/signup | | --- | --- | | Finish | POST /api/v1/agent/token | | MCP tools | start_signup, finish_signup | | Plan | Free until upgraded | ## The answer in detail This is a device-code flow, like signing in to a TV app. The person stays in control: nothing is created until they approve in their browser, and they can revoke the key from the dashboard. The same flow is exposed as the start_signup and finish_signup MCP tools, which need no key.The agent should ask its user what data they need instead of guessing; the request is stored with the account so support can see why it exists.SAM.gov's own keys cannot be issued this way: they need a person signed in to SAM.gov with login.gov. ## 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 - The free plan an agent gets is 100 credits a month; heavy agent use needs a paid plan. ## Try it Start the signup; show approval_url to the person; then poll with device_code. ``` curl -s -X POST https://samgovapi.io/api/v1/agent/signup \ -H "Content-Type: application/json" \ -d '{"data_wanted":"open bids in NAICS 541512","use_case":"daily bid digest","agent":"my-agent"}' curl -s -X POST https://samgovapi.io/api/v1/agent/token \ -H "Content-Type: application/json" -d '{"device_code":"..."}' ``` ## Questions Does the agent see my password?No. You approve in your own browser; the agent only receives the API key.Can I revoke a key an agent got?Yes, from the dashboard, at any time. ## Related - [Recipe: get an API key through your agent](https://samgovapi.io/agents/recipes/get-an-api-key-through-your-agent) - [Agent signup docs](https://samgovapi.io/docs/agent-signup) - [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/ai-agent-get-api-key . Markdown: https://samgovapi.io/answers/ai-agent-get-api-key.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
