# US Federal Contracts Feed: SAM.gov & USAspending (`offerastudio/us-federal-contracts-feed`) Actor

Get US federal contract opportunities from the official SAM.gov API with the buyer's last-12-month award history from USAspending. Filter by NAICS, PSC, set-aside, notice type, agency, state and keywords. Works without a key in USAspending-only mode (recent awards).

- **URL**: https://apify.com/offerastudio/us-federal-contracts-feed.md
- **Developed by:** [Offera Studio](https://apify.com/offerastudio) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 opportunity returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does US Federal Contracts Feed do?

**US Federal Contracts Feed** gives you **open US federal contract opportunities** from the **official SAM.gov Get Opportunities API** and, for every opportunity, the **buyer's award history** from the **official USAspending API**. No scraping: both are government APIs, and the rows use the same field names as our [EU Tenders Feed](https://apify.com/offerastudio/eu-tender-feed), so a US and EU pipeline can share one schema.

Each row has:

- **notice ID, title, notice type** (solicitation, presolicitation, sources sought, award notice, ...) and solicitation number
- **agency, sub-tier agency and office**
- **NAICS code, PSC code and set-aside** (small business, 8(a), WOSB, SDVOSB, HUBZone ...)
- **posted date and response deadline**
- **place of performance** (city, state, country)
- **point of contact exactly as SAM.gov publishes it**
- the **SAM.gov link** and the **attachment links**
- **`buyerAwardsLast12m`**: how many contracts the same sub-tier agency awarded in the same NAICS code in the last 12 months, and their total obligated value (USAspending)

### Who is it for?

- **Government contractors and bid teams**: a daily list of new solicitations in your NAICS codes and set-asides, with a sense of how much the buyer really spends.
- **Capture managers**: sources sought and presolicitations early, with the contracting officer as published.
- **Small and disadvantaged businesses**: filter by 8(a), WOSB, SDVOSB, HUBZone or small business set-asides.
- **Market intelligence and sales teams**: which agencies buy what, and how much.

### How to use it

1. Click **Start** with the default input: yesterday's open opportunities from the SAM.gov daily cache. If the cache is not available, it returns **recent contract awards** from USAspending (the last 7 days) and one free info row that says so.
2. Add filters: NAICS codes or prefixes (`5415` matches the whole IT services group), PSC codes, set-asides, notice types, agency, state, keywords, response deadline.
3. **Schedule** it daily. With no dates set the Actor reads **yesterday's** postings.

### Two modes

| Mode | When | What you get |
| --- | --- | --- |
| **SAM.gov** | The daily SAM.gov cache (a small Cloudflare Worker run by the Actor owner) answers | Open opportunities posted in your date range, with buyer award history |
| **USAspending only** | The cache is unreachable or has no data for your dates | Recent contract awards (who got what), in the same row format, with a free `sam-key-missing` info row |

**Why a cache?** SAM.gov gives a personal API key without a SAM role only **10 requests per day**. So the Actor never calls SAM.gov itself: the owner's Worker fetches the previous day's opportunities once a day (1 to 3 requests) and the Actor reads that cache and filters locally. You never need a key, and your runs never use up the daily quota. The date range is limited to the cache window (30 days, counted from the day the cache started); days it does not have are listed in the run log.

In USAspending-only mode `source` is `usaspending`, the title is the award description, `awardee` and `awardAmount` are filled, and `noticeType` is `Contract award (USAspending)`.

### Input example

```json
{
    "postedFrom": "7 days",
    "naicsCodes": ["5415"],
    "setAsides": ["small-business", "8a"],
    "noticeTypes": ["solicitation", "sources-sought"],
    "state": "VA",
    "responseDeadlineAfter": "2026-10-20",
    "maxResults": 100
}
```

| Field | Meaning |
| --- | --- |
| `postedFrom`, `postedTo` | `2026-10-01` or relative (`7 days`). Empty = yesterday. At most 365 days. |
| `naicsCodes` | 2 to 6 digits. Prefixes match every code that starts with them. |
| `pscCodes` | Product and Service Codes or prefixes (`D302`, `D3`). |
| `setAsides` | `small-business`, `8a`, `wosb`, `sdvosb`, `hubzone`. |
| `noticeTypes` | `solicitation`, `presolicitation`, `sources-sought`, `award` (SAM.gov mode). |
| `agency` | Part of an agency, sub-tier or office name. |
| `state` | Place of performance, two letters. |
| `keywords` | SAM.gov mode: title or solicitation number contains any keyword. USAspending mode: award text. |
| `responseDeadlineAfter` | Only notices due on or after this date. |
| `includeBuyerHistory` | Add `buyerAwardsLast12m` (default on). |
| `maxResults` | Up to 5,000 (default 50). |

### Output example

Real output of a local run on 7 October 2026 with the default input, which ran in **USAspending-only mode** because the SAM.gov cache Worker was not deployed yet in the test environment. The first four contract awards:

| Award ID | Sub-tier agency | NAICS | Posted | Awardee | Amount (USD) |
| --- | --- | --- | --- | --- | --- |
| 36C25227F0018 | Department of Veterans Affairs | 334510 | 2026-10-04 | INSPIRE MEDICAL SYSTEMS, INC. | 25,075.38 |
| 36C25227F0017 | Department of Veterans Affairs | 334510 | 2026-10-04 | INSPIRE MEDICAL SYSTEMS, INC. | 25,075.38 |
| 36C24627P0008 | Department of Veterans Affairs | 623220 | 2026-10-04 | MYROVER-REESE FELLOWSHIP HOMES, INC. | 321,000.00 |
| 47QSWA27F00P1 | Federal Acquisition Service | 423840 | 2026-10-03 | GIGA, INC. | 35.82 |

The buyer history was checked live against USAspending for three agencies (contracts in NAICS 541512, 7 Oct 2025 to 7 Oct 2026): Department of the Army 535 contracts / $1.36 billion, Federal Acquisition Service 320 / $6.36 billion, Department of the Navy 4,395 / $1.32 billion.

An opportunity row in SAM.gov mode looks like this (**illustrative: the cache Worker and its SAM.gov key were not available when this README was written, so this row was built from the documented response format with made-up values; it was run through the Actor with a local stand-in for the cache**):

```json
{
    "source": "sam.gov",
    "noticeId": "0123456789abcdef0123456789abcdef",
    "title": "Cloud migration support services",
    "noticeType": "Solicitation",
    "solicitationNumber": "EXAMPLE-26-R-0001",
    "agency": "DEPT OF THE ARMY",
    "subTierAgency": "DEPT OF THE ARMY",
    "office": "W912 EXAMPLE CONTRACTING OFFICE",
    "naicsCode": "541512",
    "pscCode": "D302",
    "setAside": "Total Small Business Set-Aside (FAR 19.5)",
    "postedDate": "2026-10-06",
    "responseDeadline": "2026-10-27T14:00:00-04:00",
    "placeOfPerformance": { "city": "Fort Example", "state": "VA", "country": "USA" },
    "pointOfContact": [{ "type": "primary", "fullName": "Example Officer", "email": "contracting.officer@example.gov", "phone": "5555550100", "title": "Contracting Officer" }],
    "samUrl": "https://sam.gov/opp/0123456789abcdef0123456789abcdef/view",
    "attachmentLinks": ["https://sam.gov/api/prod/opps/v3/opportunities/resources/files/aaaa/download"],
    "buyerAwardsLast12m": {
        "count": 535,
        "totalValue": 1362571312.68,
        "currency": "USD",
        "agency": "Department of Defense / Department of the Army",
        "naics": "541512",
        "periodFrom": "2025-10-07",
        "periodTo": "2026-10-07",
        "scope": "Contracts of the same sub-tier agency in the same NAICS code"
    }
}
```

### How much does it cost?

This Actor uses **pay per event**:

| Event | Price |
| --- | --- |
| Opportunity (or award) returned, one row each | **$0.002** |
| Info rows, error rows and "no results" rows | **free** |

- 1,000 rows cost **$2**. The default run (50 rows at most) costs up to **$0.10**.
- SAM.gov and USAspending are free government APIs. Apify charges a tiny standard start fee per run.
- Set **Maximum cost per run** and the Actor stops when it is reached.

### Limitations

- **SAM.gov data comes from a daily cache**: it holds yesterday's and earlier days' notices (up to 30 days, from the day the cache started), updated once a day. A notice posted today appears tomorrow. Dates outside the cache are not available.
- **Buyer history is at sub-tier agency level, not office level**: the USAspending search cannot filter by contracting office. The `scope` field says exactly what was counted. It is matched by agency name; when the name cannot be matched, `buyerAwardsLast12m` is `null`.
- **The value is obligated dollars in the period**, not the face value of multi-year contracts.
- **All filters are applied by the Actor on the cached notices** (NAICS prefixes, PSC, set-asides, notice types, agency, state, keywords, deadline).
- **Keywords search the title and solicitation number** in SAM.gov mode, not the long description.
- **Points of contact are published by the agency**; the Actor does not add or guess any.
- Awards reach USAspending with a delay of days, so USAspending-only mode shows the last 7 days by default.

### FAQ

#### Is this official data?

Yes. Opportunities come from the SAM.gov Get Opportunities API v2 and award history from the USAspending API. Both are US government data, free to use.

#### Do I need a SAM.gov key?

No. You do not enter anything. The owner's cache Worker holds the key and makes about 1 to 3 SAM.gov requests a day. If the cache is down, the Actor returns recent awards from USAspending instead.

#### Why is `buyerAwardsLast12m` empty on some rows?

The agency name in the notice could not be matched to a USAspending agency, or you turned `includeBuyerHistory` off.

#### Is this the same schema as the EU tenders Actor?

The main fields (`noticeId`, `title`, `noticeType`, buyer, dates, links, `retrievedAt`, `error`, `errorMessage`) follow the same conventions, with US-specific fields added (NAICS, PSC, set-aside, place of performance).

### More tools from the same developer

All pay-per-result, no proxy or login needed, built and maintained by the same developer:

**Website audits**

- [Website Accessibility Checker: WCAG 2.2 & EAA](https://apify.com/offerastudio/website-accessibility-audit): accessibility issues with fixes, SEO basics and security headers.
- [Cookie & Tracker Audit: GDPR Consent Checker](https://apify.com/offerastudio/cookie-tracker-audit): cookies and tracking tags that load before consent.
- [AI Crawler Access Checker: robots.txt & llms.txt](https://apify.com/offerastudio/ai-crawler-access-audit): which AI crawlers a site allows, plus llms.txt.
- [Structured Data Validator: Schema & Rich Results](https://apify.com/offerastudio/structured-data-validator): JSON-LD and Microdata checked against Google's rich result rules.
- [Website Change Monitor: Diffs, Prices & Alerts](https://apify.com/offerastudio/website-change-monitor): get a row only when a page changes, with a clean diff.
- [Policy Change Monitor: Privacy & Terms Tracker](https://apify.com/offerastudio/policy-change-monitor): privacy policy and terms changes, classified clause by clause.
- [SaaS Pricing Monitor: Track Competitor Plans](https://apify.com/offerastudio/saas-pricing-monitor): competitor pricing plans as structured data, with price-change diffs.
- [Sitemap Change Monitor: New & Removed URLs](https://apify.com/offerastudio/sitemap-change-monitor): new, removed and changed URLs from a site's sitemaps.
- [Site SEO Crawler: Broken Links & On-Page Audit](https://apify.com/offerastudio/site-seo-crawler-audit): site-wide crawl for broken links, redirects and on-page SEO issues.
- [Website Tech Stack Detector: Bulk Lead Filters](https://apify.com/offerastudio/website-tech-stack-detector): technologies used by websites, with filters for lead lists.
- [Domain Availability & Expiry Checker (RDAP)](https://apify.com/offerastudio/domain-whois-availability): domain availability, registrar and expiry dates from RDAP.
- [Status Page SLA Monitor: Uptime & Incidents](https://apify.com/offerastudio/status-page-sla-monitor): SaaS vendor uptime, incidents and a monthly SLA table from public status pages.

**Company data and compliance**

- [Company Contact Finder: Emails, Phones & Socials](https://apify.com/offerastudio/company-contact-finder): contact details published on company websites.
- [UK New Companies Feed: Companies House Daily](https://apify.com/offerastudio/uk-new-companies-feed): newly incorporated UK companies with sector filters.
- [EU VAT Number Validator: Bulk VIES Checker](https://apify.com/offerastudio/eu-vat-number-validator): bulk VAT checks with name, address and consultation number.
- [LEI Corporate Tree: GLEIF Parents & Subsidiaries](https://apify.com/offerastudio/gleif-lei-corporate-tree): LEI lookup with parents, subsidiaries and a KYC summary.
- [UK Company Distress Watch: Insolvency Alerts](https://apify.com/offerastudio/uk-company-distress-watch): administrations, liquidations and winding-up petitions from The Gazette.
- [IBAN Validator: Bulk Check & Bank Lookup](https://apify.com/offerastudio/iban-bank-validator): IBAN format and checksum, plus bank name and BIC where open data exists.
- [Sanctions Screening: OFAC, EU, UN & UK Lists](https://apify.com/offerastudio/sanctions-screening): names screened against official sanctions lists, with match scores.
- [OSHA & EPA Violation Monitor: Fines by Company](https://apify.com/offerastudio/osha-epa-violation-monitor): US OSHA and EPA enforcement cases and penalties by company.
- [Email List Precheck: Syntax, MX & Disposable Check](https://apify.com/offerastudio/email-list-precheck): cheap email list hygiene before a real verification.
- [UK Company Officer Changes: Director & PSC Alerts](https://apify.com/offerastudio/uk-company-officer-changes): director, owner, address and status changes for a watchlist of UK companies.
- [FDA Warning Letters Monitor: By Company & Subject](https://apify.com/offerastudio/fda-warning-letters-monitor): FDA warning letters by company and subject, with cited regulations.
- [Supplier Risk Report: Sanctions, VAT & Insolvency](https://apify.com/offerastudio/supplier-risk-report): one risk row per supplier from eight official registers, with changes since last run.
- [Brand Impersonation Domain Monitor: Look-alikes](https://apify.com/offerastudio/brand-impersonation-domain-monitor): look-alike domains and certificates that imitate your brand, with a risk score.

**Media and AI**

- [Audio & Video Transcriber: Podcasts, SRT, Speakers](https://apify.com/offerastudio/audio-video-transcriber): audio, video, podcasts and social links to text, SRT and VTT.
- [Podcast Mention Alerts: Brand Mentions by Second](https://apify.com/offerastudio/podcast-mention-alerts): where your brand is said in new podcast episodes, with the exact second.
- [News Brand Mentions Monitor: New Articles Only](https://apify.com/offerastudio/news-brand-mentions-monitor): new news articles about your brand, people or topics.
- [YouTube Channel Monitor: New Videos & Growth](https://apify.com/offerastudio/youtube-channel-monitor): new videos and view growth of the channels you watch.

**Market signals**

- [US WARN Layoff Notices: 12 States Daily Feed](https://apify.com/offerastudio/us-warn-layoff-notices): layoff and plant closure notices from official state sources.
- [US Product Recalls Monitor: FDA & CPSC Feed](https://apify.com/offerastudio/us-product-recalls-monitor): FDA and CPSC recalls in one feed, with severity.
- [EU Tenders Feed: TED Public Procurement Alerts](https://apify.com/offerastudio/eu-tender-feed): EU public tenders from TED with CPV, country and value filters.
- [Liquor License Openings: New Bars & Stores (US)](https://apify.com/offerastudio/liquor-license-openings): new US liquor licences from official state open data.
- [Clinical Trials Change Monitor: Status & Updates](https://apify.com/offerastudio/clinicaltrials-change-monitor): status, enrollment and results changes on ClinicalTrials.gov studies.
- [Career Site Jobs Monitor: ATS Jobs & New Roles](https://apify.com/offerastudio/career-site-jobs-monitor): open roles from company career sites, with new and closed roles since the last run.
- [App Reviews Monitor: App Store & Google Play](https://apify.com/offerastudio/app-store-reviews-monitor): app reviews from both stores, only new ones in monitor mode.
- [Grants.gov Opportunities: US Federal Grants Feed](https://apify.com/offerastudio/grants-gov-opportunities): US federal grant opportunities by keyword, eligibility and agency.
- [Federal Register Monitor: US Rules & Notices Feed](https://apify.com/offerastudio/federal-register-monitor): new US rules, proposed rules and notices by agency or topic.
- [B2B Sales Trigger Feed: Hiring + Tech Leads](https://apify.com/offerastudio/b2b-sales-trigger-feed): companies hiring for a role and using (or not using) a technology, with contacts.
- [Local Business Leads: OpenStreetMap, No Website](https://apify.com/offerastudio/local-business-leads-osm): local businesses by city and category, including those with no website.
- [Solana Token Pair Monitor: New & Trending Pairs](https://apify.com/offerastudio/solana-token-pair-monitor): new and trending Solana pairs with liquidity, volume and safety flags.

### Feedback

Missing a field you want to track? Open an issue on the **Issues** tab.

# Changelog

This Actor's version history is a separate document: https://apify.com/offerastudio/us-federal-contracts-feed/changelog.md

# Actor input Schema

## `postedFrom` (type: `string`):

First posting date, for example 2026-10-01, or a relative value like "7 days" (7 days ago). Leave both dates empty for yesterday (SAM.gov) or the last 7 days (USAspending-only mode). With only this date set, the range runs to today. At most 365 days.

## `postedTo` (type: `string`):

Last posting date, inclusive.

## `naicsCodes` (type: `array`):

2 to 6 digits. A prefix such as 5415 matches every code that starts with it (computer systems design). A notice matches if it has any of the codes.

## `pscCodes` (type: `array`):

Product and Service Codes, for example D302 or the prefix D3 (IT services).

## `setAsides` (type: `array`):

Only notices with one of these set-asides.

## `noticeTypes` (type: `array`):

SAM.gov mode only. Leave empty for all types. In USAspending-only mode every row is a contract award.

## `agency` (type: `string`):

Part of an agency, sub-tier or office name, for example "Army" or "Veterans Affairs". Case does not matter.

## `state` (type: `string`):

Two-letter state code such as TX.

## `keywords` (type: `array`):

SAM.gov mode: a notice matches if its title or solicitation number contains any keyword. USAspending-only mode: searched in the award description and other award text.

## `responseDeadlineAfter` (type: `string`):

Only notices whose response deadline is on or after this date (YYYY-MM-DD). SAM.gov mode only. Notices without a deadline are left out.

## `includeBuyerHistory` (type: `boolean`):

SAM.gov mode: adds the number and total value of contracts that the same sub-tier agency awarded in the same NAICS code in the last 12 months (from USAspending).

## `maxResults` (type: `integer`):

Stop after this many rows. You pay $0.002 for each.

## Actor input object example

```json
{
  "includeBuyerHistory": true,
  "maxResults": 25
}
```

# Actor output Schema

## `opportunities` (type: `string`):

No description

## `buyers` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxResults": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("offerastudio/us-federal-contracts-feed").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxResults": 25 }

# Run the Actor and wait for it to finish
run = client.actor("offerastudio/us-federal-contracts-feed").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxResults": 25
}' |
apify call offerastudio/us-federal-contracts-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,offerastudio/us-federal-contracts-feed"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9bpa2ihHAaLhM1dnn/builds/gmu5QrcOQKR9OqqUu/openapi.json
