KeyVex Federal Contracts API

The Federal Contracts API from KeyVex — 1 operation(s) for federal contracts.

GitHub OpenAPI

Operations 1

GET /v1/federal-contracts Returns federal contract awards from USAspending.gov — government spending data… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/keyvex-com:keyvex-com-federal-contracts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

keyvex-com-federal-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: KeyVex Federal Contracts API
  version: 0.102.0
  termsOfService: https://keyvex.com/terms
  description: 'US public financial-disclosure data — congressional trades, insider filings (Form 4), lobbying, Treasury auctions, member profiles. Requires an API key — create a free one at https://keyvex.com and send it as the header `x-api-key: `. A free key returns most public-record datasets (one year of history; no market-price data and a few heavy datasets are on paid plans only), capped at 60 requests/day; paid plans raise the caps. The daily allowance resets at midnight Eastern.'
servers:
- url: https://api.keyvex.com
security:
- ApiKeyAuth: []
tags:
- name: Federal Contracts
paths:
  /v1/federal-contracts:
    get:
      operationId: get_federal_contracts
      summary: Returns federal contract awards from USAspending.gov — government spending data…
      description: '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.'
      parameters:
      - name: recipient_name
        in: query
        required: false
        description: 'Recipient name substring; case-insensitive match. Example: ''Lockheed Martin'' matches ''LOCKHEED MARTIN CORP'', ''LOCKHEED MARTIN MISSILES AND FIRE CONTROL'', etc. USAspending also matches the PARENT company''s name, so a parent name returns its subsidiaries'' awards (e.g. Sikorsky under ''Lockheed Martin''). Combined with recipient_uei it is matched against that recipient''s OWN name instead, and coverage_warning says how many awards it removed.'
        schema:
          type: string
      - name: recipient_uei
        in: query
        required: false
        description: 'Unique Entity Identifier (replaced DUNS in 2022). 12-character alphanumeric. Exact match: only awards made to this UEI itself. If it is also the parent of other recipients, their awards are NOT included and total_count is omitted — coverage_warning names the parent; use recipient_name with that name for the whole family.'
        schema:
          type: string
      - name: awarding_agency
        in: query
        required: false
        description: 'The TOPTIER awarding agency name — exact and case-sensitive; a sub-agency name (e.g. ''Defense Logistics Agency'') or an abbreviation (''NASA'') matches nothing. Examples: ''Department of Defense'', ''National Aeronautics and Space Administration'', ''Department of Health and Human Services''.'
        schema:
          type: string
      - name: naics_code
        in: query
        required: false
        description: '6-digit North American Industry Classification System code. Example: ''541710'' (R&D in Physical/Engineering/Life Sciences). Exact match.'
        schema:
          type: string
      - name: psc_code
        in: query
        required: false
        description: 'Product or Service Code (4-character). Example: ''AR33'' (R&D Space Flight Advanced Development). Exact match.'
        schema:
          type: string
      - name: min_amount
        in: query
        required: false
        description: Filter to awards with award_amount >= this value (USD). Use to focus on large contracts.
        schema:
          type: number
      - name: since
        in: query
        required: false
        description: ISO date (YYYY-MM-DD). Only records on or after this date — on last_modified_date, except when sort_by is start_date, where it applies to start_date.
        schema:
          type: string
      - name: until
        in: query
        required: false
        description: ISO date (YYYY-MM-DD). Only records on or before this date (the same date field as since).
        schema:
          type: string
      - name: sort_by
        in: query
        required: false
        description: 'Field used for ordering. since/until apply to start_date when this is start_date, and to last_modified_date for every other sort. Default: last_modified_date (most-recently-modified first).'
        schema:
          type: string
          enum:
          - last_modified_date
          - start_date
          - award_amount
          - total_outlays
      - name: sort_order
        in: query
        required: false
        description: 'Default: desc.'
        schema:
          type: string
          enum:
          - desc
          - asc
      - name: limit
        in: query
        required: false
        description: Maximum records to return. Default 50, max 500.
        schema:
          type: integer
      responses:
        '200':
          description: 'JSON envelope: { results: [...], count, has_more }.'
        '400':
          description: Invalid parameter.
        '401':
          description: Missing or invalid API key.
        '402':
          description: This tool requires a higher plan (upgrade_required). Retrying will not help.
        '429':
          description: Tier rate/quota limit reached (rate_limited). Retry-After points at the reset.
      tags:
      - Federal Contracts
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key