Endpoints
/v1/sam/opportunities
https://secfeedapi.com/v1/sam/opportunitiesOpen federal contract opportunities from SAM.gov, refreshed daily: solicitations, presolicitations, sources sought and award notices.
| Parameter | Type | Description | Example |
|---|---|---|---|
q | string | Keywords matched in title and description, all words required. End a word with * for a prefix. | cybersecurity |
naics | string | Six digits for one code, fewer digits for every code under that prefix. | 5415 |
setAside | string | Comma separated set-aside codes such as SBA, SDVOSBC, 8A, WOSB, HZC. | SBA |
state | string | Comma separated place of performance state codes. | VA,MD |
type | string | Comma separated notice types, exactly as SAM.gov writes them. | Sources Sought |
psc | string | Comma separated product or service codes. | DA01 |
solicitationNumber | string | Comma separated solicitation numbers. | |
department | string | Agency name contains this text. | VETERANS |
awardee | string | Awardee name contains this text (award notices). | |
postedFrom | string | Posted on or after, YYYY-MM-DD. | 2026-10-01 |
postedTo | string | Posted on or before, YYYY-MM-DD. | |
deadlineFrom | string | Response deadline on or after, YYYY-MM-DD. | 2026-11-01 |
deadlineTo | string | Response deadline on or before, YYYY-MM-DD. | |
firstSeenFrom | string | Only notices SecFeed first loaded on or after this date or firstSeen value. | |
active | string | true or false. | |
sort | string | deadline for the soonest response deadline first. Default is newest posted first. Default posted. | |
description | string | false drops the long description from each row. | false |
from | integer | Offset for paging. Default 0. | |
size | integer | Rows 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
https://secfeedapi.com/v1/sam/opportunityOne SAM.gov notice with contacts, place of performance and full description.
| Parameter | Type | Description | Example |
|---|---|---|---|
noticeIdrequired | string | The noticeId of a notice. |
- Unknown noticeId returns 404.
/v1/sam/alerts
https://secfeedapi.com/v1/sam/alertsYour saved SAM.gov alerts with when each last sent and its status.
| Parameter | Type | Description | Example |
|---|---|---|---|
urlrequired | string | https webhook on a public host. JSON body field. | https://example.com/hooks/sam |
filters | object | Any 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
| Field | Type | Meaning |
|---|---|---|
total.value, total.relation | object | Matching notices, capped at 10000. |
opportunities[].noticeId | string | SAM.gov notice id; use it with /v1/sam/opportunity. |
opportunities[].title, solicitationNumber | string | Title and solicitation number. |
opportunities[].type, baseType | string | Notice type and the type of the original notice. |
opportunities[].department, subTier, office | string | Buying agency, sub-agency and contracting office. |
opportunities[].cgac, fpdsCode, aacCode | string | Agency, sub-tier and office codes. |
opportunities[].postedDate | string | When the notice was posted. |
opportunities[].responseDeadline | string | When responses are due, with time zone offset. |
opportunities[].archiveType, archiveDate | string | How and when SAM.gov archives the notice. |
opportunities[].setAsideCode, setAside | string | Set-aside code and its name. |
opportunities[].naicsCode, classificationCode | string | NAICS code and product or service code. |
opportunities[].placeOfPerformance.street, city, state, zip, country | string | Where the work is done. |
opportunities[].officeAddress.city, state, zip, country | string | Contracting office location. |
opportunities[].contacts[].role, title, fullname, email, phone, fax | string | Primary and secondary contacts. |
opportunities[].awardNumber, awardDate, awardAmount, awardee | mixed | Filled in on award notices. |
opportunities[].organizationType | string | Level of the posting organization, usually OFFICE. |
opportunities[].additionalInfoLink, samUrl | string | Extra information link and the notice page on SAM.gov. |
opportunities[].description | string | Notice text. Omitted with description=false. |
opportunities[].active | boolean | Whether SAM.gov lists the notice as active. |
opportunities[].firstSeen, lastSeen | string | When SecFeed first loaded the notice and the last day it was in the extract. |
source.name, source.loadedAt | string | The extract and when SecFeed last loaded it. |
Common set-aside codes
| Code | Meaning |
|---|---|
| SBA | Total small business set-aside |
| SBP | Partial small business set-aside |
| 8A | 8(a) set-aside |
| 8AN | 8(a) sole source |
| SDVOSBC | Service-disabled veteran-owned small business set-aside |
| WOSB | Women-owned small business set-aside |
| EDWOSB | Economically disadvantaged WOSB set-aside |
| HZC | HUBZone set-aside |
| NONE | No 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.