Home / Developers / SAM.gov Opportunities API
API reference

SAM.gov Opportunities API

Search every open federal contract opportunity on SAM.gov without a SAM.gov key or its 10 calls a day limit. SecFeed loads SAM.gov's public extract each morning, so you can filter by keyword, NAICS, set-aside, state and deadline, fetch one notice in full, or save a search and receive new matches at a webhook. Product overview →

Endpoints

/v1/sam/opportunities

GEThttps://secfeedapi.com/v1/sam/opportunities

Open federal contract opportunities from SAM.gov, refreshed daily: solicitations, presolicitations, sources sought and award notices.

ParameterTypeDescriptionExample
qstringKeywords matched in title and description, all words required. End a word with * for a prefix.cybersecurity
naicsstringSix digits for one code, fewer digits for every code under that prefix.5415
setAsidestringComma separated set-aside codes such as SBA, SDVOSBC, 8A, WOSB, HZC.SBA
statestringComma separated place of performance state codes.VA,MD
typestringComma separated notice types, exactly as SAM.gov writes them.Sources Sought
pscstringComma separated product or service codes.DA01
solicitationNumberstringComma separated solicitation numbers.
departmentstringAgency name contains this text.VETERANS
awardeestringAwardee name contains this text (award notices).
postedFromstringPosted on or after, YYYY-MM-DD.2026-10-01
postedTostringPosted on or before, YYYY-MM-DD.
deadlineFromstringResponse deadline on or after, YYYY-MM-DD.2026-11-01
deadlineTostringResponse deadline on or before, YYYY-MM-DD.
firstSeenFromstringOnly notices SecFeed first loaded on or after this date or firstSeen value.
activestringtrue or false.
sortstringdeadline for the soonest response deadline first. Default is newest posted first. Default posted.
descriptionstringfalse drops the long description from each row.false
fromintegerOffset for paging. Default 0.
sizeintegerRows per page, 1 to 100. Default 20.
  • total.value is capped at 10000; relation is gte when there are more.
  • Data is refreshed daily after SAM.gov publishes its extract around 03:30 UTC.

/v1/sam/opportunity

GEThttps://secfeedapi.com/v1/sam/opportunity

One SAM.gov notice with contacts, place of performance and full description.

ParameterTypeDescriptionExample
noticeIdrequiredstringThe noticeId of a notice.
  • Unknown noticeId returns 404.

/v1/sam/alerts

POSThttps://secfeedapi.com/v1/sam/alerts

Your saved SAM.gov alerts with when each last sent and its status.

ParameterTypeDescriptionExample
urlrequiredstringhttps webhook on a public host. JSON body field.https://example.com/hooks/sam
filtersobjectAny of q, naics, setAside, state, type, psc, department, awardee, active. JSON body field.{'naics': '541512', 'setAside': 'SBA'}
  • After each daily refresh SecFeed POSTs notices first seen in that refresh that match, 100 per request, up to 1000 a day per alert.
  • GET /v1/sam/alerts lists your alerts with lastSent and lastStatus. POST /v1/sam/alerts/delete with {"id": n} removes one. 25 alerts per key.

Request examples

Every response below is real output from the API, trimmed to the first records.

Small business set-aside IT work

Every code under NAICS 5415 (computer systems design) set aside for small business, newest first.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?naics=5415&setAside=SBA&size=2&description=false"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/sam/opportunities",
    params={'naics': '5415', 'setAside': 'SBA', 'size': '2', 'description': 'false'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
{
  "total": {
    "value": 137,
    "relation": "eq"
  },
  "opportunities": [
    {
      "noticeId": "34f5c199765542849cee11334d7dcfd8",
      "title": "Pilot Training Transformation Device Support Services IV (PTT DSS IV)",
      "solicitationNumber": "FA300227RDSS4",
      "department": "DEPT OF DEFENSE",
      "cgac": "057",
      "subTier": "DEPT OF THE AIR FORCE",
      "fpdsCode": "5700",
      "office": "FA3002  338 ESS CC",
      "aacCode": "FA3002",
      "postedDate": "2026-10-26 11:21:41",
      "type": "Combined Synopsis/Solicitation",
      "baseType": "Combined Synopsis/Solicitation",
      "archiveType": "autocustom",
      "archiveDate": "2027-10-26",
      "setAsideCode": "SBA",
      "setAside": "Small Business Set Aside - Total",
      "responseDeadline": "2026-11-25T15:00:00-06:00",
      "naicsCode": "541519",
      "classificationCode": "DB01",
      "awardNumber": null,
      "awardDate": null,
      "awardAmount": null,
      "awardee": null,
      "organizationType": "OFFICE",
      "additionalInfoLink": null,
      "samUrl": "https://sam.gov/workspace/contract/opp/34f5c199765542849cee11334d7dcfd8/view",
      "lastSeen": "2026-10-28",
      "firstSeen": "2026-10-28T00:00:00Z",
      "active": true,
      "placeOfPerformance": {
        "street": null,
        "city": null,
        "state": null,
        "zip": "78150",
        "country": null
      },
      "officeAddress": {
        "city": "JBSA RANDOLPH",
        "state": "TX",
        "zip": "78150-4300",
        "country": "USA"
      },
      "contacts": [
        {
          "role": "primary",
          "title": null,
          "fullname": "Courtney Carter",
          "email": "courtney.carter.6@us.af.mil",
          "phone": "3804572092",
          "fax": null
        },
        {
          "role": "secondary",
  ...

Cybersecurity notices closing soonest

Keyword search over title and description, ordered by the response deadline.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?q=cybersecurity&sort=deadline&deadlineFrom=2026-11-01&size=2&description=false"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/sam/opportunities",
    params={'q': 'cybersecurity', 'sort': 'deadline', 'deadlineFrom': '2026-11-01', 'size': '2', 'description': 'false'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
{
  "total": {
    "value": 575,
    "relation": "eq"
  },
  "opportunities": [
    {
      "noticeId": "5eb401a525b74852a01d5dc0681b28f7",
      "title": "Edwards AFB Holiday Light & Decor Installation",
      "solicitationNumber": "FA930127Q0006",
      "department": "DEPT OF DEFENSE",
      "cgac": "057",
      "subTier": "DEPT OF THE AIR FORCE",
      "fpdsCode": "5700",
      "office": "FA9301  AFTC PZIO",
      "aacCode": "FA9301",
      "postedDate": "2026-10-21 14:35:25",
      "type": "Solicitation",
      "baseType": "Solicitation",
      "archiveType": "autocustom",
      "archiveDate": "2026-11-04",
      "setAsideCode": "SBA",
      "setAside": "Small Business Set Aside - Total",
      "responseDeadline": "2026-11-02T06:30:00-08:00",
      "naicsCode": "238210",
      "classificationCode": "N062",
      "awardNumber": null,
      "awardDate": null,
      "awardAmount": null,
      "awardee": null,
      "organizationType": "OFFICE",
      "additionalInfoLink": null,
      "samUrl": "https://sam.gov/workspace/contract/opp/5eb401a525b74852a01d5dc0681b28f7/view",
      "lastSeen": "2026-10-28",
      "firstSeen": "2026-10-28T00:00:00Z",
      "active": true,
      "placeOfPerformance": {
        "street": null,
        "city": "Edwards",
        "state": "CA",
        "zip": "93524",
        "country": "USA"
      },
      "officeAddress": {
        "city": "EDWARDS AFB",
        "state": "CA",
        "zip": "93524-1185",
        "country": "USA"
      },
      "contacts": [
        {
          "role": "primary",
          "title": null,
          "fullname": "Suzanna Kussman",
          "email": "suzanna.kussman@us.af.mil",
          "phone": null,
          "fax": null
        },
        {
          "role": "secondary",
  ...

Sources sought in Virginia

Market research notices are where agencies shape requirements before a solicitation.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?type=Sources%2520Sought&state=VA&size=2&description=false"
import os, requests

r = requests.get(
    "https://secfeedapi.com/v1/sam/opportunities",
    params={'type': 'Sources Sought', 'state': 'VA', 'size': '2', 'description': 'false'},
    headers={"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
{
  "total": {
    "value": 0,
    "relation": "eq"
  },
  "opportunities": [],
  "source": {
    "name": "SAM.gov Contract Opportunities extract",
    "loadedAt": "2026-10-28T22:28:30Z"
  }
}

Response fields

FieldTypeMeaning
total.value, total.relationobjectMatching notices, capped at 10000.
opportunities[].noticeIdstringSAM.gov notice id; use it with /v1/sam/opportunity.
opportunities[].title, solicitationNumberstringTitle and solicitation number.
opportunities[].type, baseTypestringNotice type and the type of the original notice.
opportunities[].department, subTier, officestringBuying agency, sub-agency and contracting office.
opportunities[].cgac, fpdsCode, aacCodestringAgency, sub-tier and office codes.
opportunities[].postedDatestringWhen the notice was posted.
opportunities[].responseDeadlinestringWhen responses are due, with time zone offset.
opportunities[].archiveType, archiveDatestringHow and when SAM.gov archives the notice.
opportunities[].setAsideCode, setAsidestringSet-aside code and its name.
opportunities[].naicsCode, classificationCodestringNAICS code and product or service code.
opportunities[].placeOfPerformance.street, city, state, zip, countrystringWhere the work is done.
opportunities[].officeAddress.city, state, zip, countrystringContracting office location.
opportunities[].contacts[].role, title, fullname, email, phone, faxstringPrimary and secondary contacts.
opportunities[].awardNumber, awardDate, awardAmount, awardeemixedFilled in on award notices.
opportunities[].organizationTypestringLevel of the posting organization, usually OFFICE.
opportunities[].additionalInfoLink, samUrlstringExtra information link and the notice page on SAM.gov.
opportunities[].descriptionstringNotice text. Omitted with description=false.
opportunities[].activebooleanWhether SAM.gov lists the notice as active.
opportunities[].firstSeen, lastSeenstringWhen SecFeed first loaded the notice and the last day it was in the extract.
source.name, source.loadedAtstringThe extract and when SecFeed last loaded it.

Common set-aside codes

CodeMeaning
SBATotal small business set-aside
SBPPartial small business set-aside
8A8(a) set-aside
8AN8(a) sole source
SDVOSBCService-disabled veteran-owned small business set-aside
WOSBWomen-owned small business set-aside
EDWOSBEconomically disadvantaged WOSB set-aside
HZCHUBZone set-aside
NONENo set-aside used

How to

How do I get only notices that are new since yesterday?

Pass firstSeenFrom with yesterday's date. firstSeen is when SecFeed first loaded the notice, so it works even when postedDate is older.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?firstSeenFrom=2026-10-28&size=2&description=false"
How do I cover a whole NAICS group?

Pass fewer than six digits. naics=5415 matches 541511, 541512, 541513, 541519 and the rest.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?naics=5415&size=2&description=false"
How do I list notices due in the next two weeks?

Set deadlineFrom and deadlineTo and sort by deadline.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?deadlineFrom=2026-11-01&deadlineTo=2026-11-14&sort=deadline&size=2&description=false"
How do I search for a phrase-like set of words?

q requires every word, in any order. Use word* to match a prefix such as cyber*.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?q=cyber%2A%2520assessment&size=2&description=false"
How do I see who won a contract?

Filter type to Award Notice; awardee, awardAmount and awardNumber are filled in on those rows.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?type=Award%2520Notice&size=2&description=false"
How do I combine set-asides?

Comma separate the codes.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?setAside=SDVOSBC,8A&size=2&description=false"
How do I narrow to one agency?

department matches any part of the agency name.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?department=VETERANS&size=2&description=false"
How do I get one notice with its full description and contacts?

Call /v1/sam/opportunity with the noticeId from a search.

curl -H "Authorization: Bearer $SECFEED_KEY" \
  "https://secfeedapi.com/v1/sam/opportunities?q=janitorial&size=1"

Errors

  • 400 when a date is not YYYY-MM-DD or q has no searchable words.
  • 404 from /v1/sam/opportunity for an unknown noticeId.
  • 400 from /v1/sam/alerts for a non https url, a private host or an unknown filter.

See also the error codes every endpoint shares.

Try it with your own key

Free key, no card needed.

Get free API key →