Nexus Tools / Data guides

SAM.gov contract opportunities as JSON or CSV: the public daily extract, the keyed API, a Python example and a free sample

How to pull US federal solicitations and award notices from SAM.gov yourself, what the keyed API quota really is, what the public daily CSV extract contains and where it surprises you, and when a normalized feed is worth paying for.

Updated: November 2026. Everything below was tested live on 5 November 2026.

The short version

1. The two official routes

Route A: the Get Opportunities API

Documentation: open.gsa.gov/api/get-opportunities-public-api. The endpoint is https://api.sam.gov/prod/opportunities/v2/search. The docs state that a user must provide an API key, that a posted-date range is mandatory, and that limit has a maximum of 1000 records per page (default 1). The key comes from the Account Details page of your SAM.gov account, so a login is required. In our test, a request without a key returned a bare HTTP 404 instead of a message about the missing key.

The quota depends on your role. The Opportunities page only says that requests per day are limited based on the federal, non-federal or general role. The numbers are in the API key rate-limit table on the Entity Management API page:

Account typeKey typeDefault daily limit
Non-federal user with no role in SAM.govPersonal API key10 requests/day
Non-federal user with a role in SAM.govPersonal API key1,000 requests/day
Federal userPersonal API key1,000 requests/day
Non-federal system userSystem account API key1,000 requests/day

Two caveats. We did not spend a key to confirm that this table is applied to the Opportunities endpoint in the same way, so check your own account. And with limit=1000, ten requests can still return up to 10,000 notices, so the quota mostly hurts when you experiment, retry, or need several filtered queries per day.

Route B: the public bulk extract

SAM.gov Data Services publishes the "Contract Opportunities" extract with privacy "Public" (sam.gov/data-services), and it is listed on data.gov. The file we use:

https://s3.amazonaws.com/falextracts/Contract%20Opportunities/datagov/ContractOpportunitiesFullCSV.csv

Checked on 5 November 2026:

Quirks of the extract

2. DIY: new solicitations to CSV in Python

This script streams the file, stops at the first row older than three days (the file is sorted newest day first, so a few MB are enough) and writes a CSV. Run on 5 November 2026 it returned 14 notices in NAICS 5415 posted since 2 November. It needs pip install requests. For a full-history scan remove the break; the whole download is 217 MB.

import csv
import io
from datetime import date, timedelta

import requests

URL = ("https://s3.amazonaws.com/falextracts/Contract%20Opportunities/datagov/"
       "ContractOpportunitiesFullCSV.csv")
CUTOFF = (date.today() - timedelta(days=3)).isoformat()   # file is sorted newest day first
NAICS_PREFIX = "5415"                                     # computer systems design and related
KEEP = ["NoticeId", "Title", "Sol#", "Sub-Tier", "PostedDate", "Type", "ResponseDeadLine",
        "NaicsCode", "ClassificationCode", "SetASideCode", "PopState", "Link"]


def lines(resp):
    """Decode line by line: the file is mostly UTF-8 with a few Windows-1252 lines."""
    for raw in resp.iter_lines(chunk_size=1 << 16):
        try:
            yield raw.decode("utf-8")
        except UnicodeDecodeError:
            yield raw.decode("cp1252")


rows = []
with requests.get(URL, stream=True, timeout=120, headers={"User-Agent": "my-script/1.0"}) as resp:
    resp.raise_for_status()
    # csv.DictReader accepts any iterator of lines; quoted multi-line descriptions are handled.
    for row in csv.DictReader(lines(resp)):
        if row["PostedDate"][:10] < CUTOFF:
            break                                        # stop early: nothing newer follows
        if row["Type"] in ("Solicitation", "Combined Synopsis/Solicitation") \
                and row["NaicsCode"].startswith(NAICS_PREFIX):
            rows.append({k: row[k] for k in KEEP})

with open("sam_opportunities.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.DictWriter(f, fieldnames=KEEP)
    w.writeheader()
    w.writerows(rows)
print(len(rows), "notices since", CUTOFF)

3. When the Actor saves time

For a single export the script above is enough, and free. The Apify Actor SAM.gov Contract Opportunities (by Nexus Scrapers) reads the same public extract, not the API, so it needs no key either. It pays off when you would otherwise maintain that code:

Pricing is pay per result; the Actor page shows the current price.

What it does not do: it cannot give you closed or historical notices (the extract holds active ones only; schedule it and keep the datasets if you need history), attachments, or estimated values. It does not use the keyed API, so there is no detail beyond what the extract contains. For a one-off CSV, use the script.

4. Real sample: 20 normalized records

These 20 records were produced on 5 November 2026 by running the Actor's own code locally on the live extract (no Apify platform involved): 12 solicitations and 8 award notices posted on 4 and 5 November 2026, taken from the newest rows with at most one notice per agency, except Defense Logistics Agency (at most two solicitations and three awards). They are the first matches in that order, not hand-picked for quality. Contacts are not included. One award whose awardee was a named individual was skipped on purpose, and a scrub pass over every text field removed one e-mail address and one string shaped like a phone number from free-text descriptions (the second was a wage-determination ID, so the scrub is deliberately over-eager).

Download: sample.json (full records, UTF-8) and sample.csv (flattened, lists joined with | , opens in Excel). Free to use under the notes in section 5.

NoticeTypeAgencyTitleNAICSSet-asideDeadline / award
33cea54eSolicitationVETERANS AFFAIRS, DEPARTMENT…Correct Electrical Deficiencies236220SDVOSBC2026-12-08
fcbdee6bComb. Synopsis/Sol.NATIONAL INSTITUTES OF HEALTHMaintenance/Service Agreement - GE PET Discov…811210NONE2026-11-13
1578828aSolicitationDEPT OF THE AIR FORCEReplace DSN-HDD Generator for 78th Signal Bat…335312NONE2026-11-10
f0144497SolicitationDEPT OF THE NAVYSole Source OEM Hirsch Software Service Agree…513210-2026-11-04
3a347e6cComb. Synopsis/Sol.DEFENSE LOGISTICS AGENCY81--SUPPORT,SHIPPING AND S332439-2026-11-12
f8c20df3Comb. Synopsis/Sol.DEFENSE LOGISTICS AGENCY47--HOSE ASSEMBLY,NONMETAL332999-2026-11-12
308a70d9SolicitationUS CENSUS BUREAUPressure Seal V-Fold Mailer322220SBA2026-11-11
b8fa750aSolicitationFOREST SERVICEStove Prairie Campground Gate Replacement237990SBA2026-11-16
74284fefComb. Synopsis/Sol.FEDERAL PRISON SYSTEM / BUREA…FCI-GRE FY27 QTR 2 SUBSISTENCE - NATIONAL MENU311999SBA2026-11-18
30657ffbComb. Synopsis/Sol.AGRICULTURAL MARKETING SERVICEMozzarella Cheese311513-2026-11-12
52ec7727Comb. Synopsis/Sol.AGRICULTURAL RESEARCH SERVICEReplacement Cattle Dip Vat Drip Pad (Edinburg…236220SBA2026-12-16
f38e8430Comb. Synopsis/Sol.NATIONAL OCEANIC AND ATMOSPHE…N--UIL Generator Replacement238290SBA2026-11-17
6bdfdd58Award NoticeFOREST SERVICENational Forests and Grasslands of Texas Davy…115310SBA35,447 USD
66f3ede9Award NoticeDEFENSE LOGISTICS AGENCY62--PANEL,INDICATING,LIGHT TRANSMITTING336320-350,000 USD
4e0b027fAward NoticeDEFENSE LOGISTICS AGENCY59--RELAY,HYBRID333612-350,000 USD
b643ded2Award NoticeAGRICULTURAL MARKETING SERVICE12-1NFG-27-B-0002 - AMS International Bulk So…11119-5,125,304 USD
c2fb9a69Award NoticeNATIONAL OCEANIC AND ATMOSPHE…F--This requirement is for oil containment bo…562910-150,000 USD
84c41720Award NoticeDEPARTMENTAL OFFICESZ--WV-CANAAN VLY NWR-CHAIN LINK FENCE236220-18,000 USD
0cd8054eAward NoticeFEDERAL PRISON SYSTEM / BUREA…FCC TERRE HAUTE BREAD NOV26-SEP27311812SBA227,945 USD
206024acAward NoticeVETERANS AFFAIRS, DEPARTMENT…6515--NX EQ Physiologic Motility Analyzers (E…339113-5,457,452 USD

One award record, trimmed to the main fields:

{
  "sourceId": "b643ded22776416391c1870fe11480ab",
  "noticeType": "contract-award",
  "noticeTypeCode": "Award Notice",
  "title": "12-1NFG-27-B-0002 - AMS International Bulk Sorghum Solicitation",
  "buyer": {
    "name": "AGRICULTURAL MARKETING SERVICE",
    "country": "US",
    "city": "WASHINGTON",
    "nutsCode": null,
    "buyerType": "central-government"
  },
  "publicationDate": "2026-11-04",
  "awardInfo": {
    "winners": [
      {
        "name": "CARGILL, INCORPORATED Wayzata MN 55391 USA",
        "country": "US"
      }
    ],
    "awardedValue": {
      "amount": 5125303.8,
      "currency": "USD"
    },
    "awardDate": "2026-11-04"
  },
  "samSolicitationNumber": "12-1NFG-27-B-0002",
  "samNaicsCode": "11119",
  "samPscCode": "8915",
  "samSetAsideCode": null,
  "samAwardNumber": "12-1NTB-27-C-0006",
  "samAwardeeState": "MN",
  "samAwardeeZip": "55391"
}

5. Data licence and terms

The content is created by US federal agencies. The data.gov entry does not state a licence. SAM.gov's Terms of Use say that SAM.gov makes data available via APIs and extracts at open.gsa.gov/api and sam.gov/data-services, and that automated data gathering and web scraping tools are prohibited (with account access denied if detected). Downloading the published extract is the route the terms point to; scraping the website is not.

The Dun & Bradstreet note. The same terms say that SAM.gov contains data supplied by D&B, that D&B owns it and restricts its use, and that "D&B Open Data" (legal business name, street address, city, state, ZIP, country and similar elements) may be used with limits, among them that you may not share it in bulk, meaning enough records that someone could use them as a substitute for getting the data from D&B. The terms list the affected records: entity registrations and exclusions dated before 4 April 2022, and base award notices with an award date before 4 April 2022. In today's extract 716 award notices are dated before that day; the 2026 awards in our sample fall outside the list. If you plan to republish older award notices (awardee names and addresses) in bulk, read the terms and the D&B section first. This is a summary, not legal advice.

Personal data: the raw file carries contracting officers' names, e-mails and phones. Our sample leaves them out. If you keep them, use them only for correspondence about that notice.

Links