# SAM.gov Contract Opportunities (Reliable, No API Key) (`daniel746/samgov-opportunities-reliable`) Actor

Search current U.S. federal contract opportunities from SAM.gov by keyword, NAICS, set-aside, state and posted date. Built on the official public daily extract, so it never hits SAM.gov API rate limits.

- **URL**: https://apify.com/daniel746/samgov-opportunities-reliable.md
- **Developed by:** [Daniel Mester](https://apify.com/daniel746) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Contract Opportunities (Reliable, No API Key)

Search current U.S. federal contract opportunities from SAM.gov by keyword, NAICS code, set-aside, state and posted date.

### Why this Actor

- **No SAM.gov API key and no rate limits.** It reads the official public daily Contract Opportunities extract that SAM.gov publishes, instead of the public API, which allows about 10 requests a day on a basic key.
- **Fast.** A full scan of roughly 75,000 notices takes about 15 seconds.
- **Agent-ready.** Simple flat input, one clean JSON item per opportunity, and low pay-per-event pricing.

### Input

| Field | Example | Notes |
|---|---|---|
| keyword | cybersecurity | Matched in title and description, case-insensitive |
| naics | 5415 | Full code or prefix |
| state | VA | Place-of-performance state |
| setAside | SDVOSB | Matched in set-aside code and description |
| postedWithinDays | 30 | 0 turns the date filter off |
| activeOnly | true | Only active notices |
| maxResults | 100 | Each result is one billable event |
| includeContacts | false | Adds the published government point-of-contact fields |

### Output (one item per opportunity)

`noticeId, title, solicitationNumber, department, subTier, office, postedDate, type, setAside, setAsideCode, responseDeadline, naicsCode, classificationCode, placeOfPerformance {city, state, zip, country}, active, award {number, date, amount, awardee}, link, description`

A run summary (rows scanned, results pushed, filters) is saved in the key-value store as `RUN_SUMMARY`.

### Data freshness

SAM.gov refreshes the extract once a day, at about 03:30 UTC. Notices posted after the latest refresh appear on the following day.

### Pricing

Pay per event:

- **$0.001 per opportunity returned.** You pay only for results the Actor pushes to the dataset, capped by `maxResults`.
- **$0.005 per run start.** This covers each run, whether or not it finds matches.

Example: a run that returns 100 opportunities costs about $0.105.

### Notes

- Data comes from the public SAM.gov extract published via data.gov. This Actor is not affiliated with GSA or SAM.gov.
- Contact fields are government-published points of contact. They are excluded unless `includeContacts` is turned on.

# Actor input Schema

## `keyword` (type: `string`):

Case-insensitive text matched against the title and description.

## `naics` (type: `string`):

Full or partial NAICS code, e.g. 5415 or 541512.

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

Two-letter U.S. state code, e.g. VA.

## `setAside` (type: `string`):

Matched against set-aside code and description, e.g. SBA, 8(a), WOSB, SDVOSB.

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

0 means no date filter.

## `activeOnly` (type: `boolean`):

Return only opportunities SAM.gov marks as active. Turn off to include inactive and archived notices.

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

Each result is one billable event.

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

Adds the published government point-of-contact fields. Off by default.

## Actor input object example

```json
{
  "postedWithinDays": 30,
  "activeOnly": true,
  "maxResults": 100,
  "includeContacts": false
}
```

# Actor output Schema

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

Dataset items, one per matching SAM.gov notice: notice ID, title, agency, dates, NAICS, set-aside, place of performance, award details, link and description.

## `runSummary` (type: `string`):

RUN_SUMMARY record with rows scanned, results pushed and the filters used.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("daniel746/samgov-opportunities-reliable").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("daniel746/samgov-opportunities-reliable").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 '{}' |
apify call daniel746/samgov-opportunities-reliable --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,daniel746/samgov-opportunities-reliable"
        }
    }
}
```

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/IH75GzyFu6ffVFCot/builds/6IqqiHZnc2O4Je6tY/openapi.json
