# SAM.gov Contracts API: Federal Bids, RFPs & Awards (`responsible_front_evw/sam-gov-contract-opportunities`) Actor

US government contracts from the official SAM.gov public extract, not a web scraper: federal bids, RFPs, opportunities and award notices. No API key, no daily limit. NAICS, PSC, set-aside, state, keywords. Only-new alerts. Awardee mode ranks who wins. Contact names, emails and phones removed.

- **URL**: https://apify.com/responsible_front_evw/sam-gov-contract-opportunities.md
- **Developed by:** [Open Data Tools](https://apify.com/responsible_front_evw) (community)
- **Categories:** Lead generation, Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

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

## SAM.gov Contracts API: Federal Bids, RFPs & Awards

Get US government contracts, federal bids, RFPs and award notices from the **official SAM.gov Contract Opportunities public data extract**, the nightly file that GSA publishes for everyone on SAM.gov Data Services. Solicitations, combined synopses, presolicitations, sources sought (RFIs), special notices and award notices from every federal agency.

**No API key, no SAM.gov account, no daily request limit.** The official SAM.gov API asks for a key and limits requests per day. This Actor reads the public file instead, newest notices first, and stops as soon as it reaches the date you ask for: a 7-day search reads about 35 MB and takes seconds.

**Contact data removed.** Contracting officer and contract specialist names, emails, phone and fax numbers are never returned. Emails, phone numbers and contact names are also removed from the notice text. Awardees that look like private individuals are hidden.

### What you can do

- **Daily bid alerts:** open opportunities for your NAICS or PSC codes, set-asides and states. Schedule it every morning with *Only new since last run* and *Posted in the last N days* set to 2: you do not pay twice for the same notice, and each run reads less.
- **Small business pipelines:** total small business, 8(a), HUBZone, SDVOSB, WOSB and EDWOSB set-asides, with response deadline and days left.
- **Who wins federal contracts:** switch to *Awardees* mode and get one row per winning company: number of awards, total and largest amount, agencies, NAICS codes and links to the award notices. Competitor research and teaming partners in one click.
- **Filters:** keywords (whole words) and exclude keywords, NAICS (full or partial, for example 5415), PSC (for example D, R4, S2), set-aside, notice type, place of performance state, agency, posted in the last N days or since a date, only open, minimum award amount.

### Input example

```json
{
  "naicsCodes": ["236", "237", "238"],
  "states": ["TX"],
  "noticeTypes": ["Solicitation", "Combined Synopsis/Solicitation", "Presolicitation"],
  "postedWithinDays": 14,
  "maxItems": 200
}
```

Awardees of professional services contracts over $100,000 in the last 30 days:

```json
{
  "mode": "awardees",
  "naicsCodes": ["54"],
  "minAwardAmount": 100000,
  "postedWithinDays": 30
}
```

### Output example (shortened)

```json
{
  "noticeId": "16567730ff5e4a9c84b882059d6160b8",
  "title": "CON | Z2DA | REPLACE CHILLER 1 B104 | 580-24-111 | SOLICITATION",
  "solicitationNumber": "36C25626R0131",
  "noticeType": "Solicitation",
  "postedDate": "2026-10-30T13:07:21",
  "responseDeadline": "2026-12-08T02:00:00-06:00",
  "daysLeft": 37,
  "department": "VETERANS AFFAIRS, DEPARTMENT OF",
  "office": "256-NETWORK CONTRACT OFFICE 16 (36C256)",
  "setAsideCode": "SDVOSBC",
  "setAside": "Service-Disabled Veteran-Owned Small Business (SDVOSB) Set-Aside (FAR 19.14)",
  "naicsCode": "238220",
  "naicsSector": "Construction",
  "pscCode": "Z2DA",
  "pscCategory": "Maintenance, repair or alteration of real property",
  "placeOfPerformanceCity": "Houston",
  "placeOfPerformanceState": "TX",
  "awardee": null,
  "awardAmount": null,
  "samUrl": "https://sam.gov/workspace/contract/opp/16567730ff5e4a9c84b882059d6160b8/view",
  "description": "THIS OPPORTUNITY IS AVAILABLE ONLY TO SERVICE-DISABLED VETERAN-OWNED SMALL BUSINESSES...",
  "personalDataRemoved": 2,
  "source": "SAM.gov Contract Opportunities public data extract (GSA). U.S. Government data; link back: https://sam.gov"
}
```

Awardee mode row:

```json
{
  "awardee": "ECS FEDERAL, LLC",
  "awardeeCity": "Fairfax",
  "awardeeState": "VA",
  "awardsCount": 1,
  "totalAwardAmount": 162654574.0,
  "departments": ["DEPT OF DEFENSE"],
  "subTiers": ["DEFENSE ADVANCED RESEARCH PROJECTS AGENCY (DARPA)"],
  "naicsCodes": ["541990"],
  "exampleNotices": ["https://sam.gov/workspace/contract/opp/1a480b81ed1a4398b2b501db7ea9abb8/view"]
}
```

### Pricing

Pay per result:

| Event | Price |
|---|---|
| Actor start | $0.005 |
| Each row returned (notice or awardee) | $0.0015 ($1.50 per 1,000) |

Notices already returned in alert mode are skipped and never charged.

### How it works and limits

- One download per run of the public file `ContractOpportunitiesFullCSV.csv` (SAM.gov Data Services, privacy "Public"). GSA refreshes it every night, so notices posted today appear tomorrow.
- The file holds **active notices** only. Archived notices and old awards are not in it, so awardee mode covers recent award notices (the last months), not full contract history.
- SAM.gov does not allow reselling Dun & Bradstreet data, and awards from before SAM.gov dropped the DUNS number (4 April 2022) may contain it. As a precaution their awardee is hidden (`awardeeHidden: "dnb-data-before-2022-04-04"`).
- Alert mode saves what it has seen when a run finishes: if a run is aborted or times out, rows it already returned can come again in the next run and are charged again.
- Attachments (PDFs) are not downloaded: use the `samUrl` link.
- Contact names in the free text are removed automatically. Rarely a name may slip through, or a phrase that only looks like a name may be removed.
- Awardees are shown only when the name has a company word (Inc, LLC, Services, Construction...). The rest may be private persons and are hidden, so a few real companies with a bare name are hidden too (`awardeeHidden: "possible-individual"`).
- If the file cannot be read and no notice was found, the run ends as **failed** with a clear message. A search with no matches ends as succeeded with 0 results.

### Source and legal

Data: SAM.gov Contract Opportunities public data extract, U.S. General Services Administration (GSA). Most SAM.gov material is free of copyright; citation and a link back to SAM.gov are appreciated and included in every row. This Actor uses only the public extract, not the SAM.gov website search or any login. It is not affiliated with or endorsed by GSA or SAM.gov and does not use their logos.

### FAQ

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

No. The Actor reads the public nightly extract, so there is no key and no daily request limit.

#### How fresh is the data?

GSA rebuilds the file every night. Schedule the Actor once a day with *Only new since last run* to get each new notice once.

#### Can I get the contracting officer's email?

No. This Actor does not return the contact fields. Use the `samUrl` link to see the official notice and its points of contact on SAM.gov.

#### Can I see who won a contract?

Yes. Award notices include the awardee, award number, date and amount. Mode *Awardees* groups them by company.

#### How much does it cost?

$1.50 per 1,000 rows, plus $0.005 per run. A daily alert costs about $0.15 a month plus the new notices it finds.

#### Is this an alternative to the SAM.gov API?

Yes, for active notices. You get the same public opportunities without a key or a daily limit. It does not cover archived notices, because the public file only holds active ones.

#### Is it a SAM.gov scraper?

No. It does not scrape the SAM.gov website or use its internal API. It reads the public extract that GSA publishes for download, and you call it as an API through Apify. It is not the official SAM.gov API and is not affiliated with GSA.

#### Can I get daily alerts for bids and RFPs?

Yes. Set your NAICS or PSC codes, turn on *Only new since last run*, set *Posted in the last N days* to 2 and schedule the Actor every morning. Each new solicitation, RFI or presolicitation comes once.

#### Can I filter small business set-asides?

Yes: total small business, 8(a), HUBZone, SDVOSB, WOSB and EDWOSB.

#### Does it include state and local government bids?

No. It covers federal agencies only, because that is what SAM.gov publishes.

#### Can I call it from my own code?

Yes. Like any Apify Actor, you can start it with the Apify API or on a schedule and read the results as JSON, CSV or Excel.

### Questions or a missing field?

Open an issue in the **Issues** tab. Feature requests are welcome.

# Actor input Schema

## `mode` (type: `string`):

'notices': one row per opportunity (solicitations, sources sought, awards...). 'awardees': one row per company that won contracts, with number of awards and total amount, built from award notices.

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

Optional: keep notices whose title or description contains any of these words or phrases (whole words, any case), for example janitorial, cybersecurity, "body armor".

## `excludeKeywords` (type: `array`):

Optional: drop notices that contain any of these words, for example brand name, sole source.

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

Optional: full or partial NAICS codes, for example 541512 (computer systems design), 5415 (all IT services), 236 (building construction), 54 (all professional services).

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

Optional: full or partial PSC codes, for example DA01, D (IT services), R4 (professional support), 70 (IT equipment), S2 (housekeeping).

## `setAsideCodes` (type: `array`):

Optional: keep only these small business set-asides.

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

Optional: keep only these notice types. Empty = all.

## `states` (type: `array`):

Optional: two-letter state codes, for example VA, TX, CA. Uses the place of performance; when a notice has none, the contracting office state.

## `agencies` (type: `array`):

Optional: text in the department, sub-tier or office name, for example veterans affairs, army, NASA, GSA.

## `postedWithinDays` (type: `integer`):

Only notices posted in the last N days. Short windows are fastest: the file is read newest first and reading stops at this date.

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

Optional: only notices posted on or after this date, YYYY-MM-DD. Overrides 'Posted in the last N days'.

## `onlyOpen` (type: `boolean`):

Skip notices whose response deadline has already passed. Notices without a deadline (for example awards) are kept. Not used in awardee mode.

## `minAwardAmount` (type: `integer`):

Optional: only award notices of at least this amount. Useful with mode 'awardees'.

## `includeDescription` (type: `boolean`):

Add the notice text (emails, phone numbers and contact names removed).

## `maxDescriptionChars` (type: `integer`):

Cut longer descriptions at this many characters (0 = no limit).

## `onlyNewSinceLastRun` (type: `boolean`):

Alerts mode: return only notices not returned by a previous run with the same filters. Schedule it daily, with 'Posted in the last N days' set to 2, and pay only for new notices. Not used in awardee mode.

## `maxItems` (type: `integer`):

Stop after this many rows. You pay per row.

## Actor input object example

```json
{
  "mode": "notices",
  "keywords": [
    "cybersecurity"
  ],
  "postedWithinDays": 7,
  "onlyOpen": true,
  "includeDescription": true,
  "maxDescriptionChars": 5000,
  "onlyNewSinceLastRun": false,
  "maxItems": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (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 = {
    "keywords": [
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("responsible_front_evw/sam-gov-contract-opportunities").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 = { "keywords": ["cybersecurity"] }

# Run the Actor and wait for it to finish
run = client.actor("responsible_front_evw/sam-gov-contract-opportunities").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 '{
  "keywords": [
    "cybersecurity"
  ]
}' |
apify call responsible_front_evw/sam-gov-contract-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,responsible_front_evw/sam-gov-contract-opportunities"
        }
    }
}
```

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/qvFUikbtfegKFMxa3/builds/4vmfB7qqCNvaCwRUW/openapi.json
