SAM.gov API guide

Stop stitching SAM.gov and USAspending data together.

SAM.gov and USAspending are the authoritative public sources. They are also separate systems. If you are building capture tools, alerts, search, or agents, the work is less about calling one API and more about keeping opportunities, documents, history, and award context connected.

sam.gov opportunities APIUSAspending APIfederal procurement API
The problem

The hard part is not the first API request.

The hard part is keeping records joined after the first request. A capture workflow usually needs a notice, source documents, amendment history, buyer context, and award evidence. Those records do not arrive in one upstream shape.

SAM.gov opportunity notices answer what is open or posted.
SAM.gov document resources carry attachments and package links where available.
USAspending award data answers what was awarded and to whom.
Your app still has to preserve IDs, source links, history, and joins.
Official upstreams

Start with the authoritative systems.

Use the official APIs when you need the upstream source of truth. The tradeoff is that each system has its own authentication, schema, pagination, rate limits, and update model.

# Official SAM.gov opportunity search
# Authoritative upstream for notices. Parameters and limits are owned by SAM.gov.
curl -s 'https://api.sam.gov/opportunities/v2/search?api_key=<SAM_API_KEY>&limit=10'

# Official USAspending award search
# Authoritative upstream for federal spending and award data.
curl -s 'https://api.usaspending.gov/api/v2/search/spending_by_award/' \
  -H 'Content-Type: application/json' \
  --data '{
    "filters": {
      "time_period": [
        { "start_date": "2025-10-01", "end_date": "2026-09-30" }
      ]
    },
    "fields": ["Award ID", "Recipient Name", "Award Amount"],
    "limit": 10
  }'
Boring Data Platform path

Use one stable API surface for the connected workflow.

Boring Data Platform keeps public procurement records in a predictable response model. SAM.gov and USAspending remain the authoritative upstreams. The value is the stable contract: public IDs, source links, documents where available, history, and related award context where available.

Same key

REST and MCP use the same account, quota, and source-linked records. Start in Sandbox, then move the same calls into your app or agent.

# 1. List current SAM.gov opportunities
curl -s 'https://api.boringdataplatform.com/v1/opportunities?source=sam_current&limit=5' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

# 2. Read one normalized opportunity record
curl -s 'https://api.boringdataplatform.com/v1/opportunities/<recordId>' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

# 3. Fetch source documents and extracted text metadata where available
curl -s 'https://api.boringdataplatform.com/v1/opportunities/<recordId>/documents' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

# 4. Review replay/history context
curl -s 'https://api.boringdataplatform.com/v1/opportunities/<recordId>/history' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'

# 5. Check related public award context where available
curl -s 'https://api.boringdataplatform.com/v1/opportunities/<recordId>/awards?limit=5' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'
Dated production capture

One record can carry the join points your app needs.

This capture was generated from the production API on 2026-05-17. It shows a SAM.gov current opportunity with its stable API ID, thread key, source page, document metadata, extracted text metadata, and replay context.

curl -s 'https://api.boringdataplatform.com/v1/documents/search?q=delivery%20schedule&source=sam_current&limit=5' \
  -H 'Authorization: Bearer <YOUR_API_KEY>'
{
  "capturedAt": "2026-05-17",
  "recordId": "3d039e5f-b677-5949-b7eb-8a415edefee4",
  "threadKey": "sam:SPRBL126R0007",
  "title": "SINCGARS Installation Kits and the Associated Components",
  "agencyName": "DEPT OF DEFENSE",
  "solicitationNumber": "SPRBL126R0007",
  "sourceName": "sam-contract-opportunities-current",
  "documents": {
    "sourcePageUrl": "https://sam.gov/workspace/contract/opp/302138dc3b014979bcc0ec1359293533/view",
    "attachments": 8,
    "resourceLinks": 0,
    "extractedTextLength": 7918,
    "hasExtractedText": true
  },
  "history": {
    "relatedRecordCount": 1,
    "snapshots": 1,
    "updatedAt": "2026-05-08T16:19:07.105Z"
  },
  "relatedAwardsReturned": 0
}
Notes and limits

Authority stays upstream

SAM.gov and USAspending remain the source systems. Boring Data Platform preserves source links and normalized public records for applications.

Documents are where available

Attachment metadata, source URLs, and extracted text depend on what the public source exposes and what has been captured.

Award joins are evidence, not magic

Related award context is returned where public records provide enough signal. Some opportunity records will return zero related awards.

Ready to try the workflow?

Start with the free Sandbox, run the calls above, then use the docs when you need filters, pagination, documents, history, awards, or MCP tools.