# SAM.gov Contract Opportunities Scraper: Federal Bids (`scrapemint/sam-gov-contract-opportunities`) Actor

US federal contract opportunities from SAM.gov by keyword, NAICS, set-aside, notice type, state and posted date: deadlines, agency, contracting officer email and phone, place of performance, full description and attachment links. No API key needed.

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

## Pricing

$1.50 / 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 Scraper: Federal Bids

**Every US federal contract opportunity on SAM.gov, as clean rows.** Search by **keyword**, **NAICS code**, **set-aside** (small business, 8(a), HUBZone, SDVOSB, WOSB...), **notice type**, **state** and **posted date**, and get one row per notice:

- **The bid:** title, notice type, solicitation number, posted date, **response deadline**
- **Who is buying:** department, agency, sub-tier, contracting office and its address
- **Classification:** NAICS codes, PSC code, set-aside type
- **Where:** place of performance (city, state, ZIP)
- **Who to talk to:** contracting officer **name, email and phone**
- **Everything else:** full description text, **attachment download links**, and for award notices the **awardee, UEI, amount and contract number**

Set **posted in the last 1 day** and schedule it daily for a feed of new solicitations in your NAICS codes. No SAM.gov API key needed and no 1,000-calls-a-day limit.

### What you get

`noticeId`, `title`, `solicitationNumber`, `noticeType`, `noticeTypeCode`, `postedDate`, `modifiedDate`, `responseDeadline`, `responseTimeZone`, `active`, `cancelled`, `department`, `agency`, `subTier`, `office`, `officeCode`, `officeAddress`, `naicsCodes`, `pscCode`, `setAside`, `setAsideCode`, `placeOfPerformance`, `contacts`, `description`, `attachments`, `award`, `archiveDate`, `parentNoticeId`, `relatedNoticeId`, `url`

### Example input

Small-business software bids in the last week:

```json
{
  "naicsCodes": ["541511", "541512"],
  "setAsides": ["SBA"],
  "postedWithinDays": 7
}
```

Open janitorial bids in Texas and Virginia due in the next 30 days:

```json
{
  "keywords": "janitorial",
  "states": ["TX", "VA"],
  "noticeTypes": ["o", "k"],
  "responseDueWithinDays": 30
}
```

Who won recent janitorial contracts, and for how much:

```json
{
  "keywords": "janitorial",
  "noticeTypes": ["a"],
  "activeOnly": false,
  "maxResults": 500
}
```

### Example output

```json
{
  "noticeId": "4924a9998b8444c3ace265513047df72",
  "title": "SILVAH software coding",
  "solicitationNumber": "12760426Q0195",
  "noticeType": "Sources Sought",
  "postedDate": "2026-10-22T17:26:33+00:00",
  "responseDeadline": "2026-11-11T15:00:00-05:00",
  "department": "AGRICULTURE, DEPARTMENT OF",
  "agency": "FOREST SERVICE",
  "office": "USDA FS WO AQM IT SUPPORT BRANCH",
  "officeAddress": "4000 MASTHEAD NE, ALBUQUERQUE, NM, 87109",
  "naicsCodes": ["541511"],
  "pscCode": "DA01",
  "setAside": "Total Small Business Set-Aside (FAR 19.5)",
  "setAsideCode": "SBA",
  "placeOfPerformance": { "city": "Parsons", "state": "WV", "country": "USA", "text": "Parsons, WV" },
  "contacts": [
    { "type": "primary", "name": "Brandon Newland", "email": "brandon.newland@usda.gov", "phone": null }
  ],
  "description": "The United States Department of Agriculture (USDA) Forest Service (FS) is conducting market research to identify capable sources to repair SILVAH version 8 in C++ code...",
  "attachments": [
    { "name": "RFI_Silvah_12760426Q0195.pdf", "type": "file", "sizeBytes": 172184, "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/b51f1395e56844acbf0a2b1a68453084/download" }
  ],
  "award": null,
  "url": "https://sam.gov/opp/4924a9998b8444c3ace265513047df72/view"
}
```

Award notices fill `award`:

```json
{ "awardee": "SOUTHERN FEDERAL, LLC", "awardeeUei": "TDFJKE6SBJD5", "amount": 213669, "date": "2026-10-16", "contractNumber": "W911SA27PA006" }
```

### Uses

- **Bid pipelines:** daily new solicitations in your NAICS codes and set-asides, straight into a spreadsheet or CRM
- **Sources sought and presolicitations:** get in front of the contracting officer before the RFP drops
- **Competitor research:** who wins awards in your space, at what price, with which agencies
- **Teaming and subcontracting:** find primes that just won work you can support
- **Pair it with** [Government Contract Winner Leads](https://apify.com/scrapemint/government-contract-winner-leads) for award history from USAspending

### 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

### Pricing

- **$0.0015** per notice, contacts and attachments included
- No start fee. A run that finds nothing is free.

Data comes from SAM.gov, the official US government system for federal contract opportunities.

# Actor input Schema

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

Words to search in titles and descriptions, e.g. cybersecurity, janitorial, "cloud migration". Leave empty to list everything that matches the filters.

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

e.g. 541511 (custom programming), 541512 (systems design), 541330 (engineering), 236220 (commercial building), 561720 (janitorial), 541611 (management consulting).

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

Empty = all types. Default: open bids and early-stage notices.

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

Keep only notices reserved for these business types. Empty = any.

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

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

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

0 = any date. Use 1 on a daily schedule for a feed of new and amended notices.

## `responseDueWithinDays` (type: `integer`):

Only notices whose response deadline falls between today and N days from now. 0 = any deadline.

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

Off includes archived and past notices (useful for award history).

## `includeDetails` (type: `boolean`):

Reads each notice: contracting officer name, email and phone, NAICS and PSC codes, set-aside, place of performance, full description, attachment links and award details. Off = search fields only, faster.

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

Newest first. SAM.gov returns up to 10,000 per search.

## Actor input object example

```json
{
  "keywords": "software",
  "noticeTypes": [
    "o",
    "k",
    "p",
    "r"
  ],
  "setAsides": [],
  "postedWithinDays": 0,
  "responseDueWithinDays": 0,
  "activeOnly": true,
  "includeDetails": true,
  "maxResults": 200
}
```

# Actor output Schema

## `notices` (type: `string`):

Title, notice type, solicitation number, agency, deadline, NAICS, set-aside, place of performance, contacts, description, attachments and award.

## `summary` (type: `string`):

Matching notices, rows written and the search 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 = {
    "keywords": "software"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/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": "software" }

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

```

## MCP server setup

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