# SAM.gov Scraper - Government Contracts, USAspending, Grants (`kalilfagundes.w/govcon-contracts-scraper`) Actor

\[Limited Launch Offer $2/1K] Federal contract opportunities with contracting officer contacts, USAspending.gov awards and Grants.gov funding in one run. Filter by NAICS, set-aside, state. No API key.

- **URL**: https://apify.com/kalilfagundes.w/govcon-contracts-scraper.md
- **Developed by:** [Scrape With Me](https://apify.com/kalilfagundes.w) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.70 / 1,000 sam.gov opportunities

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Government Contracts Scraper - SAM.gov, USAspending & Grants.gov

Find **US federal contract opportunities on SAM.gov** (with contracting officer contacts and attachments), **past
contract awards from USAspending.gov** (who won, how much, which agency) and **federal grants from Grants.gov** - with the
same keywords and filters, in one run and one clean schema. No API key, no SAM.gov account. Export to JSON, CSV or Excel,
schedule it daily, or call it as an API.

### What you get

- **SAM.gov opportunities**: title, notice type (solicitation, presolicitation, sources sought, award notice...),
  solicitation number, agency / sub-agency / office, posted and updated dates, **response deadline**, set-aside, NAICS,
  PSC, place of performance, **contacts (name, email, phone)**, full description, **attachment download links**, and the
  awardee + amount on award notices.
- **USAspending.gov awards**: Award ID, recipient (name, UEI, link), amount, outlays, awarding and funding agency,
  period of performance, award type, NAICS and PSC with descriptions, place of performance - largest awards first.
- **Grants.gov opportunities**: number, title, agency, status (forecasted/posted/closed), dates, award ceiling and floor,
  estimated funding, number of awards, eligible applicants, eligibility details, description, agency contact.

### Why this scraper

- **Three official sources, one run, one schema** - competitors cover one site each.
- **Lead-ready SAM.gov rows**: contracting officer emails and phones plus attachment links.
- **No API key** needed and no rate-limit setup. Fast, no browser.
- Filters that matter to BD teams: NAICS, set-asides (SBA, 8(a), WOSB, SDVOSB, HUBZone), states, notice types,
  updated-since and deadline windows, award amount, agencies and recipients.

### Use cases

- Daily bid alerts for your NAICS codes and set-asides (schedule it and send the dataset to Slack, email or a CRM).
- Competitor and market research: who wins contracts in your niche, for how much, from which agencies.
- Teaming and subcontracting leads from award notices and USAspending recipients.
- Grant prospecting for nonprofits, universities and startups.

### Input example

```json
{
  "keywords": ["cybersecurity", "cloud migration"],
  "sources": ["sam", "usaspending", "grants"],
  "naicsCodes": ["541512"],
  "states": ["VA", "MD"],
  "samSetAsides": ["SBA"],
  "responseDeadlineAfter": "2026-10-20",
  "awardTypes": ["contracts"],
  "awardStartDate": "2025-01-01",
  "maxResultsPerSource": 100
}
```

### Output example

```json
[
  {
    "type": "opportunity",
    "source": "sam.gov",
    "id": "351fd0d0842f411fadbe22471214399a",
    "url": "https://sam.gov/opp/351fd0d0842f411fadbe22471214399a/view",
    "title": "INDUSTRY DAY:  Fort Carson Equipment Concentration Site - Construction Management at Risk using Other Transaction Authority (CM@Risk w/OTA)",
    "noticeType": "Special Notice",
    "solicitationNumber": "W912QR-IndustryDay-FortCarsonECS-CMARwithOTA",
    "agency": "DEPT OF DEFENSE",
    "subAgency": "DEPT OF THE ARMY",
    "office": "W072 ENDIST LOUISVILLE",
    "postedDate": "2026-10-13T21:29:50+00:00",
    "updatedDate": "2026-10-13T21:29:50+00:00",
    "responseDeadline": "2026-10-06T15:00:00+00:00",
    "isActive": true,
    "isCanceled": false,
    "setAside": null,
    "naicsCodes": [
      "236220"
    ],
    "pscCode": "Y1AZ",
    "placeCity": "Colorado Springs",
    "placeState": "CO",
    "placeZip": "80913",
    "placeCountry": "USA",
    "contactName": "Chris Brackett",
    "contactEmail": "Christopher.brackett@usace.army.mil",
    "contactPhone": "5023156666",
    "contacts": [
      {
        "name": "Chris Brackett",
        "email": "Christopher.brackett@usace.army.mil",
        "phone": "5023156666",
        "type": "primary"
      }
    ],
    "awardee": null,
    "awardeeUei": null,
    "awardAmount": null,
    "awardDate": null,
    "description": "*** 13 October 2026 UPDATE ***: Formal Request for Qualifications has been issued under Notice ID: W912QR279A001. The RFQ was issued 13 October. Responses are currently due 28 October. See RFQ posting for additional deta…",
    "attachments": [
      {
        "name": "261006 - ECS Industry Day - RMA.pptx",
        "url": "https://sam.gov/api/prod/opps/v3/opportunities/resources/files/d16754412f35485ea6d1320fea94aac8/download",
        "postedDate": "2026-10-08T11:28:41.445+00:00"
      }
    ],
    "rank": 1,
    "input": "cybersecurity",
    "scrapedAt": "2026-10-13T21:32:03Z"
  },
  {
    "type": "award",
    "source": "usaspending.gov",
    "id": "FA862118F6251",
    "awardKind": "contracts",
    "url": "https://www.usaspending.gov/award/CONT_AWD_FA862118F6251_9700_FA862115D6276_9700",
    "title": "IGF::OT::IGF  AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
    "description": "IGF::OT::IGF  AFSOC ACTS AWARD OF CONTRACT FOR CLS, ENGINEERING, INSTRUCTION, CYBERSECURITY, DMO",
    "recipient": "LOCKHEED MARTIN CORPORATION",
    "recipientUei": "KDT2YLB34NT6",
    "recipientUrl": "https://www.usaspending.gov/recipient/ea75ddee-2d00-ac7f-5e72-6f42d7c88c8c-C/latest",
    "awardAmount": 666315748.84,
    "totalOutlays": 242708.65,
    "agency": "Department of Defense",
    "subAgency": "Department of the Air Force",
    "fundingAgency": "Department of Defense",
    "startDate": "2018-02-08",
    "endDate": "2027-01-31",
    "awardType": "DELIVERY ORDER",
    "naicsCodes": [
      "336413"
    ],
    "naicsDescription": "OTHER AIRCRAFT PARTS AND AUXILIARY EQUIPMENT MANUFACTURING",
    "pscCode": "J069",
    "pscDescription": "MAINT/REPAIR/REBUILD OF EQUIPMENT- TRAINING AIDS AND DEVICES",
    "assistanceListings": [],
    "placeState": "FL",
    "placeCountry": "USA",
    "updatedDate": "2026-06-15 07:29:54",
    "rank": 1,
    "input": "cybersecurity",
    "scrapedAt": "2026-10-13T21:32:03Z"
  },
  {
    "type": "grant",
    "source": "grants.gov",
    "id": "26-503",
    "grantsGovId": "361238",
    "url": "https://www.grants.gov/search-results-detail/361238",
    "title": "Artificial Intelligence and Cybersecurity Education Innovation and Scholarship for Service (CyberAI SFS)",
    "agency": "U.S. National Science Foundation",
    "agencyCode": "NSF",
    "status": "posted",
    "postedDate": "2026-02-04",
    "closeDate": "2027-04-05",
    "estimatedAwardDate": null,
    "assistanceListings": [
      "47.076"
    ],
    "awardCeiling": 2500000,
    "awardFloor": 300000,
    "estimatedFunding": 2500000,
    "expectedAwards": 25,
    "costSharing": false,
    "fundingInstruments": [
      "Grant"
    ],
    "categories": [
      "Science and Technology and other Research and Development"
    ],
    "eligibleApplicants": [
      "Others (see text field entitled \"Additional Information on Eligibility\" for clarification)"
    ],
    "eligibilityDetails": "*Who May Submit Proposals: Proposals may only be submitted by the following:\n -For the Scholarship Track:\n\nInstitutions of Higher Education (IHEs) accredited in, and having a campus located in the US, acting on behalf of…",
    "description": "Government and the nation face a talent shortfall in artificial intelligence (AI) and cybersecurity. The CyberAICorps Scholarship for Service (CyberAI SFS) program welcomes proposals that address AI and cybersecurity edu…",
    "contactName": "U.S. National Science Foundation",
    "contactEmail": "grantsgovsupport@nsf.gov",
    "contactPhone": "703-292-4203",
    "moreInfoUrl": "http://www.nsf.gov/publications/pub_summ.jsp?ods_key=nsf26503",
    "rank": 1,
    "input": "cybersecurity",
    "scrapedAt": "2026-10-13T21:32:03Z"
  }
]
```

Every row has `type` (`opportunity`, `award` or `grant`), `source`, the `input` keyword and `scrapedAt`. The OUTPUT record
lists, per keyword and source, how many results exist in total.

### Run it on a schedule and connect it to your tools

**Schedule:** in Apify Console open *Schedules → Create*, pick this actor and your input, and set it to run
each weekday at 07:00 (your time zone) for a current procurement and funding dataset. Each run returns the full, current result set as a new dataset.

**Integrations** (Actor → *Integrations* tab, no code):

- **Google Sheets** — append every run's rows to a sheet.
- **Make, Zapier, n8n** — start the actor from a scenario/zap/workflow and use the rows in the next steps.
- **Webhook** — get a POST to your endpoint when a run succeeds, then download the dataset.
- **Slack / email** — notify your team when a scheduled run finishes.

**AI agents (MCP)** — Claude, ChatGPT, Cursor, VS Code or any MCP client can run it as a tool: add the Apify MCP
server `https://mcp.apify.com?actors=kalilfagundes.w/govcon-contracts-scraper` (sign in with your Apify account) and ask for the data in
plain language. The agent fills the input from the input schema and reads the dataset back.

**API** — call it from your code (`pip install apify-client` / `npm i apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("kalilfagundes.w/govcon-contracts-scraper").call(run_input={
    "keywords": [
        "janitorial services",
        "cloud migration"
    ],
    "naicsCodes": [
        "561720",
        "541512"
    ],
    "states": [
        "VA",
        "TX"
    ],
    "samSetAsides": [
        "SBA"
    ],
    "awardTypes": [
        "contracts",
        "idvs"
    ],
    "awardStartDate": "2025-01-01",
    "maxResultsPerSource": 30,
    "maxItems": 400
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('kalilfagundes.w/govcon-contracts-scraper').call({
  "keywords": [
    "janitorial services",
    "cloud migration"
  ],
  "naicsCodes": [
    "561720",
    "541512"
  ],
  "states": [
    "VA",
    "TX"
  ],
  "samSetAsides": [
    "SBA"
  ],
  "awardTypes": [
    "contracts",
    "idvs"
  ],
  "awardStartDate": "2025-01-01",
  "maxResultsPerSource": 30,
  "maxItems": 400
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Related actors

- [Indeed & LinkedIn Jobs Scraper - Glassdoor, Naukri, Bayt](https://apify.com/kalilfagundes.w/job-boards-scraper)
- [Reclame Aqui Scraper - Company Reputation & Complaints](https://apify.com/kalilfagundes.w/reclame-aqui-scraper)
- [Zap Imóveis, VivaReal & QuintoAndar Scraper - Imóveis Brasil](https://apify.com/kalilfagundes.w/imoveis-brasil-scraper)

### Pricing

Pay only for the rows you get (launch offer, lower on higher Apify plans):

| Row | Price |
|---|---|
| SAM.gov opportunity (with contacts and attachments) | $2 per 1,000 |
| USAspending.gov award | $1 per 1,000 |
| Grants.gov opportunity (with details) | $1.50 per 1,000 |
| Run start | $0.002 |

Example: a daily run returning 50 SAM.gov notices costs about $0.10 per run.

### Limits and FAQ

- SAM.gov returns at most 10,000 notices per search; narrow with filters for more precise alerts.
- NAICS, state and set-aside filters apply to SAM.gov (and NAICS/state to USAspending); Grants.gov is searched by keyword
  and status.
- Data comes from the official public endpoints and is as current as those sites.
- Contacts are the public points of contact published on each notice.

Questions or a missing field? Open an issue on the Issues tab - feedback is answered quickly.

# Actor input Schema

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

Each keyword is searched in every source (e.g. "cybersecurity", "janitorial services").

## `sources` (type: `array`):

Where to search.

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

Industry codes, e.g. 541512 (SAM.gov and USAspending).

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

Two-letter state codes, e.g. VA, TX (SAM.gov and USAspending).

## `maxResultsPerSource` (type: `integer`):

Maximum rows per keyword from each source.

## `samNoticeTypes` (type: `array`):

Leave empty for all notice types.

## `samSetAsides` (type: `array`):

SAM set-aside codes, e.g. SBA (small business), 8A, WOSB, EDWOSB, SDVOSBC, HZC (HUBZone), VSA.

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

Off = include archived/inactive notices too.

## `updatedSince` (type: `string`):

YYYY-MM-DD. Only notices posted or modified since this date.

## `responseDeadlineAfter` (type: `string`):

YYYY-MM-DD. Only notices still open after this date.

## `samDetails` (type: `boolean`):

Open every notice for contacts (name, email, phone), NAICS, PSC, set-aside, place of performance, full description and attachment links.

## `awardTypes` (type: `array`):

Which awards to search (largest first).

## `awardStartDate` (type: `string`):

YYYY-MM-DD (default: 2008-10-01, the oldest USAspending data).

## `awardEndDate` (type: `string`):

YYYY-MM-DD (default: today).

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

Only awards of at least this amount.

## `awardingAgencies` (type: `array`):

Exact top-tier agency names, e.g. "Department of Defense".

## `recipients` (type: `array`):

Company names or UEIs, e.g. "Lockheed Martin".

## `grantStatuses` (type: `array`):

Which grant opportunities.

## `grantDetails` (type: `boolean`):

Award ceiling/floor, estimated funding, eligibility, description and contact for every grant.

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

Stop after this many rows. 0 = no limit.

## Actor input object example

```json
{
  "keywords": [
    "cybersecurity"
  ],
  "sources": [
    "sam",
    "usaspending",
    "grants"
  ],
  "maxResultsPerSource": 20,
  "activeOnly": true,
  "samDetails": true,
  "awardTypes": [
    "contracts"
  ],
  "grantStatuses": [
    "forecasted",
    "posted"
  ],
  "grantDetails": true,
  "maxItems": 1000
}
```

# Actor output Schema

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

No description

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

OUTPUT record: per keyword and source, rows saved, total available and 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": [
        "cybersecurity"
    ],
    "maxResultsPerSource": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("kalilfagundes.w/govcon-contracts-scraper").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"],
    "maxResultsPerSource": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("kalilfagundes.w/govcon-contracts-scraper").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"
  ],
  "maxResultsPerSource": 20
}' |
apify call kalilfagundes.w/govcon-contracts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kalilfagundes.w/govcon-contracts-scraper"
        }
    }
}
```

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/AA5qeHArZt66sut7k/builds/8doyf24VaHhqKq38U/openapi.json
