curl --request POST \
--url https://app.govly.com/api/tools/v1/opportunities/saved_searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"query": "<string>",
"buyerIds": [
"<string>"
],
"includeSubBuyers": true,
"naics": [
"<string>"
],
"placeIds": [
"<string>"
],
"placeIdsNone": [
"<string>"
],
"recordType": [
"<string>"
],
"noticeType": [
"<string>"
],
"status": [
"<string>"
],
"dateRangeParam": "<string>",
"relativeStartDayPivot": 123,
"relativeEndDayPivot": 123
}
'import requests
url = "https://app.govly.com/api/tools/v1/opportunities/saved_searches"
payload = {
"name": "<string>",
"query": "<string>",
"buyerIds": ["<string>"],
"includeSubBuyers": True,
"naics": ["<string>"],
"placeIds": ["<string>"],
"placeIdsNone": ["<string>"],
"recordType": ["<string>"],
"noticeType": ["<string>"],
"status": ["<string>"],
"dateRangeParam": "<string>",
"relativeStartDayPivot": 123,
"relativeEndDayPivot": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
query: '<string>',
buyerIds: ['<string>'],
includeSubBuyers: true,
naics: ['<string>'],
placeIds: ['<string>'],
placeIdsNone: ['<string>'],
recordType: ['<string>'],
noticeType: ['<string>'],
status: ['<string>'],
dateRangeParam: '<string>',
relativeStartDayPivot: 123,
relativeEndDayPivot: 123
})
};
fetch('https://app.govly.com/api/tools/v1/opportunities/saved_searches', 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://app.govly.com/api/tools/v1/opportunities/saved_searches",
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([
'name' => '<string>',
'query' => '<string>',
'buyerIds' => [
'<string>'
],
'includeSubBuyers' => true,
'naics' => [
'<string>'
],
'placeIds' => [
'<string>'
],
'placeIdsNone' => [
'<string>'
],
'recordType' => [
'<string>'
],
'noticeType' => [
'<string>'
],
'status' => [
'<string>'
],
'dateRangeParam' => '<string>',
'relativeStartDayPivot' => 123,
'relativeEndDayPivot' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.govly.com/api/tools/v1/opportunities/saved_searches"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.govly.com/api/tools/v1/opportunities/saved_searches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.govly.com/api/tools/v1/opportunities/saved_searches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"active": true,
"criteria": {},
"matchCount": 123,
"lastMatchedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}Create an opportunity saved search
Saves a set of opportunity search criteria. Opportunity saved searches percolate, so the stored filters also drive match notifications. The market the search is created under is stored with it and bounds every later match, so set searchType explicitly when scoping to a state or local place. Stored filters can be changed but not removed.
curl --request POST \
--url https://app.govly.com/api/tools/v1/opportunities/saved_searches \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"query": "<string>",
"buyerIds": [
"<string>"
],
"includeSubBuyers": true,
"naics": [
"<string>"
],
"placeIds": [
"<string>"
],
"placeIdsNone": [
"<string>"
],
"recordType": [
"<string>"
],
"noticeType": [
"<string>"
],
"status": [
"<string>"
],
"dateRangeParam": "<string>",
"relativeStartDayPivot": 123,
"relativeEndDayPivot": 123
}
'import requests
url = "https://app.govly.com/api/tools/v1/opportunities/saved_searches"
payload = {
"name": "<string>",
"query": "<string>",
"buyerIds": ["<string>"],
"includeSubBuyers": True,
"naics": ["<string>"],
"placeIds": ["<string>"],
"placeIdsNone": ["<string>"],
"recordType": ["<string>"],
"noticeType": ["<string>"],
"status": ["<string>"],
"dateRangeParam": "<string>",
"relativeStartDayPivot": 123,
"relativeEndDayPivot": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
query: '<string>',
buyerIds: ['<string>'],
includeSubBuyers: true,
naics: ['<string>'],
placeIds: ['<string>'],
placeIdsNone: ['<string>'],
recordType: ['<string>'],
noticeType: ['<string>'],
status: ['<string>'],
dateRangeParam: '<string>',
relativeStartDayPivot: 123,
relativeEndDayPivot: 123
})
};
fetch('https://app.govly.com/api/tools/v1/opportunities/saved_searches', 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://app.govly.com/api/tools/v1/opportunities/saved_searches",
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([
'name' => '<string>',
'query' => '<string>',
'buyerIds' => [
'<string>'
],
'includeSubBuyers' => true,
'naics' => [
'<string>'
],
'placeIds' => [
'<string>'
],
'placeIdsNone' => [
'<string>'
],
'recordType' => [
'<string>'
],
'noticeType' => [
'<string>'
],
'status' => [
'<string>'
],
'dateRangeParam' => '<string>',
'relativeStartDayPivot' => 123,
'relativeEndDayPivot' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://app.govly.com/api/tools/v1/opportunities/saved_searches"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://app.govly.com/api/tools/v1/opportunities/saved_searches")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.govly.com/api/tools/v1/opportunities/saved_searches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"buyerIds\": [\n \"<string>\"\n ],\n \"includeSubBuyers\": true,\n \"naics\": [\n \"<string>\"\n ],\n \"placeIds\": [\n \"<string>\"\n ],\n \"placeIdsNone\": [\n \"<string>\"\n ],\n \"recordType\": [\n \"<string>\"\n ],\n \"noticeType\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"dateRangeParam\": \"<string>\",\n \"relativeStartDayPivot\": 123,\n \"relativeEndDayPivot\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"active": true,
"criteria": {},
"matchCount": 123,
"lastMatchedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Display name for the saved search.
Free-text search terms.
Market this search covers. Defaults to the caller's market focus and is stored, so it bounds every later match.
fed, sled, international Govly buyer (government entity) ids.
Include opportunities from child agencies. Default true when buyerIds is set.
NAICS codes to filter by.
Canonical Govly Place ids to scope the saved search to, from the place search or list tools. Matches at any administrative level. Bounded by the stored market, and changeable but not removable.
Canonical Govly Place ids to exclude. Same matching rules as placeIds.
Record types. Published and forecast types cannot be mixed.
Notice types.
Opportunity statuses.
Which date field the relative window applies to.
Window start, in days relative to today.
Window end, in days relative to today.
Response
Created opportunity saved search
Show child attributes
Show child attributes
Was this page helpful?