# SAM.gov Contract Opportunities — Federal Bids & Alerts (`elegant_economy/sam-gov-contract-opportunities`) Actor

Find US federal contract opportunities on SAM.gov by keyword, NAICS, set-aside (8(a), SDVOSB, WOSB, HUBZone), agency and state. Get deadlines, contracting officer contacts, full descriptions, attachments and award winners. Schedule it for new-bid alerts.

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

## Pricing

$2.00 / 1,000 contract notices

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: Federal Bids & Alerts

Find **US federal government contract opportunities** on SAM.gov and get them as a clean spreadsheet or API feed: solicitations, RFPs, RFQs, sources-sought notices, presolicitations and award notices.

Filter the way government contractors actually search:

- **Keywords** (full-text, `"exact phrase"` supported)
- **NAICS codes**
- **Set-asides**: Total Small Business, 8(a), HUBZone, SDVOSB, WOSB/EDWOSB, VOSB and more
- **Agency** (e.g. Veterans Affairs, Air Force, NASA)
- **Place of performance** state
- **Posted in the last N days**

Each notice comes with its **response deadline and days left**, department, agency and contracting office, NAICS and PSC codes, set-aside, place of performance, **contracting officer contacts (name, email, phone)**, the full description as plain text, optional **attachment download links**, and for award notices the **winning company, UEI, CAGE code and award amount**.

No SAM.gov account or API key needed.

### How do I get a daily list of new federal bids for my company?

1. Enter your **NAICS codes** and/or **keywords**, and your **set-aside** if you qualify for one.
2. Turn on **Only notices not seen in previous runs**.
3. Schedule the actor to run daily (Apify Console → Schedules) and connect the output to email, Slack or Google Sheets.

The first run returns everything that matches; every later run returns only notices that are new since the last run. That's a bid-alert service for about the price of a coffee a month.

### Input example

```json
{
  "keywords": "cybersecurity",
  "notice_types": ["o", "k", "p", "r"],
  "naics_codes": ["541512", "541519"],
  "set_asides": ["SBA", "SDVOSBC"],
  "place_of_performance_states": ["VA", "MD", "DC"],
  "posted_within_days": 7,
  "include_attachments": true
}
```

Notice type codes: `o` Solicitation, `k` Combined Synopsis/Solicitation, `p` Presolicitation, `r` Sources Sought, `s` Special Notice, `a` Award Notice, `u` Justification, `i` Intent to Bundle, `g` Sale of Surplus Property.

### Output example

```json
{
  "notice_id": "50e1fe10e8224551a91f1e87ab65c2d1",
  "url": "https://sam.gov/opp/50e1fe10e8224551a91f1e87ab65c2d1/view",
  "title": "Request for Information: Multi-Source PNT UE",
  "solicitation_number": "MultiSourcePNT_RFI_01",
  "notice_type": "Presolicitation",
  "posted_date": "2026-11-10T21:46:36+00:00",
  "response_deadline": "2026-11-23T14:00:00-07:00",
  "days_until_deadline": 12,
  "department": "DEPT OF DEFENSE",
  "agency": "DEPT OF THE AIR FORCE",
  "office": "FA9453 AFRL RVK",
  "naics_codes": ["541715"],
  "psc_code": "AC12",
  "set_aside": null,
  "place_of_performance": { "city": "Kirtland AFB", "state": "NM", "zip": "87117", "country": "USA" },
  "contacts": [
    { "type": "primary", "name": "Hanna Wardell", "email": "hanna.wardell@spaceforce.mil", "phone": "5058460946" }
  ],
  "award": null,
  "description": "Amendment 2: The purpose of this amendment is to change the response date...",
  "attachments": [
    { "name": "RFI.pdf", "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/.../download", "size_bytes": 264599 }
  ]
}
```

Award notice example (`notice_types: ["a"]`):

```json
"award": {
  "awardee_name": "ODDCORE JV, LLC",
  "awardee_uei": "L8XGVKNCVGW3",
  "awardee_cage": "9Y3Y1",
  "amount": 4388054.84,
  "date": "2026-05-14",
  "contract_number": "36C10B26C0047"
}
```

### Who uses this?

- **Small businesses and 8(a)/SDVOSB/WOSB firms** looking for bids they qualify for
- **GovCon consultants and proposal writers** monitoring opportunities for several clients
- **BD teams** researching which competitors win which contracts (award notices)
- **Sales teams** selling to government contractors: award winners are fresh leads

### How much does it cost?

**$0.002 per notice** ($2 per 1,000), including details, contacts and description. Notices you already received (with only-new mode) are not returned and not charged. Set **Maximum cost per run** in the run options to cap spending.

### Good to know

- Keyword search is SAM.gov's own full-text search, so it also matches words in descriptions and attached clauses. Use quotes for exact phrases and combine with NAICS codes for precise results.
- SAM.gov returns at most the newest 10,000 matches per search. Use **posted in the last N days** or more filters for large searches.
- `days_until_deadline` is negative when the deadline has passed (e.g. an amendment posted after the original deadline).
- Contacts are the official government points of contact that SAM.gov publishes on each notice.

### Is it legal?

SAM.gov contract opportunity data is public US government information, published for anyone to read. The actor reads it at a moderate rate and needs no login.

# Actor input Schema

## `keywords` (type: `string`):

Words to search for in SAM.gov, e.g. cybersecurity, janitorial, "cloud migration" (quotes for an exact phrase). Leave empty to use filters only.

## `notice_types` (type: `array`):

Which kinds of notices to return. Award Notices show who won a contract and for how much.

## `naics_codes` (type: `array`):

Only notices with these NAICS codes (2-6 digits), e.g. 541512 (Computer Systems Design), 561720 (Janitorial).

## `set_asides` (type: `array`):

Only notices reserved for these small-business programs.

## `place_of_performance_states` (type: `array`):

Two-letter state codes, e.g. VA, MD, TX.

## `agency_keywords` (type: `array`):

Keep notices whose department, agency or office name contains one of these words, e.g. "VETERANS", "AIR FORCE", "NASA".

## `posted_within_days` (type: `integer`):

Only notices posted in the last N days. 0 = any date (SAM.gov returns at most the newest 10,000 matches per search).

## `active_only` (type: `boolean`):

Skip archived and inactive notices.

## `only_new` (type: `boolean`):

For scheduled bid alerts: remembers notices already returned for these exact filters and returns only new ones. The first run returns everything that matches.

## `include_details` (type: `boolean`):

Opens each notice for its full details. Turn off for a faster list.

## `include_description` (type: `boolean`):

Adds the notice's description as plain text.

## `include_attachments` (type: `boolean`):

Adds the list of public attachments (solicitation PDFs, SOWs, amendments) with download links.

## `max_results` (type: `integer`):

Stop after this many notices. 0 = no limit.

## `max_concurrency` (type: `integer`):

How many notices to open at once.

## Actor input object example

```json
{
  "keywords": "cybersecurity",
  "notice_types": [
    "o",
    "k",
    "p",
    "r"
  ],
  "naics_codes": [],
  "set_asides": [],
  "place_of_performance_states": [],
  "agency_keywords": [],
  "posted_within_days": 7,
  "active_only": true,
  "only_new": false,
  "include_details": true,
  "include_description": true,
  "include_attachments": false,
  "max_results": 500,
  "max_concurrency": 5
}
```

# Actor output Schema

## `dataset` (type: `string`):

All returned notices

# 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("elegant_economy/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("elegant_economy/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 elegant_economy/sam-gov-contract-opportunities --silent --output-dataset

```

## MCP server setup

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