---
title: "Returns federal contract awards from USAspending.gov — government spending data sourced from Treasury/GSA"
method: GET
path: "/v1/federal-contracts"
---

# Returns federal contract awards from USAspending.gov — government spending data sourced from Treasury/GSA

`GET /v1/federal-contracts`

## Request

- Base URL: `https://api.keyvex.com`
- URL: `https://api.keyvex.com/v1/federal-contracts`
- Auth: API key in header `x-api-key`

Returns federal contract awards from USAspending.gov — government spending data sourced from Treasury/GSA. Each record is one prime contract award (BPA Call, Purchase Order, Delivery Order, or Definitive Contract). Modifications appear as separate records.  Use this when the user asks about: who's getting federal contracts, how much a specific recipient (Lockheed Martin, RTX, Raytheon, Booz Allen, etc.) won this year/quarter, contracts by industry (NAICS code) or product type (PSC code), or to cross-reference congressional trading with contract awards.  Cross-source pattern (the political-alpha play):   1. get_congressional_trades(ticker:'LMT', since:'2026-01-01') —      find LMT trades by members of Congress.   2. get_federal_contracts(recipient_name:'Lockheed Martin',      since:'2026-01-01') — find LMT contract awards.   3. Compare timing — trades within 30 days before a major contract      are the high-signal cases.  ⚠ award_amount and total_outlays are NULLABLE, and total_outlays is null on MOST rows. USAspending omits Total Outlays from the search response about 75% of the time, and this tool now reports that as null rather than as $0 — a 0 here means the source really said zero. Do not do arithmetic on either field without a null check. Rows with a null value are excluded from min_amount filters and sort LAST, because a value we do not have cannot satisfy a threshold.  recipient_name is a case-insensitive substring match — use the parent name ('Lockheed Martin') to catch all subsidiaries.  COVERAGE — live passthrough (source:'live'): each call queries USAspending's API over the full dataset (2007-10 onward), with recipient/NAICS/PSC/min-amount/date filters applied server-side. The response's `total_count` is USAspending's authoritative award count for your filtered query — USE IT for volume answers (the `results` array is just the requested page). `total_count` is omitted — and coverage_warning says why — when USAspending cannot count the answer: a recipient_uei that is also the PARENT of other recipients (USAspending cannot filter to one UEI's own awards), recipient_name combined with recipient_uei, or a start_date window (sort_by start_date with since/until). Then has_more is true whenever the search stopped before the end. On USAspending outage the tool falls back to a recent cached window (source:'cache' + coverage_warning) — don't infer volume there.

## Query parameters

- `recipient_name` string
- `recipient_uei` string
- `awarding_agency` string
- `naics_code` string
- `psc_code` string
- `min_amount` number
- `since` string
- `until` string
- `sort_by` 'last_modified_date' | 'start_date' | 'award_amount' | 'total_outlays'
- `sort_order` 'desc' | 'asc'
- `limit` integer

## Response `200`

JSON envelope: { results: [...], count, has_more }.

## Other responses

- `400`: Invalid parameter.
- `401`: Missing or invalid API key.
- `402`: This tool requires a higher plan (upgrade_required). Retrying will not help.
- `429`: Tier rate/quota limit reached (rate_limited). Retry-After points at the reset.

---

[API](https://skmtc.dev/keyvex/apis/keyvex-api.md) · [All operations](https://skmtc.dev/keyvex/apis/keyvex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/keyvex/apis/keyvex-api/revisions/01c0210c19cd?raw)
