# SAM.gov Opportunities API The SAM.gov Get Opportunities v2 API requires postedFrom and postedTo dates no more than 1 year apart, returns at most 1,000 notices per page (the default is 1), and gives each description as a URL that costs another request. The description field is a URL that needs your key; each one costs a request. resourceLinks (attachments) is often null.Checked on 2026-11-12.Official source: [open.gsa.gov Get Opportunities API](https://open.gsa.gov/api/get-opportunities-public-api/) | Endpoint | api.sam.gov/opportunities/v2/search | | --- | --- | | Max page size | 1,000 (default 1) | | Date window | 1 year, required | | Versions | Latest active version only | | Nightly CSV | 71,703 active notices on 12 Nov 2026 | ## Gotchas - The description field is a URL that needs your key; each one costs a request. - resourceLinks (attachments) is often null. - Expect literal "null" strings. - Only one set-aside value per request. - Version history is only in the Data Services files. ## The nightly file instead SAM.gov publishes every active notice as one CSV each night (about 220 MB, 47 columns, full descriptions, contacts as printed). Archived files go back to FY1969. ## Search opportunities with one call ``` curl "https://samgovapi.io/api/v1/opportunities?q=cybersecurity&active=true" \ -H "Authorization: Bearer sg_YOUR_KEY" ``` ## Get this as JSON ``` curl "https://samgovapi.io/api/v1/opportunities?q=cybersecurity&active=true" \ -H "Authorization: Bearer sg_YOUR_KEY" ``` MCP tool: `search_opportunities`Keys start free, with no card. [Get a free API key](https://samgovapi.io/sign-up) or read the [docs](https://samgovapi.io/docs). ## Questions Why does the Opportunities API return only one result?The default limit is 1. Pass limit up to 1,000. ## Related - [Opportunity search](https://samgovapi.io/opportunity-search) - [SAM.gov API](https://samgovapi.io/sam-gov-api) - [SAM.gov API rate limits](https://samgovapi.io/sam-gov-api-rate-limits) - [Alerts](https://samgovapi.io/docs/alerts)Updated 2026-11-12. Sources checked 2026-11-12.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/sam-gov-opportunities-api . Markdown: https://samgovapi.io/sam-gov-opportunities-api.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
