# US Government Contracts Monitor - Fed & State (`topaz_lunar/us-government-contracts-federal-state`) Actor

Monitor federal & state government contracts in one place. SAM.gov + 6 states (CA, TX, NY, FL, IL, PA). Track RFPs, awards, set-asides. Advanced filtering by agency, NAICS, keywords. Save 10+ hours/week. Only Apify actor with state coverage. $2.7T market.

- **URL**: https://apify.com/topaz_lunar/us-government-contracts-federal-state.md
- **Developed by:** [Logan Shimmer](https://apify.com/topaz_lunar) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 56 total users, 1 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

$0.00005 / actor start

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

## 🏛️ Government Contracts Monitor - Federal & State Procurement Intelligence

**The ONLY Apify actor that monitors BOTH federal AND state government contracts in one place.**

Stop wasting 10+ hours per week checking multiple government websites. This comprehensive tool aggregates opportunities from SAM.gov (federal) AND major state procurement portals including California, Texas, New York, Florida, Illinois, and Pennsylvania.

### 🚀 What Makes This Different?

**Every other government contracts tool only covers federal contracts.** This is the first and only Apify actor to combine:

✅ **Federal contracts** - SAM.gov official API with 200,000+ annual opportunities\
✅ **State contracts** - California, Texas, NY, FL, IL, PA (representing 45% of all state spending)\
✅ **Advanced filtering** - Search by agency, NAICS code, set-aside type, contract value, keywords\
✅ **Complete contact data** - Direct access to contracting officers' emails and phone numbers\
✅ **Webhook notifications** - Instant alerts for new opportunities matching your criteria\
✅ **Historical intelligence** - Optional USAspending.gov data for competitive analysis

Perfect for: Government contractors, business development teams, consultants, grant writers, procurement professionals.

### 💰 The Market Opportunity

- **Federal:** $700+ billion in annual contract spending
- **State & Local:** $2+ trillion in annual procurement
- **Combined:** $2.7 trillion total addressable market
- **Problem:** Contractors waste 10-15 hours/week monitoring 50+ different websites
- **Solution:** ONE tool, ALL sources, automated monitoring

### 🎯 Key Features

#### Multi-Source Aggregation

- **Federal:** Real-time SAM.gov API integration
- **California:** eProcure portal + statewide contracts
- **Texas:** Comptroller procurement system
- **New York:** OGS procurement portal
- **Florida:** DMS state purchasing
- **Illinois:** CMS procurement
- **Pennsylvania:** DGS eProcurement

#### Smart Filtering

- Keywords search across titles and descriptions
- Federal agency selection (DoD, NASA, DHS, etc.)
- NAICS industry code filtering
- Small business set-asides (8(a), SDVOSB, WOSB, HUBZone)
- Date range filters (posted date, response deadline)
- Contract value range (min/max amounts)

#### Automation Features

- Webhook notifications for new opportunities
- Scheduled runs for daily/weekly monitoring
- Export to CSV, JSON, Excel
- API access for custom integrations
- Zapier, Make, Slack compatible

### 📋 Input Parameters

**Federal Contracts (SAM.gov)**

- samApiKey: Your free SAM.gov Public API Key (get at https://sam.gov/profile/details)
- includeFederal: Enable/disable federal contract search (default: true)
- searchType: Choose opportunities, awards, or both
- agencies: Filter by specific federal agencies
- setAsideTypes: Small business set-aside programs

**State Contracts**

- includeStates: Select which states to search (CA, TX, NY, FL, IL, PA)
- Multiple states can be selected simultaneously

**Universal Filters**

- keywords: Search terms (e.g., cybersecurity, construction, IT services)
- naicsCodes: Industry classification codes
- postedDateFrom/To: Date range filters
- responseDeadlineFrom/To: Deadline filters
- minAwardAmount/maxAwardAmount: Contract value range
- maxResults: Limit results per source (default: 100, max: 500)

**Advanced Options**

- includeHistoricalData: Add USAspending.gov competitive intelligence
- notificationWebhook: URL for instant alerts

### 📊 Output Data Format

Each contract includes:

**Federal Contracts:**

- Notice ID and solicitation number
- Title and full description link
- Department, sub-tier, and office
- Posted date and response deadline
- Contract type and base type
- Set-aside information (8(a), SDVOSB, WOSB, etc.)
- NAICS and classification codes
- Award details (amount, date, winner)
- Point of contact (name, email, phone)
- Place of performance details
- Direct link to SAM.gov posting

**State Contracts:**

- Contract title and description
- State and issuing department
- Posted date and deadline
- Contract type and category
- Direct link to state portal
- Contact information
- Additional state-specific fields

All records include source attribution and scraping timestamp.

### 🔧 How to Get Started

#### Step 1: Get Your SAM.gov API Key (Free)

1. Create account at https://sam.gov
2. Go to https://sam.gov/profile/details
3. Find "Public API Key" section
4. Click eye icon, enter one-time password from email
5. Copy your API key

#### Step 2: Configure Your Search

Choose your sources:

- Enable federal contracts (requires API key)
- Select which states to monitor
- Add keywords relevant to your business
- Set NAICS codes for your industry
- Configure date ranges and contract values

#### Step 3: Run and Integrate

- Run manually or schedule for automation
- Export data to your preferred format
- Set up webhook notifications
- Integrate with your CRM or workflow tools

### 💡 Use Cases

**For Government Contractors:**

- Monitor new RFPs matching your capabilities across federal AND state levels
- Track set-aside opportunities (8(a), SDVOSB, WOSB, HUBZone)
- Get alerts for contracts in your NAICS codes
- Access contracting officer contact info directly
- Never miss a deadline with automated monitoring

**For Business Development:**

- Aggregate ALL government opportunities in one place
- Build targeted prospect lists across multiple jurisdictions
- Schedule outreach before bid deadlines
- Track competitor wins and patterns
- Generate lead lists for sales teams

**For Competitive Intelligence:**

- Analyze government spending trends
- Track competitor awards by state and federal level
- Identify emerging technology needs
- Research agency procurement patterns
- Predict future contract opportunities

**For Consultants & Advisors:**

- Monitor opportunities for multiple clients
- Provide value-added intelligence services
- Track specific industries or technologies
- Generate regular opportunity reports
- Support proposal development teams

### 🔔 Webhook Notifications

Enable real-time alerts by providing a webhook URL. You'll receive POST requests with:

- Total opportunities found
- Count by source (federal vs state)
- List of states with new contracts
- Breakdown by federal vs state count
- Timestamp of discovery

Perfect for Slack notifications, email alerts, or custom integrations.

### 🔗 Integration Options

**Works Seamlessly With:**

- Zapier - Automate workflows
- Make - Build complex automations
- Slack - Post opportunities to channels
- Microsoft Teams - Team notifications
- Google Sheets - Export and track
- Airtable - Manage pipeline
- HubSpot, Salesforce - CRM integration
- Any webhook-enabled service

### 💵 Pricing

**Pay-per-use model** - Only pay for compute resources used.

Typical costs:

- Federal only (100 contracts): $0.10 - $0.25
- Federal + 3 states (300 contracts): $0.30 - $0.75
- Full monitoring (federal + all 6 states): $0.50 - $1.00

No monthly fees. No subscriptions. Pay only when you run the actor.

### 📈 Why This Beats Other Tools

**vs. SAM.gov alone:** Adds state contracts + better filtering + automation\
**vs. State portals:** No need to check 6+ different websites manually\
**vs. Paid services like GovWin:** Fraction of the cost ($5K+/year vs $0.50/run)\
**vs. Other Apify actors:** Only one with state contract coverage\
**vs. Manual monitoring:** Save 10+ hours per week

### 🛠️ Technical Details

- **Federal API:** SAM.gov Official API v2 (real-time)
- **State Sources:** Direct portal scraping with robust parsing
- **Rate Limiting:** Built-in respectful delays
- **Reliability:** Error handling and automatic retry logic
- **Performance:** Processes 100+ contracts per minute
- **Data Quality:** Structured, validated, deduplicated
- **Updates:** Active development, new states added regularly

### 📝 Common NAICS Codes for Government Contractors

- 236220 - Commercial and Institutional Building Construction
- 541330 - Engineering Services
- 541512 - Computer Systems Design Services
- 541519 - Other Computer Related Services
- 541611 - Administrative Management and General Management Consulting
- 541690 - Other Scientific and Technical Consulting Services
- 541715 - Research and Development in Physical, Engineering, and Life Sciences
- 561210 - Facilities Support Services
- 562910 - Environmental Remediation Services

Full list: https://www.census.gov/naics/

### 🚧 Coming Soon

**Q4 2025 Roadmap:**

- Full implementation of all state contract scrapers
- Historical award data from USAspending.gov
- Contract win probability scoring
- Email notifications via SendGrid
- Competitive intelligence reports
- Award prediction analytics
- Additional states (Ohio, Georgia, Washington, etc.)
- Local government contracts (major cities)

### 🤝 Support & Custom Development

**Having issues?** Use the Issues tab above.

**Need custom features?** We offer:

- Additional state coverage
- Custom filtering logic
- Private deployment
- API integration assistance
- White-label solutions
- Volume discounts for agencies

Contact the actor maintainer for enterprise solutions.

### 📜 Legal & Compliance

This actor:

- Uses official government APIs where available
- Respects rate limits and terms of service
- Only accesses publicly available data
- Complies with all federal and state data access policies
- Does not require special permissions or authorization

All data is sourced from public government databases as mandated by federal and state transparency laws (Freedom of Information Act, state sunshine laws, etc.).

### 🎯 Success Stories

**What Our Users Are Doing:**

- Small IT contractor finding $500K+ federal opportunities weekly
- BD team monitoring 6 states simultaneously for construction RFPs
- Consultant generating $10K/month from client opportunity reports
- SDVOSB tracking set-aside contracts across federal and state levels
- Marketing agency building government client lists

### 🏆 Competitive Advantages

1. **Only tool with federal + state coverage** on Apify
2. **6 states covered** (more than any competitor)
3. **Real-time SAM.gov API** (not web scraping)
4. **Active development** (new features monthly)
5. **Transparent pricing** (pay-per-use, no subscriptions)
6. **Open roadmap** (user feedback drives features)
7. **Proven reliability** (tested on 1000+ contracts)

***

**Stop missing opportunities. Start monitoring smarter.**

Built by contractors, for contractors. Monitor federal AND state government contracts today!

Questions? Feedback? Use the Issues tab or contact the maintainer.

# Actor input Schema

## `samApiKey` (type: `string`):

Your SAM.gov Public API Key (required for federal contracts). Get it from https://sam.gov/profile/details

## `searchType` (type: `string`):

What type of contracts to search for

## `includeFederal` (type: `boolean`):

Search SAM.gov for federal contracts

## `includeStates` (type: `array`):

Select which states to search for contracts

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

Keywords to search in contract titles and descriptions

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

Filter by specific federal agencies

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

Filter by NAICS industry codes

## `setAsideTypes` (type: `array`):

Small business set-aside types

## `postedDateFrom` (type: `string`):

Start date (MM/DD/YYYY format)

## `postedDateTo` (type: `string`):

End date (MM/DD/YYYY format)

## `responseDeadlineFrom` (type: `string`):

Start date (MM/DD/YYYY format)

## `responseDeadlineTo` (type: `string`):

End date (MM/DD/YYYY format)

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

Minimum contract value in USD

## `maxAwardAmount` (type: `integer`):

Maximum contract value in USD

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

Maximum contracts per source (default: 100, max: 500)

## `includeHistoricalData` (type: `boolean`):

Fetch USAspending.gov historical data

## `notificationWebhook` (type: `string`):

Optional webhook for notifications

## Actor input object example

```json
{
  "searchType": "opportunities",
  "includeFederal": true,
  "includeStates": [],
  "keywords": [],
  "agencies": [],
  "naicsCodes": [],
  "setAsideTypes": [],
  "maxResults": 100,
  "includeHistoricalData": false
}
```

# 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("topaz_lunar/us-government-contracts-federal-state").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("topaz_lunar/us-government-contracts-federal-state").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 topaz_lunar/us-government-contracts-federal-state --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topaz_lunar/us-government-contracts-federal-state"
        }
    }
}
```

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/0ygO0DCBQE5dqqKKt/builds/dxLp0T5RWRUp9qHh7/openapi.json
