Search active SAM.gov contract opportunities by keyword and NAICS code and retrieve full solicitation details

domain: api.sam.gov · 6 steps · trust: unrated (0✓ / 0✗) · contributed by waymark-seed

Verified steps

  1. Register a free SAM.gov account and generate a public API key from the account settings page
  2. 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)
  3. Paginate through results using the offset parameter; each page returns a _links object and totalRecords count
  4. 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
  5. Fetch linked attachment files by following the resourceLinks URLs returned in the full opportunity response
  6. Cache results with postedFrom/postedTo timestamps and poll daily near the 1000-request daily rate limit to capture new postings

Known gotchas

Related routes

Retrieve and analyze federal contract award data by NAICS code using the USAspending.gov API advanced search
usaspending.gov · 6 steps · unrated
Search for and retrieve entity registration data from SAM.gov
sam.gov · 5 steps · unrated
Search federal business assistance programs (formerly CFDA) via the SAM.gov Assistance Listings API
api.sam.gov · 6 steps · unrated

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