SAM.gov Contract Opportunities API (Official, Your Own Key) avatar

SAM.gov Contract Opportunities API (Official, Your Own Key)

Pricing

from $2.00 / 1,000 opportunities

Go to Apify Store
SAM.gov Contract Opportunities API (Official, Your Own Key)

SAM.gov Contract Opportunities API (Official, Your Own Key)

Search US federal contract opportunities on SAM.gov through the official Get Opportunities API with your own free key. Filter by keyword, NAICS, set-aside, notice type, agency, state and dates. Clean, flat rows with contacts, deadlines, awards and attachment links. $0.002 per opportunity.

Pricing

from $2.00 / 1,000 opportunities

Rating

0.0

(0)

Developer

Gigsmith

Gigsmith

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

10 hours ago

Last modified

Features

Limited permissions

Share

SAM.gov Contract Opportunities API: federal bids as clean data, with your own key

SAM.gov Contract Opportunities searches US federal contract opportunities through the official SAM.gov Get Opportunities API and returns clean, flat rows: title, notice type, agency, NAICS, set-aside, posted date, response deadline, place of performance, points of contact, award details and attachment links. Filter by keyword, NAICS code, set-aside, notice type, agency, state and dates. It costs $0.002 per opportunity.

It uses your own free SAM.gov API key and the official public API, not page scraping, so results are complete, stable and within SAM.gov's terms.

What can this SAM.gov Actor do?

  • 🏛️ Official data: calls api.sam.gov/opportunities/v2/search with your key. No HTML scraping, no broken selectors
  • 🔎 Rich filters: title keywords, NAICS codes, notice types (solicitation, presolicitation, sources sought, award...), set-aside (SBA, 8(a), HUBZone, SDVOSB, WOSB...), agency, organization code, state, ZIP, PSC code, solicitation number, posted dates and response-deadline window
  • 🧹 Normalized rows: department, agency and office split out; contacts, place of performance and award details flattened; duplicates across searches removed
  • 📎 Links ready to use: SAM.gov page link, attachment URLs and description link, with your API key stripped out so you can share the dataset safely
  • 📝 Optional full descriptions (one extra API call each)
  • 🛡️ Quota-aware: plans the API calls before it starts and stops cleanly when your key's daily quota is used up
  • ⏰ Built for monitoring: "Posted in the last N days" makes daily or weekly scheduled runs simple

Who uses SAM.gov opportunity data?

  • Government contractors and small businesses watching for bids in their NAICS codes and set-aside programs
  • Capture and BD teams feeding new solicitations into a CRM, spreadsheet or Slack channel
  • Bid-matching and GovTech tools that need a reliable opportunities feed
  • Analysts and researchers studying federal procurement by agency, set-aside or industry

How to get SAM.gov opportunities

  1. Get a free SAM.gov public API key: sign in at sam.gov, open Account Details, and request an API key.
  2. Click Try for free on this Actor and paste the key into SAM.gov API key.
  3. Add Title keywords, NAICS codes and any other filters, and choose the posted-date window.
  4. Click Start. Each opportunity becomes one row in the Output tab (views: Opportunities, Contacts, All fields), downloadable as JSON, CSV or Excel.

Input example

{
"samApiKey": "<your SAM.gov key>",
"keywords": ["cybersecurity"],
"naicsCodes": ["541511", "541512"],
"noticeTypes": ["o", "k"],
"setAside": "SBA",
"postedWithinDays": 7,
"activeOnly": true,
"maxItems": 500,
"maxApiCalls": 10
}
FieldWhat it does
samApiKeyYour own SAM.gov public API key (stored encrypted, never logged or saved)
keywordsTitle searches; each keyword is one API search
naicsCodesEach NAICS code is one API search (every keyword x NAICS x notice-type combination is a call)
noticeTypeso Solicitation, p Presolicitation, k Combined Synopsis/Solicitation, r Sources Sought, s Special Notice, a Award Notice, u J&A, g Surplus sale, i Intent to bundle
setAsideOne set-aside code, e.g. SBA, 8A, HZC, SDVOSBC, WOSB
agency, organizationCode, state, zip, classificationCode, solicitationNumber, noticeIdExtra API filters
postedWithinDays / postedFrom / postedToPosted-date window (at most 1 year, an API rule)
responseDeadlineFrom / responseDeadlineToResponse-deadline window
activeOnlyDrop archived notices
mustContainFree local title filter applied after the search
fetchDescriptionsAdd the full description text (one API call per opportunity)
includeRawAdd the original SAM.gov record under raw (key stripped)
maxItems, maxApiCallsRow cap, and a cap on calls to protect your key's daily quota

Output example

The record below is the example notice from the official SAM.gov API documentation, as this Actor returns it:

{
"noticeId": "5b345bbb7127b91a3ad577b203fc6f68",
"title": "Historic Office Renovation",
"solicitationNumber": "47PF0018R0023",
"noticeType": "Award Notice",
"baseType": "Combined Synopsis/Solicitation",
"postedDate": "2018-05-04",
"responseDeadline": null,
"archiveDate": null,
"archiveType": "manual",
"active": true,
"setAsideCode": null,
"setAside": null,
"naicsCode": "236220",
"naicsCodes": [
"236220"
],
"classificationCode": "Z",
"department": "GENERAL SERVICES ADMINISTRATION",
"subTier": "PUBLIC BUILDINGS SERVICE",
"office": "PBS R5",
"agencyPath": null,
"agencyPathCode": null,
"officeAddress": {
"city": "CHICAGO",
"state": "IL",
"zip": "60604",
"country": "USA"
},
"placeOfPerformance": {
"city": "Milwaukee",
"state": "WI",
"zip": "53202",
"country": "USA"
},
"pointsOfContact": [
{
"type": "primary",
"name": "Jesse L. Jones",
"title": "Contracting Officer",
"email": "jesse.jones@gsa.gov",
"phone": "2174941263"
}
],
"award": {
"number": "47PF0018C0066",
"amount": 800620.0,
"date": "2018-05-04",
"awardeeName": "D.G. Beyer, Inc.",
"awardeeUei": "025114695AST"
},
"samUrl": "https://sam.gov/opp/5b345bbb7127b91a3ad577b203fc6f68/view",
"descriptionApiUrl": "https://api.sam.gov/prod/opportunities/v1/noticedesc?noticeid=5b345bbb7127b91a3ad577b203fc6f68",
"additionalInfoLink": null,
"attachmentUrls": [],
"matchedQuery": {
"ptype": "a"
}
}

The run's OUTPUT record has a summary: queries, API calls used, records matched on SAM.gov, rows returned and charged events.

How much does it cost?

This Actor uses pay-per-event pricing.

EventPriceWhen it's charged
opportunity$0.002Once per opportunity saved to the dataset, after duplicates are removed
  • No monthly rental. Apify platform usage is included. The only other charge is Apify's standard run-start event of $0.00005 per run.
  • 1,000 opportunities cost $2. A daily NAICS watch that returns 20 new notices costs about $0.04 a day.
  • Rejected keys, invalid inputs and failed API calls are not charged.
  • The SAM.gov API itself is free; you only need your own key.
  • Set Max charge per run to cap your spend.

About SAM.gov API limits

SAM.gov limits how many API requests each key can make per day, depending on the account's role. Personal keys without a role get a small daily allowance (about 10 requests); keys from accounts with a SAM.gov role or a system account get far more. Each search page returns up to 1,000 opportunities in one request, so a focused daily search usually needs only 1–3 calls. The Actor counts its calls, refuses searches that would need more than Max API calls, and stops cleanly with a clear message if SAM.gov reports the quota is used up.

FAQ

Is this scraping SAM.gov? No. It uses the official, documented Get Opportunities public API with your own key.

Why do I need my own API key? SAM.gov issues keys per user and doesn't allow sharing them. With your own key, the data access is yours and fully within SAM.gov's terms. Keys from api.data.gov and DEMO_KEY don't work on SAM.gov; it must be the key from your SAM.gov Account Details page.

Can I search the description text? The API searches titles. Use fetchDescriptions to download descriptions, then filter them in your own tools.

Can I get attachments? Each row includes attachmentUrls. Opening them requires appending your own API key, which the Actor deliberately leaves out of the dataset.

Can I run it every morning? Yes. Create an Apify Schedule with postedWithinDays: 1 and connect the dataset to Google Sheets, Slack, email, Make, Zapier or n8n.

Something went wrong? Open an issue on the Issues tab with the run link and I'll fix it.

Keywords

SAM.gov API, SAM.gov scraper, federal contract opportunities, government contracts, government bids, RFP search, federal RFPs, NAICS search, set-aside opportunities, small business contracts, 8(a) contracts, SDVOSB contracts, contract opportunities API, govcon leads, procurement data


Made by Gigsmith. Not affiliated with or endorsed by GSA or SAM.gov.