# SAM.gov Contract Opportunities API (No API Key) (`crawlwren/sam-gov-opportunities`) Actor

US federal contract opportunities from SAM.gov's official daily public extract, with no API key and no 10-requests/day cap. Filter by keyword, NAICS, PSC, set-aside, state, agency and notice type. Optional live API mode with your own key. $1.50 per 1,000.

- **URL**: https://apify.com/crawlwren/sam-gov-opportunities.md
- **Developed by:** [Chordio, Inc.](https://apify.com/crawlwren) (community)
- **Categories:** Lead generation, 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 opportunities

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

**Get US federal contract opportunities from SAM.gov as clean JSON, CSV or Excel, without registering for an API key.** This covers solicitations, combined synopses, presolicitations, sources sought, special notices and award notices. You can filter by keyword, NAICS, PSC, set-aside, place of performance and agency.

Use it to:

- **Build a daily bid pipeline.** Send new small-business, 8(a), HUBZone, SDVOSB or WOSB opportunities in your NAICS codes to Sheets, Slack or your CRM every morning.
- **Research the market.** See award notices with awardee and amount, and find out which agencies are buying what you sell.
- **Feed AI agents and capture tools.** One consistent schema, callable as a tool through Apify's MCP server.

### Why this SAM.gov scraper

| | This actor | Typical SAM.gov scrapers |
|---|---|---|
| API key | **Not needed.** It uses SAM.gov's official daily public extract. You can also add your own key for the live API. | You must register for and paste an api.sam.gov key |
| Rate limits | **None in keyless mode** | SAM.gov limits keys from accounts without a role to **10 requests per day** |
| Descriptions | Full description text is included (keyless mode) | Often just a link |
| Filters | Keywords, NAICS and PSC prefixes, set-asides, states, agencies, notice types, open deadlines | Usually a few |
| Personal data | Contact persons are off by default (opt-in) | Usually always included |
| Failure handling | Clear errors for invalid keys or used-up quota, with **automatic fallback** to the keyless extract | Often a silent empty dataset |
| Price | **$1.50 per 1,000 opportunities** | $2–$10 per 1,000 |

### How it works

- **Keyless mode (default).** SAM.gov publishes the full set of active Contract Opportunities as an official public file, refreshed once a day. The actor downloads it, about 75,000 notices and 200 MB, and applies your filters. A run takes about 20 seconds. It's ideal for daily alerts.
- **Live API mode (optional).** Add your own free public API key from *sam.gov → Profile → Account Details*. The actor then queries the official Get Opportunities API v2, with up to 1,000 notices per request, and the results are fresher than the daily file. If the key is rejected or your daily quota runs out, it can fall back to keyless mode automatically.

### How to use it

1. Enter **keywords** and/or **NAICS codes** (prefix match: `5415` covers all computer systems design).
2. Optionally filter by **set-aside** (`SBA`, `8A`, `HZC`, `SDVOSBC`, `WOSB` …), **states** (`VA`, `MD`, `DC` …) and **agencies** (`NAVY`, `VETERANS AFFAIRS` …).
3. Choose the **notice types**. The default is solicitations, combined synopses, presolicitations and sources sought.
4. Set **posted in the last N days** (default 7) and click **Start**.

#### Daily "new opportunities" alert

Schedule the actor daily with `postedWithinDays: 1`, then connect Google Sheets, Slack or email, or use a Zapier/Make webhook. In keyless mode a daily run costs a few cents.

#### Input example

```json
{
  "keywords": ["cloud", "cybersecurity", "software"],
  "naicsCodes": ["5415", "518210"],
  "setAsideCodes": ["SBA"],
  "states": ["VA", "MD", "DC"],
  "noticeTypes": ["o", "k", "p", "r"],
  "postedWithinDays": 7,
  "maxResults": 500
}
```

### Output

Here's a sample from a real keyless run:

```json
[
  {
    "noticeId": "3315163e0a8241f894c2f47e3c55921a",
    "url": "https://sam.gov/opp/3315163e0a8241f894c2f47e3c55921a/view",
    "title": "Five Year Contract for Nutrition and Food Service Software and Support, VISN 20",
    "solicitationNumber": "36C26027Q0070",
    "noticeType": "Sources Sought",
    "baseType": "Sources Sought",
    "active": true,
    "postedDate": "2026-10-06T19:02:02+00:00",
    "responseDeadline": "2026-10-26T17:00:00-07:00",
    "daysToDeadline": 18,
    "archiveDate": "2026-11-10",
    "department": "VETERANS AFFAIRS, DEPARTMENT OF",
    "subTier": "VETERANS AFFAIRS, DEPARTMENT OF",
    "office": "260-NETWORK CONTRACT OFFICE 20 (36C260)",
    "agencyPath": "VETERANS AFFAIRS, DEPARTMENT OF > VETERANS AFFAIRS, DEPARTMENT OF > 260-NETWORK CONTRACT OFFICE 20 (36C260)",
    "naicsCode": "513210",
    "pscCode": "DA10",
    "setAsideCode": "NONE",
    "setAside": "No Set aside used",
    "placeOfPerformance": {
      "street": null,
      "city": "Vancouver",
      "state": "WA",
      "zip": "98661",
      "country": "USA"
    },
    "officeAddress": {
      "street": null,
      "city": "VANCOUVER",
      "state": "WA",
      "zip": "98661",
      "country": "USA"
    },
    "award": null,
    "description": "See attached Sources Sought Notice.",
    "descriptionUrl": null,
    "additionalInfoLink": null,
    "resourceLinks": [],
    "dataSource": "sam_daily_extract",
    "licence": "U.S. Government work (public domain). Source: SAM.gov Contract Opportunities.",
    "scrapedAt": "2026-10-08T00:42:00.433692+00:00"
  },
  {
    "noticeId": "ec4254f4fdf24f8998bd4e10d5b58050",
    "url": "https://sam.gov/opp/ec4254f4fdf24f8998bd4e10d5b58050/view",
    "title": "MCC Software Development Recompete",
    "solicitationNumber": "95332427K0001",
    "noticeType": "Sources Sought",
    "baseType": "Sources Sought",
    "active": true,
    "postedDate": "2026-10-06T17:17:20+00:00",
    "responseDeadline": "2026-10-29T18:00:00-04:00",
    "daysToDeadline": 21,
    "archiveDate": "2026-11-13",
    "department": "MILLENNIUM CHALLENGE CORPORATION",
    "subTier": "MILLENNIUM CHALLENGE CORPORATION",
    "office": "MILLENNIUM CHALLENGE CORPORATION",
    "agencyPath": "MILLENNIUM CHALLENGE CORPORATION > MILLENNIUM CHALLENGE CORPORATION > MILLENNIUM CHALLENGE CORPORATION",
    "naicsCode": "541512",
    "pscCode": "DD01",
    "setAsideCode": "NONE",
    "setAside": "No Set aside used",
    "placeOfPerformance": {
      "street": null,
      "city": "Washington",
      "state": "DC",
      "zip": "20005",
      "country": "USA"
    },
    "officeAddress": {
      "street": null,
      "city": "Washington",
      "state": "DC",
      "zip": "20005",
      "country": "USA"
    },
    "award": null,
    "description": "he scope of this Performance Work Statement (PWS) is intended to cover Contractor support of all services required to provide application engineering, operations and maintenance (O&M) support, platform customization and configuration, and Tier 3 user support across all enterpr...",
    "descriptionUrl": null,
    "additionalInfoLink": null,
    "resourceLinks": [],
    "dataSource": "sam_daily_extract",
    "licence": "U.S. Government work (public domain). Source: SAM.gov Contract Opportunities.",
    "scrapedAt": "2026-10-08T00:42:00.433692+00:00"
  },
  {
    "noticeId": "11daf96499d740599521f71352b76ea2",
    "url": "https://sam.gov/opp/11daf96499d740599521f71352b76ea2/view",
    "title": "Mobile & Data Services for the U.S. Embassy Panama",
    "solicitationNumber": "19PM0726Q0012",
    "noticeType": "Solicitation",
    "baseType": "Solicitation",
    "active": true,
    "postedDate": "2026-10-06T17:16:17+00:00",
    "responseDeadline": "2026-10-13T15:00:00-05:00",
    "daysToDeadline": 5,
    "archiveDate": "2026-10-28",
    "department": "STATE, DEPARTMENT OF",
    "subTier": "STATE, DEPARTMENT OF",
    "office": "U.S. EMBASSY PANAMA CITY",
    "agencyPath": "STATE, DEPARTMENT OF > STATE, DEPARTMENT OF > U.S. EMBASSY PANAMA CITY",
    "naicsCode": "517112",
    "pscCode": "DE11",
    "setAsideCode": "NONE",
    "setAside": "No Set aside used",
    "placeOfPerformance": {
      "street": null,
      "city": "Panama",
      "state": "PA-8",
      "zip": null,
      "country": "PAN"
    },
    "officeAddress": {
      "street": null,
      "city": "WASHINGTON",
      "state": "DC",
      "zip": "20520",
      "country": "USA"
    },
    "award": null,
    "description": "The U.S. Embassy in Panama requires mobile and data services, including voice and text for basic phones and unlimited data service for Smart Phones and Tablets, for official domestic and international use. The anticipated performance is for a base year, with two one-year optio...",
    "descriptionUrl": null,
    "additionalInfoLink": null,
    "resourceLinks": [],
    "dataSource": "sam_daily_extract",
    "licence": "U.S. Government work (public domain). Source: SAM.gov Contract Opportunities.",
    "scrapedAt": "2026-10-08T00:42:00.433692+00:00"
  }
]
```

Key fields: `title`, `solicitationNumber`, `noticeType`, `department` / `subTier` / `office`, `naicsCode`, `pscCode`, `setAside`, `postedDate`, `responseDeadline`, `daysToDeadline`, `placeOfPerformance`, `award` (number, date, amount, awardee), `description`, `url` (public SAM.gov page), `dataSource`.

Point-of-contact details (`contacts`) are only added if you turn on **Include point-of-contact details**. Only enable it if you have a lawful basis to process that personal data.

### Pricing

Pay-per-event: you pay only for opportunities delivered after your filters.

| Event | Price | What it is |
|---|---|---|
| Run start | $0.0005 | Charged once per run. |
| Keyless daily-extract scan | $0.05 | Once per run in no-key mode: downloads and scans SAM.gov's full public extract (~75k notices, ~200 MB). |
| Opportunity | $0.0015 ($1.50 per 1,000) | One normalised opportunity delivered to the dataset (after your filters). |

**Examples:**

- A daily keyless alert with 20 matching opportunities costs about **$0.08/day (≈ $2.40/month)**.
- An API-mode run with your own key and 500 results costs about **$0.76**.

### Data source and licence

The data comes from SAM.gov Contract Opportunities, a public dataset from the U.S. General Services Administration (official daily public extract and the Get Opportunities Public API v2). It's a U.S. Government work in the public domain. This actor is not affiliated with or endorsed by GSA or SAM.gov.

### FAQ

**How fresh is keyless mode?** SAM.gov regenerates the public extract once a day, usually early morning US Eastern. For same-day notices, add your own API key. `RUN_STATS.bulk.lastModified` shows the extract's timestamp.

**Why do I only get 10 API requests a day with my key?** That's SAM.gov's limit for accounts without a role. Each request returns up to 1,000 notices, so it's usually enough. Keyless mode has no limit.

**Is my API key safe?** It's stored as a secret input, never written to logs or results, and redacted from error messages.

**Can I get UK or EU tenders too?** Yes, with our sibling actor: [UK & EU Public Tenders Scraper](https://apify.com/crawlwren/uk-eu-tenders).

### Support

Questions or feature requests: use the **Issues** tab or email hello@crawlwren.com. Built by **Crawlwren**.

# Actor input Schema

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

Keep opportunities whose title, description or solicitation number contains ANY of these (case-insensitive). Empty = all. (Descriptions are only available in keyless mode; API mode matches the title.)

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

Which notice types to include.

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

Use 1 with a daily schedule for a 'new opportunities' feed.

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

Prefix match, e.g. 5415 (computer systems design) or 541512.

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

Prefix match, e.g. D3 or DA01.

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

e.g. SBA (small business), 8A, HZC (HUBZone), SDVOSBC, WOSB, EDWOSB, VSA. Empty = any, including none.

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

Two-letter codes, e.g. VA, MD, DC, CA.

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

Text match against department / sub-tier / office, e.g. 'VETERANS AFFAIRS', 'NAVY', 'GSA'.

## `onlyOpenDeadlines` (type: `boolean`):

Drops notices whose response deadline is already in the past. Notices without a deadline are kept.

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

Newest first. 0 = no limit. You are only charged per opportunity delivered.

## `apiKey` (type: `string`):

Optional. Your own free public API key from sam.gov > Profile > Account Details. Without a key the actor uses SAM.gov's official daily public extract (refreshed once a day). With a key it queries the live API (note SAM.gov limits keys of accounts without a role to 10 requests/day).

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

auto = live API if a key is given, otherwise the daily extract.

## `maxApiRequests` (type: `integer`):

API mode only. Each request returns up to 1,000 notices and uses 1 of your daily SAM.gov quota.

## `fallbackToBulk` (type: `boolean`):

E.g. when your daily API quota is used up.

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

Daily-extract mode only.

## `onlyActive` (type: `boolean`):

SAM.gov marks archived notices as inactive.

## `includeContacts` (type: `boolean`):

Off by default. When on, adds the contracting contacts published in each notice (names, emails, phones). Only enable if you have a lawful basis to process this personal data, and do not use it for bulk unsolicited marketing.

## Actor input object example

```json
{
  "keywords": [
    "software",
    "cloud",
    "cybersecurity"
  ],
  "noticeTypes": [
    "o",
    "k",
    "p",
    "r"
  ],
  "postedWithinDays": 7,
  "onlyOpenDeadlines": true,
  "maxResults": 500,
  "mode": "auto",
  "maxApiRequests": 5,
  "fallbackToBulk": true,
  "includeDescription": true,
  "onlyActive": true,
  "includeContacts": false
}
```

# Actor output Schema

## `results` (type: `string`):

Normalised US federal contract opportunities from SAM.gov, one row per notice, each with its licence.

## `runStats` (type: `string`):

JSON summary of the run: results delivered, items filtered, request success per source, skipped sources and any errors.

# 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": [
        "software",
        "cloud",
        "cybersecurity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlwren/sam-gov-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": [
        "software",
        "cloud",
        "cybersecurity",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlwren/sam-gov-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/mORyYk1SDc5XNdaQ4/builds/uhIL0dO1NwHZqJl6R/openapi.json
