# SAM.gov Contract Opportunities (`dash_authority/sam-gov-opportunities`) Actor

Search federal contract opportunities from the SAM.gov API. Filter by keyword, agency, NAICS code, state, set-aside type, and posting dates. Categories: government contracts, procurement, federal opportunities, SAM.gov.

- **URL**: https://apify.com/dash\_authority/sam-gov-opportunities.md
- **Developed by:** [Dash Authority](https://apify.com/dash_authority) (community)
- **Categories:** Lead generation, Developer tools, Other
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SAM.gov Contract Opportunities

Search active federal contract opportunities from the SAM.gov API. Find government solicitations filtered by keyword, agency, NAICS code, state, set-aside type, and posting date range.

### Features

- Search all active federal contract opportunities on SAM.gov
- Filter by keyword, NAICS code, state, agency name
- Filter by small business set-aside types (SBA, SBP, WOSB, HUBZone, SDVOSB, 8A)
- Filter by posting date range
- Returns full solicitation details including descriptions and response deadlines
- Free API key required from sam.gov

### Use Cases

- **Government Contractors**: Discover new contract opportunities that match your company's capabilities and NAICS codes. Filter by set-aside type if you're a small business.
- **Market Research**: Analyze federal procurement trends by agency, state, or industry to identify where government spending is headed.
- **Bid/No-Bid Decisions**: Quickly triage new opportunities by keyword and response deadline to decide which RFPs are worth pursuing.
- **Daily Opportunity Monitoring**: Run this actor on a schedule to get alerts whenever new contracts matching your criteria are posted.
- **Competitive Intelligence**: Track which agencies are issuing contracts in your space and what set-asides they're using.

### Input

| Field      | Type   | Description                                                     | Default |
|------------|--------|-----------------------------------------------------------------|---------|
| api_key    | string | **Required.** Your SAM.gov API key                              | —       |
| keyword    | string | Search keyword for contract opportunities                       | —       |
| naicsCode  | string | NAICS industry code filter (e.g. 541512 for IT consulting)      | —       |
| state      | string | 2-letter US state code (e.g. CA, TX)                            | —       |
| agency     | string | Contracting agency name                                         | —       |
| setAside   | string | Set-aside type: SBA, SBP, WOSB, HUBZone, SDVOSB, 8A           | —       |
| postedFrom | string | Start date filter (MM/dd/yyyy)                                  | —       |
| postedTo   | string | End date filter (MM/dd/yyyy)                                    | —       |
| limit      | number | Maximum results to return                                       | 100     |

### Output

Example result:

````

{
"title": "Enterprise Cloud Infrastructure Services",
"solicitationNumber": "FA8732-25-R-0012",
"department": "Department of Defense",
"subTier": "Department of the Air Force",
"office": "Hanscom AFB",
"postedDate": "01/15/2025",
"type": "Solicitation",
"baseType": "Solicitation",
"archiveDate": "02/28/2025",
"setAsideCode": "SBA",
"setAside": "Total Small Business Set-Aside",
"responseDeadline": "02/14/2025",
"naicsCode": "518210",
"classificationCode": "D302 - IT and Telecom: IT Support",
"description": "The Air Force seeks proposals for enterprise cloud infrastructure migration and managed services across three CONUS locations...",
"organizationType": "U.S. Federal Government",
"state": "MA",
"city": "Hanscom AFB",
"zip": "01731",
"countryCode": "USA",
"links": \[
"https://sam.gov/opp/abc123/view"
]
}

````

| Field               | Type   | Description                                           |
|---------------------|--------|-------------------------------------------------------|
| title               | string | Solicitation title                                    |
| solicitationNumber  | string | Official solicitation number                          |
| department          | string | Parent department                                     |
| subTier             | string | Sub-tier agency                                       |
| office              | string | Issuing office                                        |
| postedDate          | string | Date posted (MM/dd/yyyy)                              |
| type                | string | Opportunity type                                      |
| baseType            | string | Base opportunity type                                 |
| archiveDate         | string | Archive/expiry date                                   |
| setAsideCode        | string | Set-aside code                                        |
| setAside            | string | Set-aside description                                 |
| responseDeadline    | string | Proposal submission deadline                          |
| naicsCode           | string | NAICS industry code                                   |
| classificationCode  | string | Product/service classification code                   |
| description         | string | Full solicitation description                         |
| organizationType    | string | Issuing organization type                             |
| state               | string | State of the issuing office                           |
| city                | string | City of the issuing office                            |
| zip                 | string | ZIP code                                              |
| countryCode         | string | Country code                                          |
| links               | array  | Array of related SAM.gov URLs                         |

### Pricing

$2.00 per 1,000 results ($0.002 per result).

### How It Works

This actor queries the SAM.gov Opportunities API v2 via direct HTTP requests. No browser or scraping involved. A free API key is required — you can get one instantly by registering at sam.gov. The API returns all active federal contract solicitations matching your filters.

### FAQ

**Where do I get an API key?**
Register at https://sam.gov — it's free. After registration, request an API key from your account settings. Approval is typically instant.

**What types of opportunities are included?**
All active federal contract solicitations: RFPs, RFQs, sources sought notices, and award announcements. Grant opportunities are available through a separate SAM.gov API.

**What set-aside types can I filter by?**
SBA (Small Business), SBP (Small Business Participation), WOSB (Women-Owned Small Business), HUBZone, SDVOSB (Service-Disabled Veteran-Owned), and 8A (8(a) Business Development).

**How current is the data?**
The API reflects real-time SAM.gov data. New postings appear as soon as they are published by the contracting agency.

### Limits & Rate Limits

- Maximum 1,000 results per query
- SAM.gov API enforces rate limits — approximately 10 requests per minute per API key
- Date filters must use MM/dd/yyyy format (not ISO 8601)
- At least one search parameter is recommended to avoid overly broad results
- Archived opportunities may have limited detail available

# Actor input Schema

## `api_key` (type: `string`):

Your free SAM.gov API key. Get one at https://sam.gov/data-services/Entity%20Management/Summary
## `keyword` (type: `string`):

Search keyword for contract opportunities.
## `naicsCode` (type: `string`):

NAICS industry code filter (e.g. 541511 for Custom Computer Programming).
## `state` (type: `string`):

2-letter US state code (e.g. CA, TX, VA).
## `agency` (type: `string`):

Name of the contracting agency.
## `setAside` (type: `string`):

Set-aside code for small business programs.
## `postedFrom` (type: `string`):

Start date filter (MM/dd/yyyy format, e.g. 01/01/2025).
## `postedTo` (type: `string`):

End date filter (MM/dd/yyyy format, e.g. 01/31/2025).
## `limit` (type: `number`):

Maximum number of opportunities to return (max 1000).

## Actor input object example

```json
{
  "limit": 100
}
````

# Actor output Schema

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

No description

# 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("dash_authority/sam-gov-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("dash_authority/sam-gov-opportunities").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 dash_authority/sam-gov-opportunities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dash_authority/sam-gov-opportunities",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SAM.gov Contract Opportunities",
        "description": "Search federal contract opportunities from the SAM.gov API. Filter by keyword, agency, NAICS code, state, set-aside type, and posting dates. Categories: government contracts, procurement, federal opportunities, SAM.gov.",
        "version": "1.0",
        "x-build-id": "CncuxPyXjyk979Xui"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dash_authority~sam-gov-opportunities/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dash_authority-sam-gov-opportunities",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dash_authority~sam-gov-opportunities/runs": {
            "post": {
                "operationId": "runs-sync-dash_authority-sam-gov-opportunities",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dash_authority~sam-gov-opportunities/run-sync": {
            "post": {
                "operationId": "run-sync-dash_authority-sam-gov-opportunities",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "api_key"
                ],
                "properties": {
                    "api_key": {
                        "title": "SAM.gov API Key",
                        "type": "string",
                        "description": "Your free SAM.gov API key. Get one at https://sam.gov/data-services/Entity%20Management/Summary"
                    },
                    "keyword": {
                        "title": "Keyword",
                        "type": "string",
                        "description": "Search keyword for contract opportunities."
                    },
                    "naicsCode": {
                        "title": "NAICS Code",
                        "type": "string",
                        "description": "NAICS industry code filter (e.g. 541511 for Custom Computer Programming)."
                    },
                    "state": {
                        "title": "State",
                        "type": "string",
                        "description": "2-letter US state code (e.g. CA, TX, VA)."
                    },
                    "agency": {
                        "title": "Agency",
                        "type": "string",
                        "description": "Name of the contracting agency."
                    },
                    "setAside": {
                        "title": "Set-Aside Type",
                        "enum": [
                            "SBA",
                            "SBP",
                            "WOSB",
                            "HUBZone",
                            "SDVOSB",
                            "8A"
                        ],
                        "type": "string",
                        "description": "Set-aside code for small business programs."
                    },
                    "postedFrom": {
                        "title": "Posted From Date",
                        "type": "string",
                        "description": "Start date filter (MM/dd/yyyy format, e.g. 01/01/2025)."
                    },
                    "postedTo": {
                        "title": "Posted To Date",
                        "type": "string",
                        "description": "End date filter (MM/dd/yyyy format, e.g. 01/31/2025)."
                    },
                    "limit": {
                        "title": "Result Limit",
                        "type": "number",
                        "description": "Maximum number of opportunities to return (max 1000).",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
