sam_search_opportunities
Pack: samgov · Endpoint: https://gateway.pipeworx.io/samgov/mcp
Search active federal contract opportunities by keyword, NAICS code (e.g., “541512”), set-aside type, posting date range, and procurement type. Returns titles, solicitation numbers, deadlines, and agencies.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | yes | Search term for opportunity title or description |
naics | string | no | NAICS code to filter by (e.g., “541512” for computer systems design) |
set_aside | string | no | Small business set-aside type: SBA (Small Business), SDVOSB (Service-Disabled Veteran), HUBZone, 8AN (8(a)), WOSB (Women-Owned), EDWOSB (Economically Disadvantaged Women-Owned) |
posted_from | string | no | Start of posting date range in MM/dd/yyyy format |
posted_to | string | no | End of posting date range in MM/dd/yyyy format |
limit | number | no | Number of results to return (1-100, default 10) |
offset | number | no | Result offset for pagination (default 0) |
ptype | string | no | Procurement type filter: p (presolicitation), o (solicitation), k (combined synopsis/solicitation), a (award notice) |
_apiKey | string | yes | SAM.gov API key |
Example call
Arguments
{
"keyword": "software development",
"naics": "541512",
"posted_from": "01/01/2024",
"posted_to": "12/31/2024",
"limit": 20,
"_apiKey": "your-samgov-api-key"
}
curl
curl -X POST https://gateway.pipeworx.io/samgov/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"sam_search_opportunities","arguments":{"keyword":"software development","naics":"541512","posted_from":"01/01/2024","posted_to":"12/31/2024","limit":20,"_apiKey":"your-samgov-api-key"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('sam_search_opportunities', {
"keyword": "software development",
"naics": "541512",
"posted_from": "01/01/2024",
"posted_to": "12/31/2024",
"limit": 20,
"_apiKey": "your-samgov-api-key"
});
More examples
{
"keyword": "IT services",
"set_aside": "WOSB",
"ptype": "o",
"_apiKey": "your-samgov-api-key"
}
Response shape
Always returns: total_records, limit, offset, opportunities
| Field | Type | Description |
|---|---|---|
total_records | number | Total number of matching opportunities in SAM.gov |
limit | number | Number of results returned in this request |
offset | number | Offset used for pagination |
opportunities | array |
Full JSON Schema
{
"type": "object",
"properties": {
"total_records": {
"type": "number",
"description": "Total number of matching opportunities in SAM.gov"
},
"limit": {
"type": "number",
"description": "Number of results returned in this request"
},
"offset": {
"type": "number",
"description": "Offset used for pagination"
},
"opportunities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": [
"string",
"null"
],
"description": "Opportunity title"
},
"solicitation_number": {
"type": [
"string",
"null"
],
"description": "Unique solicitation identifier"
},
"department": {
"type": [
"string",
"null"
],
"description": "Procuring department/agency"
},
"sub_tier": {
"type": [
"string",
"null"
],
"description": "Sub-tier agency code"
},
"office": {
"type": [
"string",
"null"
],
"description": "Procuring office name"
},
"posted_date": {
"type": [
"string",
"null"
],
"description": "Date opportunity was posted"
},
"response_deadline": {
"type": [
"string",
"null"
],
"description": "Proposal response deadline"
},
"type": {
"type": [
"string",
"null"
],
"description": "Procurement type (presolicitation, solicitation, etc.)"
},
"set_aside": {
"type": [
"string",
"null"
],
"description": "Small business set-aside type if applicable"
},
"naics_code": {
"type": [
"string",
"null"
],
"description": "Primary NAICS code"
},
"classification_code": {
"type": [
"string",
"null"
],
"description": "Classification code"
},
"active": {
"type": [
"string",
"null"
],
"description": "Active status indicator"
},
"ui_link": {
"type": [
"string",
"null"
],
"description": "URL to opportunity details on SAM.gov"
}
}
}
}
},
"required": [
"total_records",
"limit",
"offset",
"opportunities"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"samgov": {
"url": "https://gateway.pipeworx.io/samgov/mcp"
}
}
}
See Getting Started for client-specific install steps.