Government Solicitations
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/gov/solicitations \
--header 'Content-Type: application/json' \
--data '
{
"naics": [
"<string>"
],
"notice_types": [
"<string>"
],
"since_days": 123,
"agencies": [
"<string>"
],
"keywords": [
"<string>"
],
"state": "<string>",
"set_aside": "<string>",
"active_only": true,
"has_contact": true,
"include_description": true,
"limit": 123
}
'import requests
url = "https://win.oneshotagent.com/v1/tools/gov/solicitations"
payload = {
"naics": ["<string>"],
"notice_types": ["<string>"],
"since_days": 123,
"agencies": ["<string>"],
"keywords": ["<string>"],
"state": "<string>",
"set_aside": "<string>",
"active_only": True,
"has_contact": True,
"include_description": True,
"limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
naics: ['<string>'],
notice_types: ['<string>'],
since_days: 123,
agencies: ['<string>'],
keywords: ['<string>'],
state: '<string>',
set_aside: '<string>',
active_only: true,
has_contact: true,
include_description: true,
limit: 123
})
};
fetch('https://win.oneshotagent.com/v1/tools/gov/solicitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/gov/solicitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'naics' => [
'<string>'
],
'notice_types' => [
'<string>'
],
'since_days' => 123,
'agencies' => [
'<string>'
],
'keywords' => [
'<string>'
],
'state' => '<string>',
'set_aside' => '<string>',
'active_only' => true,
'has_contact' => true,
'include_description' => true,
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/gov/solicitations"
payload := strings.NewReader("{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/gov/solicitations")
.header("Content-Type", "application/json")
.body("{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/gov/solicitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_bodyGovernment
Government Solicitations
Federal contract opportunities (SAM.gov) by NAICS code, with the contracting officer’s published contact.
POST
/
v1
/
tools
/
gov
/
solicitations
Government Solicitations
curl --request POST \
--url https://win.oneshotagent.com/v1/tools/gov/solicitations \
--header 'Content-Type: application/json' \
--data '
{
"naics": [
"<string>"
],
"notice_types": [
"<string>"
],
"since_days": 123,
"agencies": [
"<string>"
],
"keywords": [
"<string>"
],
"state": "<string>",
"set_aside": "<string>",
"active_only": true,
"has_contact": true,
"include_description": true,
"limit": 123
}
'import requests
url = "https://win.oneshotagent.com/v1/tools/gov/solicitations"
payload = {
"naics": ["<string>"],
"notice_types": ["<string>"],
"since_days": 123,
"agencies": ["<string>"],
"keywords": ["<string>"],
"state": "<string>",
"set_aside": "<string>",
"active_only": True,
"has_contact": True,
"include_description": True,
"limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
naics: ['<string>'],
notice_types: ['<string>'],
since_days: 123,
agencies: ['<string>'],
keywords: ['<string>'],
state: '<string>',
set_aside: '<string>',
active_only: true,
has_contact: true,
include_description: true,
limit: 123
})
};
fetch('https://win.oneshotagent.com/v1/tools/gov/solicitations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://win.oneshotagent.com/v1/tools/gov/solicitations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'naics' => [
'<string>'
],
'notice_types' => [
'<string>'
],
'since_days' => 123,
'agencies' => [
'<string>'
],
'keywords' => [
'<string>'
],
'state' => '<string>',
'set_aside' => '<string>',
'active_only' => true,
'has_contact' => true,
'include_description' => true,
'limit' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://win.oneshotagent.com/v1/tools/gov/solicitations"
payload := strings.NewReader("{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://win.oneshotagent.com/v1/tools/gov/solicitations")
.header("Content-Type", "application/json")
.body("{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://win.oneshotagent.com/v1/tools/gov/solicitations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"naics\": [\n \"<string>\"\n ],\n \"notice_types\": [\n \"<string>\"\n ],\n \"since_days\": 123,\n \"agencies\": [\n \"<string>\"\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"state\": \"<string>\",\n \"set_aside\": \"<string>\",\n \"active_only\": true,\n \"has_contact\": true,\n \"include_description\": true,\n \"limit\": 123\n}"
response = http.request(request)
puts response.read_bodyWhich federal agencies are buying what you sell, right now?
A Sources Sought or Presolicitation notice is SAM.gov’s signal that an agency has a requirement and is still writing it — before it hits a formal solicitation, before a prime has been picked, while the contracting officer is actively looking for vendors to talk to. That window is the buying window: respond to a Sources Sought and you can shape the requirement; wait for the full solicitation and you’re competing on someone else’s terms. Every notice carries the contracting officer’s published name, email, and phone — the join a normal B2B database can’t make, because “the federal government” isn’t a company record.
This is a lead-generation endpoint for selling to government, not a general contract-research tool: it filters to the early, relationship-building notice types (
Not every notice publishes a point of contact — pass
NAICS codes are hierarchical —
See Pricing for costs.
r/p) by default, and every row’s point of contact is real and reachable.
Async, like every research endpoint on this site: you POST a request, get back a request_id, and poll GET /v1/requests/{request_id} with X-Agent-ID (your wallet) until the job completes — without the wallet header the poll returns 401 missing_wallet.
This endpoint accepts optional
memo (≤ 1000 chars) and decisionContext
(object) body fields. Stored on the receipt for debugging and audit — see
Audit Trail.Request
POST /v1/tools/gov/solicitations
string[]
required
One or more 6-digit NAICS codes (1–20), e.g.
["541511"]. Every code must match ^\d{6}$. See NAICS codes to start from below.string[]
default:"['r', 'p']"
SAM.gov procurement type codes to include (1–9):
r Sources Sought, p Presolicitation, o Solicitation, k Combined Synopsis/Solicitation, s Special Notice, a Award Notice, u Justification, i Intent to Bundle, g Surplus Property. The default keeps you in the buying window — before the requirement has hardened into a formal solicitation.number
default:"30"
Look-back window on posted date, 1–365.
string[]
Case-insensitive substrings matched against the agency path (max 20), e.g.
["DEPT OF THE ARMY"].string[]
Title / full-text keywords (max 20).
string
Two-letter place-of-performance state code, e.g.
"TX". Rows with no recorded place of performance are unknown, not a match, and are excluded when this filter is set.string
Set-aside code:
SBA, 8A, HZC, SDVOSBC, WOSB, …boolean
default:"true"
Drop archived notices and notices whose response deadline has already passed.
boolean
default:"false"
true keeps only notices whose point of contact has both a name and an email — the rows you can actually act on.boolean
default:"true"
Fetch description bodies for the first rows of the result. See description cap below.
number
default:"100"
Max results, 1–500.
curl -X POST https://win.oneshotagent.com/v1/tools/gov/solicitations \
-H "Content-Type: application/json" \
-H "PAYMENT-SIGNATURE: <signature>" \
-d '{
"naics": ["541511"],
"has_contact": true,
"since_days": 30
}'
The x402 middleware reads
payment-signature (or legacy x-payment). The SDK sets this for you — pass the signed payment when calling HTTP directly.Response
{
"status": "completed",
"result": {
"results": [
{
"notice_id": "a1b2c3d4e5f6",
"notice_type": "sources_sought",
"notice_type_code": "r",
"title": "Custom Software Development Support Services",
"solicitation_number": "W91CRB-26-R-0042",
"agency": "DEPT OF DEFENSE.DEPT OF THE ARMY.AMC",
"naics_code": "541511",
"posted_date": "2026-08-12",
"response_deadline": "2026-09-15T17:00:00Z",
"active": true,
"set_aside": "SBA",
"place_of_performance": { "city": "Huntsville", "state": "AL", "zip": "35805" },
"contact": {
"name": "Jordan Ellis",
"email": "[email protected]",
"phone": "(256) 555-0119",
"title": "Contracting Officer",
"type": "primary"
},
"contacts": [
{ "name": "Jordan Ellis", "email": "[email protected]", "phone": "(256) 555-0119", "title": "Contracting Officer", "type": "primary" }
],
"description": "The government is seeking sources capable of providing custom software development...",
"description_truncated": false,
"url": "https://sam.gov/opp/a1b2c3d4e5f6/view",
"id": "a1b2c3d4e5f6"
}
],
"total_found": 1,
"truncated": false,
"description_fetches": 1,
"vendor_calls": 2,
"data_as_of": "2026-09-07T06:00:00.000Z",
"filters": { "naics": ["541511"], "has_contact": true, "since_days": 30 }
}
}
Zero rows is a completed job, not an error —
results: [], total_found: 0. It means no notice matched your filters in the window, not that the search failed. The same contract as every other search endpoint on this site.data_as_of is an ISO timestamp of the data snapshot behind results: the publish time of SAM.gov’s daily extract when served from it (same-day postings typically appear the next morning), or the request time when the live SAM.gov API answered.
The description cap
Description bodies are a second upstream call per notice, so they’re fetched for a capped number of rows per search rather than every row unconditionally.description is null on any row the fetch didn’t reach. truncated: true on the top-level result means either the description cap stopped some rows short, or the search itself was halted early by an upstream error — check description_fetches and inspect which rows have description: null to tell which happened. description_truncated (per row) is different: it means the description body itself was longer than the per-notice character cap and was cut, not that it’s missing.
has_contact
Not every notice publishes a point of contact — pass has_contact: true to only get rows with a name and an email you can act on immediately. Without it you’ll see notices where contact is null.
NAICS codes to start from
| Vertical | NAICS |
|---|---|
| Custom computer programming / software dev | 541511 |
| IT systems integration | 541512 |
| Computer facilities management | 541513 |
| Management consulting | 541611 |
| Engineering services | 541330 |
| Commercial building construction | 236220 |
| Facilities support services | 561210 |
| Janitorial services | 561720 |
| Security guard services | 561612 |
| Office administrative services | 561110 |
5415 (computer systems design) rolls up 541511–541519, but this endpoint only accepts full 6-digit codes. Pass the code(s) closest to what you actually deliver; SAM.gov’s own NAICS lookup (naics.com or sam.gov) is the canonical reference for less common verticals.
SDK
const opportunities = await agent.govSolicitations({
naics: ['541511'],
has_contact: true,
});
for (const notice of opportunities.results) {
console.log(notice.title, notice.contact?.email);
}