Skip to main content

Search Federal Contracts

Search USAspending.gov for U.S. federal contract awards by criteria including agency, NAICS code, value, date range, and set-aside type.

Parameters

NameTypeRequiredDefaultDescription
keywordsstringNo-Keywords to search in contract descriptions.
awardingAgencystringNo-Filter by awarding agency name.
naicsCodestringNo-Filter by NAICS code.
pscCodestringNo-Filter by Product/Service Code.
minValuenumberNo-Minimum total obligation value in USD.
maxValuenumberNo-Maximum total obligation value in USD.
startDateAfterstringNo-Filter contracts starting after this date (YYYY-MM-DD).
startDateBeforestringNo-Filter contracts starting before this date (YYYY-MM-DD).
setAsideTypestringNo-Small business set-aside type filter.
limitnumberNo25Maximum number of contracts to return.

Required Integrations

  • datagov (SAM.gov / Data.gov API key)

Use Cases

  • Federal contract landscape analysis
  • Government spending research
  • Identifying contract opportunities by agency or NAICS code
  • Small business set-aside analysis

Example Usage

Search by agency

{
"tool": "search_federal_contracts",
"parameters": {
"awardingAgency": "Department of Defense",
"minValue": 1000000,
"limit": 10
}
}

Search by NAICS code

{
"tool": "search_federal_contracts",
"parameters": {
"naicsCode": "541512",
"startDateAfter": "2024-01-01"
}
}

Response Format

The tool returns a structured JSON response with:

  • totalCount: Total matching contracts
  • contracts: Array of contract objects with awardId, recipientName, awardingAgency, totalObligation, startDate, endDate, contractType, naicsCode, placeOfPerformance, etc.
  • hasMore: Whether more results are available

Error Handling

Common errors:

  • Missing Integration: SAM.gov / Data.gov API key not configured (requires datagov integration)
  • Rate Limit: API rate limit exceeded
  • Invalid Parameters: Bad date format or value range
  • search_gov_opportunities - Search for open federal solicitations
  • company_gov_opportunities - Find opportunities for a specific company
  • company_gov_relationships - Prime/sub contractor relationships
  • company_contracts - ICT outsourced contracts (with optional includeFederalContracts)

Next Steps