Skip to main content
POST
Search

Request contract

  • Method and path: POST /apis/v1/sam-gov/opportunities/search
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/sam-gov/opportunities/search
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
agency_ids
string[]

SAM.gov federal organization ids at any hierarchy level (100000000 = Dept of Defense, 300000188 = Dept of the Navy, 100006688 = Dept of Veterans Affairs). Matched as OR.

cursor
string

Opaque cursor from a previous response's next_cursor. Bound to the same filters and page_size; valid for 24 hours; then cursor_expired.

include_attachments
boolean

Also list each notice's attachments (one more upstream request per record). Requires include_details and page_size <= 50.

include_details
boolean

Fetch each hit's notice detail (one extra upstream request per record) so naics_codes, set_aside, place_of_performance and the full description are populated. false returns summary records with detail_level=summary.

naics_codes
string[]

NAICS codes or prefixes (2 to 6 digits). Matched as OR.

notice_types
string[]

Notice types (SAM.gov codes p,o,k,a,r,s,i,g,u,f,l). Empty = all.

page_size
number
default:20

Records per page. At most 50 when include_attachments is true.

Provider reference: minimum 1; maximum 100; default 20.

published_from
string

Inclusive lower bound (YYYY-MM-DD, US Eastern calendar day) on the notice's latest publication/modification date. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

published_to
string

Inclusive upper bound (YYYY-MM-DD). Must not be before published_from. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

query
string
default:""

Keyword query matched against title, solicitation number and description. Multi-word queries combine per query_mode (default: every word must match). Empty matches everything.

Provider reference: default "".

query_mode
string
default:all

How the words of query must match, as SAM.gov's own keyword search offers them (upstream qMode): all = every word (SAM.gov's default), any = at least one word, exact = the phrase as written.

Provider reference: allowed values ["all", "any", "exact"]; default "all".

response_deadline_from
string

Inclusive lower bound (YYYY-MM-DD) on the response deadline.

response_deadline_to
string

Inclusive upper bound (YYYY-MM-DD) on the response deadline.

set_asides
string[]

SAM.gov set-aside codes (SBA = total small business, 8A, HZC = HUBZone, SDVOSBC, WOSB, EDWOSB, ...). Matched as OR.

sort
string
default:updated_desc

sort

Provider reference: allowed values ["updated_desc", "updated_asc", "relevance", "deadline_asc", "deadline_desc"]; default "updated_desc".

statuses
string[]

Notice status as SAM.gov indexes it. active = accepting responses / not yet archived; inactive = archived. Both = no status filter.

Response

Search SAM.gov contract opportunities by keyword, agency, notice status, publication date, NAICS, set-aside, notice type and response deadline. Returns one page (default 20, max 100) with an opaque cursor for the next page. By default each hit is enriched with its full notice detail (NAICS, set-aside, place of performance, full description).

The response contains the tool result directly.

The provider identifies records as the primary payload key.

These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.