USASpending.gov API — Federal Spending Data
Query the official U.S. federal spending database — agencies, awards, contracts, grants, subawards, funding records, and recipients — all from a single REST endpoint. No Treasury credentials, no pagination gymnastics.
What Is USASpending.gov?
USASpending.gov is the official open data portal for U.S. federal spending, maintained by the Department of the Treasury. It tracks every dollar of federal spending — contracts, grants, loans, direct payments, and other financial assistance — that flows from government agencies to private recipients. The underlying API is the authoritative machine-readable window into that data, covering hundreds of thousands of federal awards annually. Anysite wraps that API into a clean, authenticated REST surface with consistent POST semantics: look up agencies by toptier code, search awards by keyword, trace funding account records by quarter, resolve recipients by UEI, and count award categories in a single call. All 11 endpoints are available via REST, CLI, MCP (Claude, Cursor, ChatGPT), and n8n nodes — no Treasury credentials or USASpending developer account required.
All USASpending Endpoints
Eleven endpoints across four categories: agencies, awards, autocomplete, and recipients. Every endpoint accepts POST requests authenticated with your Anysite access-token header.
| Endpoint | What It Returns |
|---|---|
POST /api/usaspending/agencies |
Agency overview by toptier code — name, abbreviation, mission, website, subtier count, DEF codes, and fiscal year budget summary |
POST /api/usaspending/agencies/search |
List of toptier agencies with outlay, obligation, and budget authority totals; filterable by name or abbreviation |
POST /api/usaspending/autocomplete |
Entity matches for a text prefix — agencies, recipients, NAICS codes, PSC codes, or CFDA programs |
POST /api/usaspending/awards |
Full award record by generated unique award ID — type, description, obligations, outlays, awarding/funding agency, recipient, period and place of performance, CFDA info, executive officers |
POST /api/usaspending/awards/funding |
Federal account funding records per fiscal quarter for an award — federal account, account title, transaction obligations, gross outlays, program activity, object class |
POST /api/usaspending/awards/search |
Awards matching keywords and award type codes — recipient name, award amount, award type, awarding agency, start/end dates, description |
POST /api/usaspending/awards/search/count |
Award counts by category (contracts, direct payments, grants, IDVs, loans, other) for a keyword filter — no full result set returned |
POST /api/usaspending/awards/subawards |
Subawards under a prime award — subaward number, description, action date, amount, recipient name |
POST /api/usaspending/awards/transactions |
Contract modifications (transactions) for an award — type, action date, action type, modification number, description, federal action obligation |
POST /api/usaspending/recipients |
Recipient profile by recipient ID (UUID-P/C/R) — name, UEI, DUNS, recipient level, parent hierarchy, business types, location, total spending and transaction count |
POST /api/usaspending/recipients/search |
Recipients ranked by total spending — name, UEI, DUNS, recipient level, amount; filterable by keyword and award type |
What You Can Build
Federal Contract Intelligence
Search awards by keyword and award type codes to surface active government contracts in your industry. Pull full award records to extract recipient names, agency paths, place of performance, and period details. Layer in transaction histories to track contract modifications and obligation changes over time — without scraping USASpending's web UI.
Recipient Due Diligence
Resolve a company name or UEI to its full recipient profile: parent/child hierarchy, registered business types, location, and lifetime federal spending. Cross-reference with subaward data to understand downstream pass-through relationships. Useful for supply-chain audits, vendor onboarding, and competitive intelligence on who wins government business.
Agency Budget Monitoring
Pull toptier agency overviews by code to track mission statements, DEF codes, and budget summaries. Use agency search to compare outlay amounts, obligation totals, and budget authority percentages across all federal departments. Feed the results into dashboards that update automatically as fiscal-year data refreshes upstream.
Grant & Assistance Discovery
Filter awards by grant type codes to find federal financial assistance programs in a topic area. Use keyword search with start_date and end_date to scope to a funding cycle, then count results by category before pulling full records. Autocomplete resolves CFDA program names to codes so you can build precise filters without memorizing program numbers.
Quick Start
All USASpending endpoints accept POST requests to https://api.anysite.io with your access-token header. Replace YOUR_KEY with your Anysite API key.
curl https://api.anysite.io/api/usaspending/awards/search \
-H "access-token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"keywords": ["cybersecurity"],
"award_type_codes": ["A","B","C","D"],
"count": 10,
"start_date": "2024-01-01"
}'
curl https://api.anysite.io/api/usaspending/agencies \
-H "access-token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"toptier_code": "097"}'
curl https://api.anysite.io/api/usaspending/awards/search/count \
-H "access-token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"keywords": ["renewable energy"],
"start_date": "2023-10-01",
"end_date": "2024-09-30"
}'
curl https://api.anysite.io/api/usaspending/recipients \
-H "access-token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"recipient_id": "b97d19b0-833c-8d8f-3a2c-157d04ea55ef-P"}'
curl https://api.anysite.io/api/usaspending/awards/subawards \
-H "access-token: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"award": "CONT_AWD_N0001920C0009_9700_-NONE-_-NONE-",
"count": 20
}'
Plans
Every endpoint is included in all Anysite plans — there's no per-endpoint pricing to track. Use MCP Unlimited for flat-rate access through your AI tools, or a credit plan for REST & CLI at scale.
Frequently Asked Questions
access-token header. There is no Treasury registration, no USASpending developer account, and no OAuth flow required.CONT_AWD_N0001920C0009_9700_-NONE-_-NONE- for contracts or ASST_NON_2405CA5MAP_075 for assistance awards. You obtain these IDs from the /api/usaspending/awards/search endpoint: search by keyword and award type codes, then use the id or internal_id fields from the results as your award identifier for the detail, funding, subaward, and transaction endpoints.097 for the Department of Defense, 012 for the Department of Agriculture, and 086 for HUD. You can look them up via the /api/usaspending/agencies/search endpoint (each result includes toptier_code), or you can use /api/usaspending/autocomplete with resolve_type: "agency" to resolve a name prefix to its code.["A","B","C","D"]. For grants and other financial assistance, use ["02","03","04","05"]. All codes within a single request must belong to the same group — mixing contract and grant codes in one call is not supported by the underlying API. To count across all award types without filtering, call /api/usaspending/awards/search/count without specifying award_type_codes./awards/search endpoint returns full award summaries — recipient names, amounts, agency paths, dates, descriptions — up to the count you specify. The /awards/search/count endpoint returns only integer totals broken down by category (contracts, grants, loans, IDVs, direct payments, other) for the same keyword filter. Use the count endpoint first to understand how many results exist in each category before deciding which type codes and count to pass to the full search.-P), Child (-C), and Recipient (-R). A parent is the top-level entity (e.g. a corporation), a child is a subsidiary or division that received awards directly, and the recipient level aggregates all spending for a UEI. The UUID portion is a hash derived from the entity's UEI or legacy DUNS. You obtain recipient IDs from the /api/usaspending/recipients/search endpoint, where each result includes its id with the level suffix.Related Endpoints
Start Querying Federal Spending Data
Get your API key and run your first USASpending query in minutes. All 11 endpoints are available on every plan — REST, CLI, and MCP.