The United States federal government spends roughly $6 trillion every fiscal year across contracts, grants, direct payments, and loans—and every dollar of it is in a public database. USASpending.gov is that database. Required by statute since 2006, expanded by the DATA Act in 2014, and administered by the Bureau of the Fiscal Service within the Department of the Treasury, it is the most comprehensive public record of government financial activity in existence. Understanding what it contains, where the data comes from, and how to query it programmatically is essential for anyone doing federal procurement research, grant analysis, oversight work, or investigative journalism.
What USASpending.gov is and why it exists
USASpending.gov has two legislative foundations. The Federal Funding Accountability and Transparency Act of 2006 (FFATA), sponsored by then-Senator Barack Obama and Senator Tom Coburn, required the Office of Management and Budget to create a single searchable website containing information about all federal financial assistance awards. The result was the original USASpending.gov, which launched in 2007 and covered grants and contracts above certain thresholds.
The Digital Accountability and Transparency Act of 2014 (DATA Act) substantially expanded the mandate. It required federal agencies to link their internal financial management data—appropriations, obligations, and outlays from agency accounting systems—to the individual award records on USASpending. The DATA Act created a common data standard, the DATA Act Schema, that specifies exactly how agencies must format and submit their financial data for ingestion into the platform. As a result, USASpending now shows not just award-level records but the full chain from congressional appropriation through agency obligation through actual outlay, all traceable to specific contracts and grants.
The Bureau of the Fiscal Service, part of the Department of the Treasury, operates and maintains USASpending.gov and the underlying data infrastructure. Agencies submit financial data on a monthly basis; award data from the source procurement and financial assistance systems is ingested continuously. The platform is fully open: no registration is required to search, download, or access the API.
Four award types and their data sources
USASpending tracks spending across four main award categories, each drawing from different upstream data systems.
Contracts are competitive and sole-source procurement actions for goods and services. Contract data flows from FPDS-NG, the Federal Procurement Data System—Next Generation, maintained by the General Services Administration. FPDS-NG has been the authoritative record of federal contract actions since 2004 and contains every contract action—award, modification, delivery order, termination—since then. Federal contract obligations run approximately $700 billion per fiscal year, with the Department of Defense accounting for roughly 55 to 65 percent of total contract dollars in most years.
Grants and cooperative agreements provide federal financial assistance to states, local governments, universities, nonprofits, and in some programs individuals. Grant data flows into USASpending from GrantSolutions (the HHS grants management system used by NIH, CDC, and other HHS agencies), the Payment Management System (which tracks grant disbursements), and more than 30 other agency-specific grant-making systems. The Department of Health and Human Services is by far the largest grant-making agency, with NIH alone obligating roughly $40 billion per year in research grants and cooperative agreements. The National Science Foundation obligates approximately $9 billion annually; the Department of Energy's Office of Science accounts for roughly $8 billion in R&D grants and cooperative agreements.
Direct payments and mandatory programs constitute the largest spending category by volume, accounting for roughly $3.5 trillion per year. This category includes Social Security benefit payments, Medicare and Medicaid expenditures, unemployment compensation, nutrition assistance, and other mandatory programs funded by permanent appropriations rather than annual discretionary appropriations. HHS's Centers for Medicare & Medicaid Services alone accounts for over $1 trillion in annual outlays when Medicare and Medicaid are combined. These payments appear in USASpending at an aggregated level— individual beneficiary data is protected under the Privacy Act and not publicly disclosed.
Loans represent federal credit programs—direct loans from the government and loan guarantees (where the government backs private lender obligations). Total federal loan portfolio activity runs approximately $350 billion per year across programs including Small Business Administration 7(a) and 504 loans, Department of Education student loan originations, Department of Agriculture rural development loans, and Federal Housing Administration mortgage guarantees. USASpending records the face value of loans obligated, not the subsidy cost (which is what actually appears in the federal budget under the Federal Credit Reform Act accounting).
FPDS contract data structure
Because contracts are the most heavily analyzed award type, the FPDS-NG data structure is worth examining in detail. Each row in the contract dataset represents a contract action—not a contract itself, but a discrete transaction: an initial award, a modification changing the scope or price, a delivery order placed against an indefinite-delivery vehicle, or a termination. A single multi-year contract may generate hundreds of action rows.
Key fields in the contract data include:
- Recipient name and UEI: the contractor's legal name and Unique Entity Identifier, the 12-character alphanumeric code issued by SAM.gov since 2022. Before 2022, the DUNS number from Dun & Bradstreet was the standard identifier. The DUNS-to-UEI transition created data linkage challenges for longitudinal analysis; some historical records carry only DUNS, requiring a crosswalk table to connect pre- and post-2022 data for the same contractor.
- CAGE code: the Commercial and Government Entity code, a five-character alphanumeric identifier maintained by the Defense Logistics Agency for entities doing business with the federal government. CAGE codes are more stable than DUNS or UEI across corporate name changes and provide an additional join key for contractor identity resolution.
- Awarding and funding agency: the agency that awarded the contract (awarding) versus the agency whose appropriated funds are being obligated (funding). These can differ when one agency acts as a contracting agent for another— a common arrangement in interagency acquisitions.
- PSC (Product Service Code): a four-character GSA-maintained code describing the specific product or service procured. Codes beginning with letters are services (R408 = support—program management); codes beginning with numbers are products (1005 = guns, through-caliber 30mm). PSC codes provide finer procurement categorization than NAICS.
- NAICS code: the North American Industry Classification System code. NAICS codes are six digits, hierarchical, and used in small business size standard determinations: size thresholds (employee count or annual revenue limits) vary by NAICS, and a firm that qualifies as small under one code may not qualify under another.
- Contract type: the pricing arrangement. Fixed-price contracts (FFP, FP-EPA, FP with award fee) place cost risk on the contractor. Cost- reimbursement contracts (CPFF, CPIF, CPAF) reimburse allowable incurred costs plus a fee and place cost risk on the government. Time-and-materials contracts reimburse labor hours at negotiated rates plus material costs at cost. Fixed-price contracts are preferred under FAR policy for well-defined requirements; cost-plus contracts are standard for R&D, weapons system development, and other uncertain-scope work.
- Competition type: whether and how the contract was competed. Full and open competition—using sealed bids or competitive proposals open to all responsible offerors—accounts for roughly 55 to 65 percent of contract dollars. Not competed (sole source) runs 20 to 30 percent and requires a FAR Part 6.302 justification. Competed under simplified acquisition procedures, competed under 8(a), and other categories make up the remainder.
- Set-aside type: the socioeconomic set-aside program if applicable. Key codes: SBA (small business set-aside), 8A (8(a) program), HZC/HZS (HUBZone), VSA/VSB (SDVOSB), WOSB/EDWOSB (women-owned). Set-aside contracts are competed only among firms certified under the applicable program.
- Place of performance: the geographic location where work is performed, captured at city, county, state, zip code, and congressional district level. Distinct from the contractor's registered business address, which reflects where the firm is incorporated.
- Period of performance: start date, current end date (reflecting options exercised to date), and ultimate completion date (if all options are exercised). The gap between current end date and ultimate completion date indicates unexercised option space.
- Obligation amounts: three separate figures appear. The action obligation is the amount committed in this specific transaction. The base and exercised options value is the cumulative obligated amount across all transactions on the contract. The base and all options value is the contract ceiling—what the contract is worth if every option period is exercised.
Defense spending: DoD dominance and top contractors
The Department of Defense is the dominant force in federal contracting. In fiscal year 2023 DoD obligated approximately $412 billion in prime contracts, accounting for roughly 55 percent of all federal contract obligations. The Army, Navy, Air Force, and Defense Logistics Agency each run independent acquisition systems that appear as sub-agencies in the data; the Defense Contract Management Agency appears as the awarding office for many major weapons programs.
The top-10 DoD prime contractors receive approximately 40 to 45 percent of all DoD prime contract dollars, a level of concentration that has been roughly stable for two decades. The top five are:
- Lockheed Martin: approximately $73 billion per year across all federal agencies, the largest federal contractor by obligation in most years. Lockheed's F-35 Joint Strike Fighter program is the most expensive weapons system in history at an estimated $1.7 trillion total program cost. Other major programs include the C-130J Super Hercules airlift aircraft, the PAC-3 Patriot interceptor missile, the AEGIS combat system for Navy surface ships, and numerous classified space and intelligence programs.
- RTX (formerly Raytheon Technologies): approximately $42 billion per year. RTX was formed through the 2020 merger of Raytheon and United Technologies. Key programs include the Patriot missile defense system, Stinger man-portable air defense, Javelin anti-tank missiles (with Lockheed Martin), AIM-120 AMRAAM air-to-air missiles, and Pratt & Whitney jet engines used in F-35s and F-22s.
- Boeing: approximately $20 to 30 billion per year in defense contracts. Programs include the KC-46 Pegasus aerial tanker, F-15EX Eagle II fighter, F/A-18 Super Hornet, CH-47 Chinook helicopter, and Space Launch System core stage under NASA. Boeing Defense, Space & Security is a separate business unit from commercial aviation and appears as a distinct recipient in FPDS data.
- General Dynamics: approximately $18 billion per year. General Dynamics spans combat vehicles (Abrams M1A2 through General Dynamics Land Systems), submarines and surface combatants (through Electric Boat and Bath Iron Works), business jet aircraft (Gulfstream), and IT and enterprise services (through General Dynamics Information Technology, or GDIT). GDIT alone holds multi-billion- dollar IT service contracts across DoD and federal civilian agencies.
- Northrop Grumman: approximately $15 billion per year. Northrop holds the contract for the B-21 Raider stealth bomber under a contract whose total value is classified but estimated in the $100 billion range across the full production run. Northrop also holds the Ground Based Strategic Deterrent (GBSD, now called Sentinel) contract to replace the Minuteman III ICBM force and is the prime contractor for the E-8C JSTARS ground surveillance aircraft replacement.
Cost-plus contracts (CPFF—cost plus fixed fee, CPIF—cost plus incentive fee, CPAF—cost plus award fee) are common for weapons development, advanced R&D, and other high-uncertainty programs. Under cost-plus arrangements the government reimburses allowable costs incurred by the contractor and pays a negotiated fee; cost growth risk falls primarily on the taxpayer rather than the contractor. The F-35 program famously began as a fixed-price development contract before accumulating massive cost overruns that were eventually converted to cost- plus arrangements. GAO and DoD Inspector General reports using FPDS data track cost growth across major acquisition programs on an annual basis.
Competition and sole-source contracts
Federal acquisition policy under FAR Part 6 requires full and open competition as the default for all contract awards above the simplified acquisition threshold of $250,000. Full and open competition accounts for approximately 55 to 60 percent of federal contract dollars in most fiscal years. The remainder flows through a range of alternative procedures.
Not competed (sole source) contracts constitute 20 to 30 percent of contract dollars. FAR 6.302 lists the permitted exceptions: only one responsible source (unique capability or proprietary data rights), unusual and compelling urgency, industrial mobilization or national security, international agreement, authorized by statute, national interest, and public interest. For contracts above $750,000, agencies must prepare and make publicly available a Justification and Approval (J&A) document explaining the specific exception being invoked. J&A documents are a primary target in oversight investigations of no-bid contracting.
The socioeconomic set-aside programs constrain competition to certified firms but are not considered sole-source for regulatory purposes. Statutory small business goals set by the Small Business Administration include:
- 23 percent of all prime contract dollars to small businesses overall. DoD historically falls short of this goal because classified programs and large platform acquisitions are structurally inaccessible to small firms.
- 5 percent to small disadvantaged businesses (SDB), the category that includes 8(a) firms. The 8(a) Business Development Program allows the SBA to enter sole-source contracts with 8(a) certified firms up to $4.5 million for products and services and $7.5 million for manufacturing without competition. The 8(a) program has a nine-year participation limit, after which firms must compete without set-aside protection.
- 3 percent to HUBZone certified firms. HUBZone (Historically Underutilized Business Zone) status requires the firm's principal office to be in a designated zone and at least 35 percent of its employees to reside in a HUBZone. The zone boundaries are updated periodically based on census data.
- 5 percent to women-owned small businesses (WOSB). WOSB set-asides are restricted to NAICS codes where women-owned firms are statistically underrepresented in federal contracting, as determined by an SBA study updated periodically. Economically disadvantaged WOSB (EDWOSB) firms face tighter income and asset caps and are eligible for sole-source awards.
- 3 percent to service-disabled veteran-owned small businesses (SDVOSB). The Department of Veterans Affairs additionally operates the Veterans First Contracting Program with a mandate to prioritize SDVOSB and veteran-owned firms above other small business categories in VA acquisitions.
The DATA Act financial linkage
Before the DATA Act, USASpending contained award-level records but lacked the financial systems context showing how each award related to the broader federal budget process. The DATA Act created this linkage by requiring agencies to connect their Treasury Account Symbol (TAS) data—the accounting codes that identify each appropriation—to individual award records.
The result is a chain from congressional appropriation through to individual contracts and grants. On USASpending today, any contract can be traced upward to the specific program account, budget function, and appropriation act that funded it. Federal agencies submit three types of financial data for this linkage: Appropriation Account data (TAS-level budget activity), Object Class data (spending by type of expense such as personnel, contracts, grants), and Program Activity data (spending by program as reported in the President's Budget). The SF-133 Report on Budget Execution—the standard federal agency financial report reconciling obligations and outlays—is the reference point for verifying that award-level data sums to agency-level financial statements.
This appropriation-to-outlay linkage enables analysis that was previously impossible from public data alone. A researcher can now see not just that Agency X awarded $500 million in contracts to Contractor Y, but that those contracts were funded from a specific Research, Development, Test and Evaluation (RDT&E) appropriation for Program Z, and can compare the obligated amount against the outlay amount to assess the pace at which funds are actually being spent versus merely committed.
Grants: HHS, NIH, and the research funding ecosystem
Grant data on USASpending covers both discretionary grants (subject to annual appropriations) and certain mandatory program grants (block grants and formula grants to states). The distinction matters: Medicaid federal matching payments are technically grants to state governments but are mandatory spending driven by statutory formulas rather than competitive grant-making.
The Department of Health and Human Services dominates the grant-making landscape. When Medicaid pass-through payments to states are included, HHS accounts for over $800 billion in grant and direct payment obligations per year. The National Institutes of Health, operating as a sub-agency of HHS, is the world's largest funder of biomedical research, obligating approximately $40 billion per year in research project grants (R01, R21, R03 series), training grants (T32, F31), and cooperative agreements (U01, UG3). NIH grant data is accessible both through USASpending and through NIH's own Research Portfolio Online Reporting Tools (RePORTER), which provides more granular project-level detail including abstracts, principal investigator information, and publication linkages.
The National Science Foundation obligates approximately $9 billion per year across research directorates covering biological sciences, computer and information science, engineering, geosciences, mathematical and physical sciences, and social and behavioral sciences. NSF awards are generally smaller than NIH awards and more concentrated in universities. The Department of Energy's Office of Science funds approximately $8 billion per year in R&D grants and cooperative agreements to national laboratories and universities.
Subaward reporting adds another layer to the grant picture. Prime award recipients (both contractors and grant recipients) are required under FFATA to report subawards of $30,000 or more to the FFATA Subaward Reporting System (FSRS). FSRS data is ingested into USASpending and allows researchers to trace the full distribution of federal funding below the prime award level—critical for understanding how federal research grants flow from universities to subrecipient institutions and how defense prime contractors distribute work through the supply chain.
Data access: API, bulk download, and FPDS direct
USASpending provides programmatic access through a documented REST API athttps://api.usaspending.gov/api/v2/. No API key is required. Key endpoints include:
/search/spending_by_award/: full-text and filter search returning individual award records. Supports filtering by award type, agency, recipient, NAICS, PSC, date range, geographic location, set-aside type, competition type, and award amount range. Paginated with a maximum of 10,000 total records per query (use bulk download for larger extracts)./search/spending_by_category/: aggregated spending totals grouped by a chosen dimension—recipient, awarding agency, funding agency, NAICS code, PSC code, or geographic level. More efficient than pulling individual records and summing for top-N analyses./bulk_download/awards/: initiates a bulk CSV download job for any filter set, returning a download URL once the job completes. Suitable for extracting multi-year contract histories for a specific contractor or all awards in a specific NAICS code./recipient/: recipient profile lookup by UEI, returning award totals by year and category for a specific entity./federal_accounts/: appropriation account-level spending data, enabling the budget-to-award linkage created by the DATA Act./agency/: agency-level spending profiles with breakdowns by award type, fiscal year, and budget function.
For contract data specifically, FPDS.gov offers direct query access going back to 2000 with an ATOM feed API and a web query interface. FPDS data is more current than USASpending (USASpending ingests FPDS with a 24 to 48 hour lag) but the query interface is less researcher-friendly and bulk export requires registration. SAM.gov provides entity registration data (UEI, CAGE code, NAICS codes, small business certifications), debarment and suspension records, and corporate hierarchy information useful for linking subsidiary and parent entity records in the USASpending contract data.
Limitations and data quality issues
USASpending is comprehensive but not complete. Several categories of spending are systematically absent or degraded:
Classified programs. The intelligence community's black budget runs approximately $65 billion per year across the National Intelligence Program and Military Intelligence Program. Classified contract records appear in FPDS in sanitized form—recipient names and descriptions redacted, amounts potentially aggregated—or are excluded entirely. The public data significantly undercounts spending by agencies such as the National Reconnaissance Office, National Security Agency, and classified elements of the Air Force and Army acquisition commands.
Intra-governmental transactions. When one federal agency pays another for goods or services (for example, the Defense Finance and Accounting Service paying the GSA for office space, or an agency paying the Department of Energy's national laboratories), these transactions may be recorded as interagency agreements rather than contracts and appear only partially in the public data.
Mandatory spending aggregation. Social Security, Medicare, and Medicaid payments appear at an aggregate level, not at the individual beneficiary level. Medicaid appears as federal matching payments to state governments rather than as individual recipient payments, because the states are the immediate recipients of federal Medicaid grants and make payments to individual providers and beneficiaries through their own systems.
Recipient identity issues. The DUNS-to-UEI transition in 2022 created linkage gaps in longitudinal analysis. Large corporate families— where a parent company like Lockheed Martin has dozens of subsidiary legal entities each with separate UEIs—are not automatically consolidated in USASpending. A query for “Lockheed Martin” by name will miss subsidiaries registered under different legal names unless the parent-subsidiary relationships in SAM.gov are explicitly traced. Address normalization quality is uneven, particularly for international contractors with non-standard address formats.
Description field quality. The contract description field is nominally required but quality ranges from highly specific (“manufacture and deliver 500 AN/PRC-158 multi-channel handheld radios”) to completely generic (“professional services” or “administrative support”) or simply blank. Free-text description quality is lower for classified programs, interagency acquisitions, and orders placed against existing vehicles where the vehicle description may substitute for a transaction-level description.
Python example: DoD top-20 prime contractors and small business regional distribution
The following script queries the USASpending API for FY2023 DoD prime contract awards. The first part uses the aggregatedspending_by_category endpoint to rank the top-20 prime contractors by obligated amount. The second part pulls small business set-aside awards from DoD and computes the percentage of the top-20 small business recipients in each of the four census regions (Northeast, Midwest, South, West), both by award count and by obligated dollar amount.
import requests
import pandas as pd
from collections import defaultdict
# ---------------------------------------------------------------------------
# USASpending.gov API: DoD FY2023 Prime Contractors + Small Business Regions
# Base URL: https://api.usaspending.gov/api/v2/
# No API key required. Rate-limit: generous, but paginate carefully.
# DoD toptier_code = "097"
# ---------------------------------------------------------------------------
BASE = "https://api.usaspending.gov/api/v2"
# Census regions by state abbreviation
CENSUS_REGIONS = {
"Northeast": {"CT", "ME", "MA", "NH", "RI", "VT", "NJ", "NY", "PA"},
"Midwest": {"IL", "IN", "MI", "OH", "WI", "IA", "KS", "MN", "MO",
"NE", "ND", "SD"},
"South": {"DE", "FL", "GA", "MD", "NC", "SC", "VA", "WV", "DC",
"AL", "KY", "MS", "TN", "AR", "LA", "OK", "TX"},
"West": {"AZ", "CO", "ID", "MT", "NV", "NM", "UT", "WY",
"AK", "CA", "HI", "OR", "WA"},
}
def state_to_region(state: str) -> str:
state = (state or "").upper().strip()
for region, states in CENSUS_REGIONS.items():
if state in states:
return region
return "Other/Unknown"
def fetch_dod_prime_contractors(
fiscal_year: int = 2023,
top_n: int = 20,
) -> pd.DataFrame:
"""
Pull top-N DoD prime contractors by obligated amount for a fiscal year.
Uses the /search/spending_by_category/ endpoint (aggregated by recipient).
Returns a DataFrame sorted descending by obligated_amount.
"""
payload = {
"filters": {
"award_type_codes": ["A", "B", "C", "D"], # all contract types
"agencies": [
{
"type": "awarding",
"tier": "toptier",
"toptier_code": "097", # Department of Defense
}
],
"time_period": [
{
"start_date": f"{fiscal_year - 1}-10-01",
"end_date": f"{fiscal_year}-09-30",
}
],
},
"category": "recipient",
"limit": top_n,
"page": 1,
"subawards": False,
}
resp = requests.post(
f"{BASE}/search/spending_by_category/",
json=payload,
timeout=60,
)
resp.raise_for_status()
results = resp.json().get("results", [])
rows = []
for item in results:
rows.append(
{
"recipient_name": item.get("name", ""),
"recipient_id": item.get("recipient_id", ""),
"obligated_amount": item.get("amount", 0) or 0,
}
)
df = pd.DataFrame(rows)
df["obligated_amount"] = pd.to_numeric(df["obligated_amount"], errors="coerce").fillna(0)
df = df.sort_values("obligated_amount", ascending=False).reset_index(drop=True)
df.index += 1 # 1-based rank
return df
def fetch_dod_small_business_contracts(
fiscal_year: int = 2023,
top_n: int = 20,
) -> list[dict]:
"""
Pull individual small-business set-aside contract awards from DoD for
the fiscal year. Returns award records with recipient state.
Uses /search/spending_by_award/ with a small-business set-aside filter.
Paginates until top_n records are collected.
"""
set_aside_codes = [
"SBA", # small business set-aside
"8A", # 8(a) sole source or competitive
"HZC", # HUBZone competitive
"HZS", # HUBZone sole source
"SBP", # small business partial set-aside
"VSA", # SDVOSB sole source
"VSB", # SDVOSB set-aside
"WOSB", # Women-Owned Small Business
"EDWOSB" # Economically Disadvantaged WOSB
]
payload = {
"filters": {
"award_type_codes": ["A", "B", "C", "D"],
"agencies": [
{
"type": "awarding",
"tier": "toptier",
"toptier_code": "097",
}
],
"time_period": [
{
"start_date": f"{fiscal_year - 1}-10-01",
"end_date": f"{fiscal_year}-09-30",
}
],
"set_aside_types": set_aside_codes,
},
"fields": [
"Award ID",
"recipient_name",
"Award Amount",
"recipient_location__state_code",
"type_of_set_aside",
"awarding_subtier_agency_name",
],
"sort": "Award Amount",
"order": "desc",
"limit": min(top_n, 100),
"page": 1,
"subawards": False,
}
awards = []
while len(awards) < top_n:
resp = requests.post(
f"{BASE}/search/spending_by_award/",
json=payload,
timeout=60,
)
resp.raise_for_status()
data = resp.json()
batch = data.get("results", [])
if not batch:
break
awards.extend(batch)
if len(awards) >= data.get("page_metadata", {}).get("count", 0):
break
payload["page"] += 1
return awards[:top_n]
def regional_distribution(awards: list[dict]) -> pd.DataFrame:
"""
Compute what percentage of the top-N small-business award recipients
are in each census region, weighted by obligated amount.
"""
region_totals: dict[str, float] = defaultdict(float)
region_counts: dict[str, int] = defaultdict(int)
for award in awards:
state = award.get("recipient_location__state_code") or ""
amount = award.get("Award Amount") or 0
region = state_to_region(state)
region_totals[region] += float(amount)
region_counts[region] += 1
total_amount = sum(region_totals.values()) or 1
total_count = sum(region_counts.values()) or 1
rows = []
for region in ["Northeast", "Midwest", "South", "West", "Other/Unknown"]:
amt = region_totals.get(region, 0)
cnt = region_counts.get(region, 0)
rows.append(
{
"region": region,
"award_count": cnt,
"pct_count": 100 * cnt / total_count,
"obligated_amount": amt,
"pct_dollars": 100 * amt / total_amount,
}
)
return pd.DataFrame(rows)
def print_top_contractors(df: pd.DataFrame, fiscal_year: int) -> None:
total = df["obligated_amount"].sum()
print(f"DoD FY{fiscal_year} Top-{len(df)} Prime Contractors by Obligated Amount")
print(f"Total (top-{len(df)}): ${total / 1e9:.1f}B")
print()
print(f" {'Rank':>4} {'Recipient':<50} {'Obligated ($B)':>15}")
print(" " + "-" * 78)
for rank, row in df.iterrows():
print(
f" {rank:>4} {row['recipient_name'][:50]:<50}"
f" ${row['obligated_amount'] / 1e9:>13.2f}"
)
print()
def print_regional_table(df: pd.DataFrame, top_n: int, fiscal_year: int) -> None:
print(
f"Regional Distribution of DoD FY{fiscal_year} Top-{top_n} "
f"Small Business Set-Aside Recipients"
)
print()
print(
f" {'Region':<16} {'# Awards':>9} {'% Awards':>9}"
f" {'$ Obligated':>14} {'% Dollars':>10}"
)
print(" " + "-" * 70)
for _, row in df.iterrows():
print(
f" {row['region']:<16} {int(row['award_count']):>9,}"
f" {row['pct_count']:>8.1f}%"
f" ${row['obligated_amount'] / 1e6:>12.1f}M"
f" {row['pct_dollars']:>9.1f}%"
)
print()
def main() -> None:
FY = 2023
TOP_PRIME = 20
TOP_SB = 20
print(f"--- Part 1: DoD Top-{TOP_PRIME} Prime Contractors (FY{FY}) ---")
prime_df = fetch_dod_prime_contractors(fiscal_year=FY, top_n=TOP_PRIME)
print_top_contractors(prime_df, FY)
print(f"--- Part 2: DoD Small Business Set-Aside Regional Distribution (FY{FY}) ---")
sb_awards = fetch_dod_small_business_contracts(fiscal_year=FY, top_n=TOP_SB)
print(f"Retrieved {len(sb_awards)} small-business set-aside awards.")
print()
region_df = regional_distribution(sb_awards)
print_regional_table(region_df, TOP_SB, FY)
if __name__ == "__main__":
main()
Typical FY2023 output for the top-20 prime contractors will show Lockheed Martin in first place at approximately $65 to $75 billion, RTX in second at $40 to $45 billion, and Boeing, General Dynamics, and Northrop Grumman rounding out the top five at $15 to $30 billion each. The top-20 combined will account for roughly $300 to $350 billion of DoD's total $412 billion in obligations.
For the small business regional distribution, the South typically leads in DoD small business set-aside award dollars because of the heavy concentration of military installations, defense corridors, and defense-focused small businesses in states like Virginia, Texas, Florida, Georgia, and Alabama. The Northeast (particularly the Boston-to-Washington corridor with its concentration of defense tech and cybersecurity firms) generally comes second. The West (California, Washington) follows due to aerospace and shipbuilding concentration. The Midwest typically receives the smallest share of DoD small business set-aside dollars despite a significant manufacturing base, reflecting the geographic skew of defense acquisition offices toward coastal and southern military hubs.
For the NIST National Vulnerability Database covering 250,000+ CVE entries with CVSS severity scores, CWE weakness classifications, CPE affected product data, and the CISA KEV catalog of confirmed-exploited vulnerabilities that federal civilian agencies must patch under BOD 22-01, including the NVD REST API and a Python walkthrough for Critical CVE analysis in 2024, see NIST NVD: The National Vulnerability Database Behind CVE Scoring and Cybersecurity Compliance (2026-11-23).
For the rulemaking process that governs federal acquisition regulations—including the FAR Part 6 competition requirements and the SBA small business goal regulations that structure DoD contracting—see Federal Register: The Official Rulemaking Journal Behind 90,000 Pages of Annual US Regulatory Activity, covering the APA notice-and-comment process, OIRA review, and the CFR structure that gives regulatory weight to federal procurement rules.
For campaign finance data that connects federal contractors to political spending— including PAC contributions and independent expenditures by defense contractors subject to the limits of federal election law—see FEC Committee Filings: The Campaign Finance Database Behind $14 Billion in Election Spending, covering committee types, the Citizens United era of Super PAC spending, and the OpenFEC API for programmatic access to contribution and expenditure records.
For the FMCSA crash data that covers the roughly 500,000 reportable commercial motor vehicle crashes per year—including the fatality statistics, the Large Truck Crash Causation Study, Hours of Service regulations, the CSA Safety Measurement System BASIC percentile scores, and roadside inspection out-of-service rates—see FMCSA Crash Data: The Federal Database Behind 5,000 Annual Large Truck Fatalities, covering the state-level fatality rate analysis, the ELD mandate data infrastructure, and a Python walkthrough of carrier-level crash lookup.