API & MCP

Everything a person can do on Public Spending Explorer, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Public Spending Explorer

Searches US federal awards on USAspending.gov (contracts, IDVs, grants, other assistance) or EU contract award notices on TED, then totals the results per agency/buyer and per recipient and draws the agency → recipient relationship graph. Paste a saved API response to analyse it offline.

Inputs of Public Spending Explorer
FieldTypeDefaultDescription
sourceselect (usaspending, ted, pasted)"usaspending"Data source
keywordtext—Keyword. Full-text keyword (award description / notice text).
recipienttext—Recipient / vendor name. Optional. USAspending: recipient_search_text; TED: winner-name contains.
awardTypeselect (contracts, idvs, grants, other_financial_assistance)"contracts"Award type (USAspending)
startDatedate—From. Default: 365 days before today.
endDatedate—To. Default: today.
buyerCountrytext—Buyer country (TED, ISO 3166 alpha-3)
limitinteger50Max results
pastedJsontextarea—Pasted JSON response. Response of USAspending POST /api/v2/search/spending_by_award/ or TED POST /v3/notices/search.

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "public-spending-explorer": { "type": "http", "url": "https://publicspendingexplorer.usefulweb.site/mcp" }
  }
}