Skip to content

Government Contracts Dataset

Track federal government contract awards sourced from USAspending.gov and mapped to public company tickers. See which companies win government contracts, the awarding agencies, contract values, industry classifications, and contract periods.

The Government Contracts dataset provides:

  • Award Details: Award ID, amount, type, and contract award type
  • Agency Information: Awarding agency and sub-agency
  • Recipient Data: Recipient company name mapped to stock ticker
  • Contract Period: Start and end dates for each award
  • Industry Classification: NAICS codes and descriptions
  • Contract Description: Plain-text description of the contract scope
SourceDescriptionUpdate Frequency
USAspending.govFederal contract awards mapped to stock tickersDaily
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.government_contracts.ticker("LMT", as_dataframe=True)
print(df)

For complete code examples in Python, JavaScript, C++, Rust, and cURL, see the API Reference.

FieldDescriptionExample
awardIdUnique contract award identifierCONT_AWD_0001
awardAmountTotal award value in USD50000000
awardTypeType of awardContract
awardingAgencyFederal agency issuing the contractDepartment of Defense
awardingSubAgencySub-agency within the awarding agencyDepartment of the Army
recipientNameCompany receiving the contractLockheed Martin Corporation
startDateContract start date (YYYY-MM-DD)2025-06-01
endDateContract end date (YYYY-MM-DD)2026-06-01
descriptionPlain-text description of the contractAircraft maintenance services
naicsCodeNAICS industry classification code336411
naicsDescriptionHuman-readable NAICS descriptionAircraft Manufacturing
contractAwardTypeSpecific contract award mechanismDefinitive Contract

Scan defense tickers to find companies with the highest total contract value:

from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def scan_contract_value(symbols):
"""Find companies with the highest government contract value"""
results = []
for symbol in symbols:
try:
df = fb.government_contracts.ticker(symbol, as_dataframe=True)
total_value = df["awardAmount"].sum()
results.append({
"symbol": symbol,
"contracts": len(df),
"total_value": total_value
})
except Exception:
continue
return sorted(results, key=lambda x: x["total_value"], reverse=True)
defense_symbols = ["LMT", "RTX", "GD", "NOC", "BA"]
recipients = scan_contract_value(defense_symbols)
for r in recipients:
print(f"{r['symbol']}: {r['contracts']} contracts, ${r['total_value']:,.0f} total value")

Analyze which federal agencies award contracts to a given company:

from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def agency_breakdown(symbol):
"""Break down contracts by awarding agency"""
df = fb.government_contracts.ticker(symbol, as_dataframe=True)
by_agency = df.groupby("awardingAgency").agg(
contracts=("awardAmount", "count"),
total_value=("awardAmount", "sum")
).sort_values("total_value", ascending=False)
return by_agency
agencies = agency_breakdown("LMT")
for agency, row in agencies.iterrows():
print(f"{agency}: {row['contracts']} contracts, ${row['total_value']:,.0f}")

Categorize contracts by size to understand the award distribution:

import pandas as pd
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def contract_size_distribution(symbol):
"""Categorize contracts by size buckets"""
df = fb.government_contracts.ticker(symbol, as_dataframe=True)
bins = [0, 1_000_000, 10_000_000, 100_000_000, float("inf")]
labels = ["Under $1M", "$1M–$10M", "$10M–$100M", "$100M+"]
df["size_bucket"] = pd.cut(df["awardAmount"], bins=bins, labels=labels)
distribution = df.groupby("size_bucket", observed=True).agg(
contracts=("awardAmount", "count"),
total_value=("awardAmount", "sum")
)
return distribution
dist = contract_size_distribution("RTX")
for bucket, row in dist.iterrows():
print(f"{bucket}: {row['contracts']} contracts, ${row['total_value']:,.0f}")