Technical writing

USASpending Contracts: The Federal Record of Every Dollar the Government Buys

· 12 min read· AI Analytics
USASpendingFederal ContractsFPDSProcurementFederal Data

Every time a federal agency buys something above the smallest purchase threshold—a fighter jet, a cybersecurity contract, a year of janitorial service, a box of pencils—a record is written. Aggregate those records and you have the single most complete account of how the United States government spends the money it does not simply hand out: who it pays, what it buys, which agency signed, whether the work was competed or handed to a sole source, and how many dollars were put on the line. USASpending.gov is where that account is published, and its contracts half—on the order of 100 million award and transaction records sourced from the Federal Procurement Data System—is the authoritative governmentwide procurement record.

This article covers what the USASpending contracts dataset is and the DATA Act mandate that requires it; the relationship between USASpending and FPDS-NG, the upstream system that actually captures every contract action; the prime-award schema and the load-bearing columns—the award PIID, the recipient Unique Entity ID, the obligated and potential dollar amounts, the NAICS and Product/Service codes, the place of performance, the competition status, the contract type, and the set-aside; the difference between an award and the transactions that modify it; who actually wins federal contracts and what concentration looks like; the 2022 transition from the DUNS number to the UEI and why it still complicates historical joins; how the contracts table joins to subawards, the SAM exclusions list, and entity data; a Python workflow that queries the USASpending award-search API and aggregates obligations by recipient and by competition status; and the caveats—modification accounting, reporting lag, and the gap between obligation and outlay—that every analyst must internalize before drawing conclusions.

What the dataset is

USASpending.gov is the federal government's official open-data source for how it spends money. It publishes prime-award data for the two great branches of federal outlay: financial assistance—grants, loans, direct payments, and insurance—and contracts, the money the government spends buying goods and services from the private sector. This article is about the contracts side. A federal contract is a procurement instrument: the government agrees to pay a vendor to deliver something, and unlike a grant, the government receives a good or a service in return. The contracts dataset is the row-by-row record of those procurement actions across the entire executive branch.

In our database this record is stored as the table usaspending_contracts, which holds federal contracts and grants on the order of 100 million award and transaction records. The grain is important and is discussed at length below: the file contains both awards (a contract, identified by its PIID) and the individual transactions that create and modify each award—the original signing plus every subsequent modification that adds money, exercises an option, or de-obligates funds. Each record carries who was paid, by whom, for what, where, how the work was acquired, and how much:

piid                        -- procurement instrument identifier (the award ID)
modification_number         -- which transaction this is on the award (0 = base)
awarding_agency             -- the department/agency that signed the contract
awarding_sub_agency         -- the bureau or command within the agency
recipient_name              -- the vendor that won the contract
recipient_uei               -- Unique Entity ID (replaced DUNS in 2022)
federal_action_obligation   -- dollars obligated by THIS transaction
total_obligated_amount      -- cumulative obligated dollars on the award
potential_total_value       -- base + all options (the ceiling, not the spend)
naics_code                  -- North American Industry Classification System
product_or_service_code     -- PSC: what is being bought (a good or a service)
place_of_performance        -- state/county/country where the work is done
type_of_contract_pricing    -- firm-fixed-price, cost-reimbursement, etc.
extent_competed             -- competed, not competed, set-aside
set_aside_type              -- small business, 8(a), HUBZone, SDVOSB, etc.

Two columns do the heaviest identity work. The piid—the procurement instrument identifier—is the award's key: it is the contract number that ties together the base signing and every modification, and it is the spine along which the obligated dollars accumulate over a contract's life. The recipient_uei is the vendor's key: the Unique Entity ID, a twelve-character alphanumeric identifier assigned through SAM.gov, identifies the firm that won the award and is the join key to entity registration data, to the subawards that firm passes downstream, and to the exclusions list that says who may not be paid at all. Between the PIID and the UEI, a single contract record answers the two questions that drive almost all procurement analysis: which award is this, and who is being paid?

The DATA Act mandate and where the data comes from

USASpending exists because Congress required it to. The lineage runs through two statutes. The first is the Federal Funding Accountability and Transparency Act of 2006 (FFATA), which directed the creation of a single, searchable, public website listing federal awards—the original USASpending.gov. FFATA established the principle that the public is entitled to see, in one place, who receives federal money. The second, and far more consequential for data quality, is the Digital Accountability and Transparency Act of 2014 (the DATA Act), which built on FFATA by requiring that federal spending data be standardized and published according to governmentwide data standards, and by extending the disclosure to link the agency-level account data to the award-level data. The DATA Act is why the contracts file is not a loose collection of agency reports but a standardized, structured dataset with consistent field definitions across the entire government.

The crucial architectural fact is that USASpending does not originate the contract data; it republishes it. The contracts portion is sourced from FPDS-NG—the Federal Procurement Data System, Next Generation—which is the system contracting officers actually use to record procurement actions. By regulation, every federal prime contract action above the micro-purchase threshold must be reported into FPDS, which makes FPDS the authoritative governmentwide record of federal procurement. (Purchases below the micro-purchase threshold, typically made on a government purchase card, are not individually reported, which is one of the dataset's natural floors.) USASpending pulls the contract data from FPDS, conforms it to the DATA Act standards, joins it to recipient and account information, and exposes it through a public website, an API, and bulk downloads. Understanding this two-layer arrangement matters for analysis: when a field is ambiguous or a value looks wrong, the definitive source is the FPDS data element dictionary, and the USASpending field is a (usually faithful) reflection of it.

Awards versus transactions: the grain of the data

The single most important thing to understand before computing anything from this dataset is the distinction between an award and a transaction, because getting it wrong is the most common way analysts double-count federal spending. A contract is not signed once and left alone. It is signed—the base action, modification number zero—and then it is modified, often many times: an option year is exercised, scope is added, funds are obligated incrementally, a de-obligation returns unspent money. Each of those actions is a separate transaction, and FPDS records each one as its own row.

This is why the file carries both a transaction-level dollar field (federal_action_obligation, the money obligated by that single transaction) and award-level cumulative fields (total_obligated_amount, the running total across all transactions on the PIID). It is also why the raw record count is so large—on the order of 100 million—relative to the number of distinct contracts: a long-running, frequently modified contract can contribute dozens of transaction rows. To measure how much the government spent in a period, you sum the transaction-level obligations for transactions in that period; to measure how big a contract is, you read the award-level cumulative total or the potential value. Summing award-level totals across transactions, or summing transaction obligations and treating the result as the number of contracts, both produce nonsense. The USASpending API helps by exposing distinct award-search and transaction-search endpoints, but the analyst still has to decide, deliberately, whether the question is about awards or about transactions before writing a single aggregation.

Obligated versus potential dollars

A second dollar distinction trips up nearly as many analyses: the gap between what a contract could be worth and what has actually been obligated against it. A federal contract frequently has a base period plus option years that the government may or may not exercise. The potential total value—sometimes called the base and all options value—is the ceiling: the maximum the government could pay if it exercises every option and the contract runs its full course. The obligated amount is the money the government has actually committed: funds it is legally on the hook to pay. These two numbers can differ by an order of magnitude. A multi-year indefinite-delivery vehicle might carry a potential ceiling in the billions while only a fraction has been obligated through the orders placed so far.

Confusing the two inflates headline numbers dramatically. Reporting a contract's potential ceiling as if it were spending is a recurring error in coverage of large defense awards, where the announced “value” is usually the ceiling on a vehicle that may be shared among several vendors and drawn down over a decade. And neither figure is the same as an outlay—cash actually disbursed from the Treasury. Obligation is the commitment; outlay is the payment; they are tracked separately and can be years apart. USASpending carries both the award obligations sourced from FPDS and, through the account-level data the DATA Act added, the outlay information, but the contracts award file is fundamentally an obligations record. An analyst who wants to say “the government spent X on Y” must be precise about whether X is a potential ceiling, an obligated commitment, or a cash outlay—three different numbers that answer three different questions.

NAICS, PSC, and competition: how the work was bought

Beyond who and how much, the contracts data records what was bought and how, and these classification fields are what make the dataset analytically rich. Two coding systems describe the subject of the contract. The NAICS code, from the North American Industry Classification System, classifies the industry of the procurement—aerospace product manufacturing, computer systems design, facilities support services. The Product or Service Code (PSC) classifies what is actually being acquired—a specific product, like an aircraft, or a specific service, like engineering support. The two are complementary: NAICS tells you the kind of firm doing the work, PSC tells you the kind of thing being delivered, and the PSC's leading character distinguishes products from services, the single most important cut in understanding the shape of federal buying.

The competition fields are where the data speaks to the integrity of the procurement system. The extent-competed field records whether an award was openly competed, competed under a restricted set of conditions, or not competed—a sole-source award. Competition is the default policy expectation; sole-source awards are permitted only under specified exceptions (a single responsible source, an unusual and compelling urgency, national security), and a contract action carries a justification when competition is not used. Because the field is on every record, an analyst can measure the competition rate—the share of obligated dollars that flowed through competed versus sole-source awards—and slice it by agency, by industry, or over time. Alongside competition sits the contract type (the pricing arrangement): a firm-fixed-price contract puts the cost risk on the vendor, while a cost-reimbursement contract puts it on the government, and the mix between them is itself a signal about how much risk the government is absorbing. Finally, the set-aside fields record whether an award was reserved for a small business or for a specific socioeconomic program—the 8(a) business development program, HUBZone firms, service-disabled veteran-owned small businesses, women-owned small businesses—which is how the government's small-business contracting goals are measured against actual dollars.

Who wins federal contracts

Aggregate the contracts file by recipient and a clear structure emerges. At the very top, year after year, sit the large defense prime contractors—Lockheed Martin, RTX (the former Raytheon), Boeing, General Dynamics, and Northrop Grumman—whose obligations dwarf those of almost every other vendor, reflecting the scale of weapons systems, aircraft, ships, and the sustainment contracts that keep them running. Behind the weapons primes is a second tier of large services and information-technology contractors— the systems integrators, professional-services firms, and IT providers that supply the government with software, consulting, logistics, and back-office services across every department. Together these two groups account for an outsized share of total obligated dollars.

This concentration is the central object of much procurement analysis. Because every award carries a recipient UEI and an obligated amount, an analyst can measure vendor concentration directly: the share of an agency's or an industry's obligations captured by its top five or top ten recipients, how that share has changed over time, and how it differs between sectors where many firms compete and sectors where a handful of primes dominate. The same data exposes spending surges—the run-ups in defense obligations around conflicts and buildups, and the extraordinary, fast-moving emergency procurement that accompanies a pandemic or a natural disaster, when agencies obligate large sums quickly and, frequently, with elevated rates of sole-source and limited-competition awards justified by urgency. Tracking who wins, in what concentration, under what competition status, and how that shifts during emergencies is exactly the kind of question the contracts file is built to answer and that no single award lookup can.

The UEI transition and joining to other data

The contracts table is most powerful when joined to the rest of the federal data ecosystem, and the recipient identifier is the hinge on which those joins turn—which is why the 2022 transition from the DUNS number to the UEImatters so much. For decades, federal recipients were identified by the DUNS number, a nine-digit identifier issued by a commercial vendor. In 2022 the government replaced it with the Unique Entity ID, a twelve-character identifier assigned and managed by the government itself through SAM.gov. The change was overdue and sensible, but it leaves a seam in the historical data: records before the changeover are keyed on DUNS, records after on UEI, and a crosswalk is required to follow a single firm across the boundary. Any longitudinal analysis that tracks a recipient over many years—or that joins old contracts to newer ones—must account for the transition rather than assuming a single stable identifier runs the whole way through.

With the identifier in hand, three joins matter most. The first is to subawards. A prime contractor frequently subcontracts part of the work, and FFATA requires prime recipients above a threshold to report their first-tier subawards. Joining the prime contracts table to the subawards data on the prime award ID is what lets an analyst follow a federal dollar past the prime vendor to the subcontractors actually doing the work—the difference between knowing who the government paid and knowing where the money ultimately went. The second join is to the SAM exclusions list. Joining the contracts file to exclusions on the recipient UEI (with name fallback) lets an analyst test the integrity check at the heart of procurement: was any award made to a party while it was barred from federal business? That cross-dataset audit is exactly what oversight bodies perform, and it is one of the clearest demonstrations of why these datasets are more valuable joined than apart. The third join is to entity registration data, which supplies the recipient's parent company, business-size determination, socioeconomic categories, and location—the attributes needed to roll subsidiary awards up to a corporate parent and to verify that small-business set-asides reached firms that actually qualify.

Analytical uses

A complete, standardized, governmentwide record of federal procurement supports a distinctive set of analyses that no single contract or agency report can.

Vendor and market concentration is the most immediate use: ranking recipients by obligated dollars within an agency, an industry, or a product category, and measuring how much of the spending the largest firms capture. This is how one distinguishes a genuinely competitive market with many vendors from one dominated by a few primes, and how one tracks consolidation as defense and services firms merge. Competition analysis exploits the extent-competed and set-aside fields to measure the share of dollars competed versus sole-sourced, by agency and over time, and to test whether small-business goals are being met in dollars rather than merely in policy. Spikes in sole-source awards—during an emergency, or concentrated in one office—are a recognizable oversight signal.

Spending surges and emergency procurement bring the time dimension to bear: tracking obligations by industry and agency through a defense buildup or a disaster reveals how fast money moves, which vendors absorb it, and how competition discipline holds (or does not) under urgency. And follow-the-money tracing combines the joins: starting from an agency's prime contracts, descending through subawards to the subcontractors, and screening every recipient against the exclusions list produces a picture of where a program's dollars actually land and whether any of them reached a barred party. Each of these requires treating the contracts file as a dataset to be aggregated and joined, not a registry to be looked up one award at a time.

Python workflow: obligations by recipient and competition from the USASpending API

The script below queries the USASpending award-search API for contract awards in a chosen industry (by NAICS prefix) and fiscal year, pages through the results, and computes two of the core metrics: obligations by recipient—with the top-five recipient share as a quick concentration gauge—and obligations by awarding agency. No API key is required for public data. The endpoint accepts a structured filter object (agency, recipient, NAICS, time period, award-type codes) and returns one row per prime award; the award-type codes A through D select contract awards (BPA calls, purchase orders, delivery orders, and definitive contracts), and the IDV codes select the indefinite-delivery vehicles those orders draw against. For competition analysis the same filter object accepts an extent-competed filter, and for transaction-level spending totals the parallel transaction-search endpoint should be used so that obligations are summed at the right grain.

import requests
import pandas as pd
from collections import defaultdict

# USASpending award-search API -- the official open-data record of how the
# federal government spends money. No API key is required for public data.
#
# The award-search "spending_by_award" endpoint accepts a filter object
# (agency, recipient, NAICS, time period, award type) and returns one row
# per prime award. The contract award-type codes are A (BPA call),
# B (purchase order), C (delivery order), and D (definitive contract); the
# indefinite-delivery vehicles those orders draw against are the separate
# IDV codes (IDV_A ... IDV_E).
BASE = "https://api.usaspending.gov/api/v2"
CONTRACT_TYPES = ["A", "B", "C", "D"]


def search_awards(filters, fields, page_limit=100, max_pages=50):
    # Page through spending_by_award until the API stops returning a next page.
    url = f"{BASE}/search/spending_by_award/"
    rows, page = [], 1
    while page <= max_pages:
        body = {
            "filters": filters,
            "fields": fields,
            "page": page,
            "limit": page_limit,
            "sort": "Award Amount",
            "order": "desc",
        }
        r = requests.post(url, json=body, timeout=120)
        r.raise_for_status()
        payload = r.json()
        batch = payload.get("results", [])
        rows.extend(batch)
        if not payload.get("page_metadata", {}).get("hasNext"):
            break
        page += 1
    return pd.DataFrame(rows)


def naics_contracts(naics_prefix, fy_start, fy_end):
    # Pull contract awards whose NAICS starts with the given prefix.
    filters = {
        "award_type_codes": CONTRACT_TYPES,
        "naics_codes": [naics_prefix],
        "time_period": [{"start_date": fy_start, "end_date": fy_end}],
    }
    fields = [
        "Award ID", "Recipient Name", "Awarding Agency",
        "Award Amount", "NAICS", "Contract Award Type",
    ]
    return search_awards(filters, fields)


def analyze(naics_prefix, fy_start, fy_end):
    df = naics_contracts(naics_prefix, fy_start, fy_end)
    if df.empty:
        print("No contract awards returned for that filter.")
        return
    df["Award Amount"] = pd.to_numeric(df["Award Amount"], errors="coerce")
    total = df["Award Amount"].sum()
    print(f"Contracts returned: {len(df):,}   Total: ${total:,.0f}")

    # --- 1. Obligations by recipient (vendor concentration) -------------
    by_recip = df.groupby("Recipient Name")["Award Amount"].sum()
    by_recip = by_recip.sort_values(ascending=False)
    top5_share = by_recip.head(5).sum() / max(total, 1)
    print(f"Top-5 recipient share of obligations: {top5_share:.1%}")
    for name, amt in by_recip.head(8).items():
        print(f"  {str(name)[:40]:<40} ${amt:,.0f}")

    # --- 2. Obligations by awarding agency ------------------------------
    by_agency = df.groupby("Awarding Agency")["Award Amount"].sum()
    print("\nTop awarding agencies:")
    for name, amt in by_agency.sort_values(ascending=False).head(5).items():
        print(f"  {str(name)[:40]:<40} ${amt:,.0f}")
    return df


analyze("3364", "2024-10-01", "2025-09-30")  # 3364 = aerospace manufacturing

Two practical notes apply. First, the award-search endpoint returns award-level rows, which is the right grain for a concentration question—how obligated dollars are distributed across recipients—but it is the wrong grain for a “how much was obligated in fiscal year X” question, which must sum transaction obligations dated within the period; mixing the two is the double-counting trap described earlier. Second, for national-scale work—ranking every recipient across all agencies, building the full subaward-and-exclusions trace, or computing competition rates over a decade—the USASpending bulk download files (the agency and award archives, and the FPDS bulk extracts) are far more efficient than paging through tens of thousands of API responses and ship with the authoritative, version-stamped field definitions. The API is ideal for targeted questions; the bulk files are the tool for the full picture.

Limitations and analytical caveats

The contracts file is the most complete public record of federal procurement, but it carries structural limitations an analyst must internalize before drawing conclusions.

Modifications make naive sums wrong. The award-versus- transaction distinction is not a fine point; it is the difference between a correct and an incorrect number. Because a single contract spawns many transaction rows—each adding, exercising, or de-obligating funds—summing the wrong field, or summing across the wrong grain, double-counts or omits money. A de-obligation carries a negative obligation that must be netted in, not dropped. Any spending total must be built deliberately from transaction-level obligations within a defined period, or from award-level cumulative totals, never from a mixture. This is the most common and most consequential mistake made with the dataset.

Obligation is not outlay, and ceiling is not spend.The contracts award file records obligations—commitments—not cash disbursed, and it records potential ceilings that may never be reached. Treating a contract's potential value as spending overstates by however much of the ceiling goes unexercised, and treating obligations as cash out the door confuses commitment with payment. The three numbers—potential value, obligated amount, and outlay—answer three different questions, and a claim about “federal spending” is only as precise as the analyst is about which one it rests on.

There is reporting lag and a micro-purchase floor. A contract action has to be entered into FPDS by the contracting office and then flow through to USASpending, so the most recent weeks and months are systematically under-represented in any snapshot, and figures for the current period are revised upward as late reports arrive. Below the micro-purchase threshold, purchases—typically made on a government purchase card—are not individually reported at all, so the dataset is silent on a long tail of small buys. The contracts file is authoritative for established patterns and multi-year trends; it is not a real-time monitor of last week's buying, and it is not a complete account of the very smallest transactions.

Recipient identity needs care. The UEI is a clean key for an individual registered entity, but corporate reality is messier: a parent company wins awards through dozens of subsidiaries, each with its own UEI, so measuring how much a corporate family captures requires rolling subsidiary UEIs up to the parent, which the raw file does not do for you. Add the DUNS-to-UEI transition for any analysis crossing 2022, and the free-text recipient-name variation that complicates name-based joins, and recipient resolution becomes the single most error-prone step in serious procurement analysis. The entity-registration join helps, but the analyst still has to decide what counts as one vendor.

Held with these caveats in mind, the usaspending_contracts table is a uniquely valuable resource: a standardized, governmentwide, transaction-resolved record of the money the United States government commits to buying goods and services—every prime contract action above the micro-purchase threshold, keyed to the firm that won it and the agency that signed it, carrying what was bought, how it was competed, and how many dollars were put on the line. It is the public's clearest window into the half of federal spending that buys something in return.

Related writing

USASpending Subawards: The Federal Database Behind Sub-Grant and Sub-Contract Flow Tracking — The downstream companion to the prime-contracts file: joining prime awards to the subawards their recipients report is what lets an analyst follow a federal dollar past the prime vendor to the subcontractors actually doing the work.

SAM Exclusions and Debarments: The Federal List of Who Cannot Win Government Contracts — The integrity check on the spending pipeline: joining the contracts file to the exclusions list on the recipient UEI is exactly how oversight bodies test whether any award reached a party that was barred from federal business.

SBA Loan Programs: The Federal Database Behind $50 Billion in Annual Small Business Financing — Where contracts measure the dollars the government spends buying from small businesses, the SBA loan data measures the financing it extends to them, the two sides of how federal policy reaches the small-business economy.