Developers
API keys aren't open yet. This page shows how they'll work; tell us if you'd like early access.
What a key reaches
Read-only data, no AI on our side, 1,000 calls a key a day (the count resets at 00:00 UTC). A key never reaches your pursuit desk, saved searches or account.
POST /planGET /codesGET /search/suggestGET /opportunitiesGET /recompetesGET /awardedGET /forecastsGET /few-biddersGET /award-sizeGET /award-size/GET /programGET /sbirGET /sbir/companyGET /rulesGET /councilGET /directory/GET /profile/GET /registrationGET /local/GET /earmarksGET /farGET /far/POST /mcpGET /mcpDELETE /mcp
Ask with a plan
The site turns questions into a plan (a small JSON: what to measure, how to group, which filters). Send a plan and get the rows, the SQL that ran and the caveats. The plan's fields are in the catalog the MCP connector's get_catalog tool returns.
curl -s https://api.spendquery.com/plan \
-H "Authorization: Bearer sqk_your_key" \
-H "content-type: application/json" \
-d '{"intent": "aggregate", "metric": "obligations", "group_by": ["recipient"],
"fiscal_years": [2025], "filters": [{"dimension": "agency", "values": ["Department of Energy"]}],
"limit": 10}'Lists
curl -s "https://api.spendquery.com/opportunities?naics=541512&limit=20" -H "X-API-Key: sqk_your_key" curl -s "https://api.spendquery.com/recompetes?months=12&min_value=1000000" -H "X-API-Key: sqk_your_key" curl -s "https://api.spendquery.com/sbir?agency=Department+of+Energy&phase=Phase+II" -H "X-API-Key: sqk_your_key" curl -s "https://api.spendquery.com/rules?area=far&kind=proposed" -H "X-API-Key: sqk_your_key"
MCP connector for AI assistants
Add SpendQuery as a remote MCP server in Claude, ChatGPT or any MCP client: URL https://api.spendquery.com/mcp, with your key as a bearer token. The assistant gets seven tools: get_catalog, search_codes, search_recipients, browse_codes, run_plan, search_far and get_far_section. It plans the question itself; SpendQuery runs the plan read-only, within a time limit, and every number comes with the SQL behind it.
Fair use
The data comes from public sources (USAspending.gov, SAM.gov, SBA, the Federal Register, state and local portals); cite them and SpendQuery. Don't share keys; revoke a key you no longer use. The terms apply. Where the numbers come from.