← clify home · catalogue · Open government data APIs for AI agents
usaspending API for agents (unofficial) — JSON over curl
USAspending.gov is the official U.S. federal spending database. This CLI calls its public API (api.usaspending.gov, no auth needed) to search awards and transactions, open award, recipient, agency, state and federal-account profiles, break spending down by category, and request bulk downloads.
Host: usaspending.gov. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Start with San Francisco and U.S. agent tasks: events, startup jobs, BART and Muni departures, Craigslist listings, local news, public datasets and prediction markets. Example: curl 'https://clify-dev.netlify.app/search?q=SF+tech+events'. Responses are one JSON object. The hosted MCP and GitHub repo are also available.
Machine-readable command schema · Source website
Commands
search-transactions
Keyword search of contract transactions (award types A/B/C/D), with sorting and paging Params: keyword*, sort, order, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/search-transactions?keyword=cybersecurity&sort=Action+Date&order=desc'
count-keyword-transactions
Count transactions matching a keyword, broken out by award group (contracts, grants, idvs, loans, direct_payments, other) Params: keyword* Read-only
curl 'https://clify-dev.netlify.app/usaspending/count-keyword-transactions?keyword=cybersecurity'
summarize-keyword-spending
Total prime award count and obligated amount for a keyword search Params: keyword* Read-only
curl 'https://clify-dev.netlify.app/usaspending/summarize-keyword-spending?keyword=cybersecurity'
search-state-awards
Top contract awards performed in a U.S. state within a date range, sorted by award amount Params: state*, start_date, end_date, order, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/search-state-awards?state=CA&start_date=2025-10-18&end_date=2026-10-18'
list-federal-account-awards
Contract awards funded by a federal account (agency id + main account code), sorted by award amount Params: aid*, main*, order, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-federal-account-awards?aid=017&main=1804'
get-award
Full details of one award: amounts, dates, parent IDV, recipient, place of performance, contract data Params: award_id* Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-award?award_id=CONT_AWD_47QFRA24F0012_4732_47QTCK18D0047_4732'
count-award-children
Count an award's transactions, subawards, or funding federal accounts Params: kind*, award_id* Read-only
curl 'https://clify-dev.netlify.app/usaspending/count-award-children?kind=subaward&award_id=CONT_AWD_W52P1J22C0023_9700_-NONE-_-NONE-'
list-award-federal-accounts
Federal accounts that funded an award, with obligated amounts and funding agency Params: award_id*, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-award-federal-accounts?award_id=CONT_AWD_47QFRA24F0012_4732_47QTCK18D0047_4732'
get-recipient
Recipient profile: name, UEI/DUNS, parents, business types, location, and transaction totals for a year Params: recipient_id*, year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-recipient?recipient_id=fefa9485-36e4-9820-72ad-356e6028032e-C'
recipient-spending-by-category
Top breakdown of a recipient's obligations by agency, sub-agency, NAICS, PSC, CFDA, federal account, country or state Params: category*, recipient_id*, start_date, end_date, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/recipient-spending-by-category?category=awarding_agency&recipient_id=fefa9485-36e4-9820-72ad-356e6028032e-C'
recipient-spending-over-time
A recipient's obligations per fiscal year, quarter or month, split by award type Params: recipient_id*, group, start_date, end_date Read-only
curl 'https://clify-dev.netlify.app/usaspending/recipient-spending-over-time?recipient_id=fefa9485-36e4-9820-72ad-356e6028032e-C'
recipient-new-awards-over-time
Count of new awards to a recipient per fiscal year, quarter or month Params: recipient_id*, group, start_date, end_date Read-only
curl 'https://clify-dev.netlify.app/usaspending/recipient-new-awards-over-time?recipient_id=fefa9485-36e4-9820-72ad-356e6028032e-C'
get-state-profile
State spending profile: population, income, total prime award amount and count, per-capita amount Params: fips*, year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-state-profile?fips=06&year=2026'
get-state-awards-by-type
A state's prime award amounts and counts by award type (contracts, grants, loans, direct payments, other) Params: fips*, year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-state-awards-by-type?fips=06'
state-spending-by-category
Top breakdown of spending performed in a state by recipient, county, congressional district, agency, NAICS, PSC or CFDA Params: category*, state*, start_date, end_date, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/state-spending-by-category?category=county&state=CA'
state-spending-over-time
Transaction obligations performed in a state per fiscal year, quarter or month Params: state*, group, start_date, end_date Read-only
curl 'https://clify-dev.netlify.app/usaspending/state-spending-over-time?state=CA'
state-spending-by-geography
Map data: spending in a state per county or congressional district, with population and per-capita amount Params: state*, geo_layer, scope, start_date, end_date Read-only
curl 'https://clify-dev.netlify.app/usaspending/state-spending-by-geography?state=CA'
list-agencies
All top-tier federal agencies with toptier_code, slug, budget authority, obligations and outlays Params: sort, order Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-agencies?sort=agency_name&order=asc'
get-agency
Agency overview for a fiscal year: name, mission, website, sub-tier count, disaster codes Params: toptier_code*, fiscal_year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-agency?toptier_code=097&fiscal_year=2026'
get-agency-award-summary
An agency's award transaction count, total obligations and latest action date for a fiscal year Params: toptier_code*, fiscal_year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-agency-award-summary?toptier_code=097&fiscal_year=2026'
get-agency-new-award-count
Number of new awards an agency made in a fiscal year Params: toptier_code*, fiscal_year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-agency-new-award-count?toptier_code=097&fiscal_year=2026'
get-agency-obligations-by-category
An agency's award obligations for a fiscal year split by category (contracts, grants, loans, ...) Params: toptier_code*, fiscal_year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-agency-obligations-by-category?toptier_code=097&fiscal_year=2026'
list-agency-sub-agencies
An agency's sub-agencies and their offices, with obligations, transaction counts and new award counts Params: toptier_code*, fiscal_year, sort, order, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-agency-sub-agencies?toptier_code=097&fiscal_year=2026'
list-agency-sub-components
An agency's budgetary sub-components (bureaus) with obligations, outlays and budgetary resources Params: toptier_code*, fiscal_year, page Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-agency-sub-components?toptier_code=097&fiscal_year=2026'
get-agency-budgetary-resources
An agency's budgetary resources, obligations and outlays per fiscal year, with obligations by period Params: toptier_code* Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-agency-budgetary-resources?toptier_code=097'
list-federal-accounts
List or keyword-search federal (Treasury) accounts for a fiscal year, sorted by budgetary resources Params: keyword, fy, sort, direction, page, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-federal-accounts?keyword=Navy'
get-federal-account
Federal account details by account number (agency-main, e.g. 017-1804): title, parent agency, bureau, totals and child Treasury accounts for a fiscal year Params: account_number*, fiscal_year Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-federal-account?account_number=017-1804&fiscal_year=2026'
get-federal-account-fy-snapshot
A federal account's budgetary resources, obligations, outlays and balances for one fiscal year Params: account_id*, fiscal_year* Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-federal-account-fy-snapshot?account_id=4175&fiscal_year=2026'
request-award-download
Start a bulk CSV download job of prime award transactions matching a keyword; returns file_name for get-download-status Params: keyword* Read-only
curl 'https://clify-dev.netlify.app/usaspending/request-award-download?keyword=cybersecurity'
get-download-status
Check a bulk download job; when status is 'ready', file_url points to the zip Params: file_name* Read-only
curl 'https://clify-dev.netlify.app/usaspending/get-download-status?file_name=PrimeTransactions_2026-10-18_H07M18S08454046.zip'
autocomplete-awarding-agency
Find awarding agencies and sub-agencies by partial name Params: search_text*, api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/autocomplete-awarding-agency?search_text=Energy'
list-states
States and territories with FIPS code, postal code and name (FIPS is used by the state profile commands) Params: none Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-states'
list-def-codes
Disaster Emergency Fund (DEFC) codes with public law, title and disaster type Params: none Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-def-codes'
list-glossary
USAspending glossary of spending terms with plain-language and official definitions Params: api_limit Read-only
curl 'https://clify-dev.netlify.app/usaspending/list-glossary'
Related task guides and sites
Continue with Open government data APIs for AI agents or explore related sources:
data.gov.uk
data.gov.uk (National Data Library): the UK government's open data directory. The CLI searches and reads dataset metadata through the public CKAN JSON API, lists data files and previews from dataset pages, and browses the curated theme collections and their chart data.
Machine-readable commands · 9 verified commands
data.cdc.gov
data.cdc.gov is the CDC's open-data portal (Socrata). This CLI searches the dataset catalog, lists categories and tags, reads dataset metadata, and queries or exports dataset rows through the public Socrata Discovery, SODA and views APIs.
Machine-readable commands · 10 verified commands
data.cityofnewyork.us
NYC Open Data (Socrata catalog at data.cityofnewyork.us). The CLI searches the dataset catalog by keyword, tag, category and sort order; reads dataset metadata and columns; runs SoQL queries against rows; exports CSV; and lists change history and attachments. It needs no login.
Machine-readable commands · 8 verified commands