optional-skills/research/osint-investigation/references/sources/usaspending.md
USAspending.gov is the official source of federal spending data. Coverage: contracts, grants, loans, direct payments, sub-awards. Required by the DATA Act of 2014 — all federal agencies must report to a single schema.
https://api.usaspending.gov/api/v2/ (no auth, no key)https://files.usaspending.gov/ (CSV / Parquet by award type)Key fields emitted by fetch_usaspending.py (prime awards):
| Column | Type | Description |
|---|---|---|
award_id | str | Federal award ID (PIID for contracts, FAIN for grants) |
recipient_name | str | Awardee legal name |
recipient_uei | str | Unique Entity Identifier (replaced DUNS in 2022) |
recipient_duns | str | Legacy DUNS number (historical only) |
recipient_parent_name | str | Ultimate parent organization |
recipient_state | str | Recipient state |
awarding_agency | str | Department / agency name |
awarding_sub_agency | str | Sub-tier (e.g. DoD → Army) |
award_type | str | Contract / Grant / Loan / Direct Payment |
award_amount | float | Current total obligation in USD |
award_date | str | Action / signed date YYYY-MM-DD |
period_of_performance_start | str | YYYY-MM-DD |
period_of_performance_end | str | YYYY-MM-DD |
naics_code | str | Industry classification |
psc_code | str | Product / Service Code |
competition_extent | str | Full / limited / sole-source |
description | str | Award description (free-text) |
recipient_name (public companies as contractors)recipient_name (lobbying clients winning contracts)recipient_name (sanctions screening of contractors — must be
filtered out by SAM.gov but verify)recipient_name (offshore-linked contractors)Join key: normalized recipient name. UEI is canonical when present.
competition_extent field is free-text in older records — fetch_usaspending.py
normalizes to canonical valuesentity_resolution.py.Path: scripts/fetch_usaspending.py
# By recipient name
python3 SKILL_DIR/scripts/fetch_usaspending.py --recipient "EXAMPLE CORP" \
--fy 2024 --out data/contracts.csv
# By awarding agency
python3 SKILL_DIR/scripts/fetch_usaspending.py --agency "Department of Defense" \
--fy 2024 --out data/contracts.csv
# Filter to sole-source only
python3 SKILL_DIR/scripts/fetch_usaspending.py --recipient "EXAMPLE CORP" \
--fy 2024 --sole-source-only --out data/contracts.csv