Register a free SAM.gov account and generate a public API key from the account settings page
Send GET https://api.sam.gov/opportunities/v2/search with query params: api_key, keyword, naicsCode, postedFrom, postedTo, limit (max 1000), and ptype (e.g. 'o' for solicitation, 'a' for award)
Paginate through results using the offset parameter; each page returns a _links object and totalRecords count
Extract the noticeId from each result and send GET https://api.sam.gov/opportunities/v2/search?noticeid={id} to retrieve the full opportunity record including contacts, attachments, and place of performance
Fetch linked attachment files by following the resourceLinks URLs returned in the full opportunity response
Cache results with postedFrom/postedTo timestamps and poll daily near the 1000-request daily rate limit to capture new postings
Known gotchas
The public API key is rate-limited to 1000 requests per day; a system account key (requires a federal sponsoring agency) unlocks higher limits for production integrations
Award notices (ptype=a) include the awardee UEI and CAGE code but the contract amount may be $0 for indefinite-delivery vehicles; filter by baseAndAllOptionsValue for meaningful spend data
Date filter fields use MM/DD/YYYY format, not ISO 8601; passing ISO dates returns a 400 error with no descriptive message
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp