Skip to content
Eden Engine

U.S. Federal Spending Ranked by Agency, Industry, Program, State or Country

usaspending/spending-by-category

Ranks U.S. federal award spending by one dimension, largest first, over a date window: awarding agency, awarding sub-agency, NAICS industry code, product or service code, assistance (grant) program, state or territory, or country. Optional filters: keywords, agencies, and award types (contracts, grants, loans, direct payments). Each row's amount is the net dollars obligated by transactions dated inside the window, on awards of any age; it is not an award's lifetime total and can be negative. One row with a null name is money the upstream could not attribute. Data is the U.S. Treasury's USAspending.gov (Bureau of the Fiscal Service).

activeper callv1

Price

$0.0026 per call

You pay the price shown. If a call turns out to cost more than its quote, you pay the actual price, capped at twice the quote. No monthly minimum. Top-ups start at $5.

Data source

USAspending.gov

Data from USAspending.gov, U.S. Department of the Treasury, Bureau of the Fiscal Service (usaspending.gov), available for commercial and non-commercial use per usaspending.gov/about.

Use it

Five steps: search, inspect, learn, run, settle. No per-tool setup; your agent reaches this tool through the meta-tools it already has.

Connect once and your AI can find and run this tool, and any other it needs.

agent
// 1. search: find the tool
omnial_search({ query: "what you need" })

// 2. inspect: price and input schema
omnial_inspect({ tool: "usaspending/spending-by-category" })

// 3. learn: read the usage guide at runtime
omnial_learn({ tool: "usaspending/spending-by-category" })

// 4. run: price the exact call first, then run it
omnial_execute({ tool: "usaspending/spending-by-category", input: { /* see input_schema */ }, dry_run: true })
omnial_execute({ tool: "usaspending/spending-by-category", input: { /* ... */ } })

// 5. settle: the call is charged when it finishes, nothing to do

Not connected yet? Point your MCP client at https://mcp.eden-engine.com/mcp, then copy a config for your client.

Pricing

Every charge this tool can incur.

ChargePrice
Per call
$0.0026
Updated
Oct 20, 2026

Input and output schemas

Input schema
input_schema.json
{
  "type": "object",
  "required": [
    "category",
    "start_date",
    "end_date"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "maximum": 10,
      "minimum": 1,
      "description": "Which page of `limit` rows to return, starting at 1, up to 10. page_metadata.hasNext says whether another page exists."
    },
    "limit": {
      "type": "integer",
      "default": 10,
      "maximum": 100,
      "minimum": 1,
      "description": "How many ranked rows to return per page, 1 to 100."
    },
    "agencies": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "type",
          "tier",
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "The agency's exact full name as USAspending spells it, for example National Aeronautics and Space Administration or Department of the Air Force. An abbreviation or inexact name matches nothing and returns an empty list."
          },
          "tier": {
            "enum": [
              "toptier",
              "subtier"
            ],
            "type": "string",
            "description": "toptier: a department or independent agency. subtier: a bureau or command inside one."
          },
          "type": {
            "enum": [
              "awarding",
              "funding"
            ],
            "type": "string",
            "description": "awarding: the agency that signed the award. funding: the agency whose money paid for it."
          }
        },
        "additionalProperties": false
      },
      "maxItems": 3,
      "minItems": 1,
      "description": "Restrict to awards by these agencies (any one matches). Leave out for every agency. The awarding agency of a result is in its Awarding Agency field, so names can be learned from one search."
    },
    "category": {
      "enum": [
        "awarding_agency",
        "awarding_subagency",
        "naics",
        "psc",
        "cfda",
        "state_territory",
        "country"
      ],
      "type": "string",
      "description": "What to rank. awarding_agency: departments and agencies. awarding_subagency: bureaus and commands. naics: industry of a contract. psc: product or service code of a contract. cfda: assistance program (Assistance Listing). state_territory: where the recipient is located. country: recipient country. naics and psc rank contracts, cfda ranks grants, loans and payments."
    },
    "end_date": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
      "description": "Last day of the window, YYYY-MM-DD. Must not be before start_date."
    },
    "keywords": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "minLength": 3
      },
      "maxItems": 5,
      "minItems": 1,
      "description": "Words or phrases matched against the award's description and recipient; an award matching any one counts (OR, not AND). Each at least 3 characters. Leave out for no keyword filter."
    },
    "start_date": {
      "type": "string",
      "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
      "description": "First day of the window, YYYY-MM-DD, compared to each transaction's action date. Not earlier than 2007-10-01. A U.S. fiscal year N runs 1 October of N-1 to 30 September of N, so fiscal year 2026 is 2025-10-01 to 2026-09-30."
    },
    "award_type_codes": {
      "type": "array",
      "items": {
        "enum": [
          "A",
          "B",
          "C",
          "D",
          "02",
          "03",
          "04",
          "05",
          "06",
          "07",
          "08",
          "09",
          "10",
          "11"
        ],
        "type": "string"
      },
      "maxItems": 14,
      "minItems": 1,
      "description": "Restrict to these award types: A BPA call, B purchase order, C delivery order, D definitive contract (the contract codes); 02 block grant, 03 formula grant, 04 project grant, 05 cooperative agreement; 06 direct payment, 07 direct loan, 08 guaranteed loan, 09 insurance, 10 direct payment with unrestricted use, 11 other assistance. Groups may be mixed here. Leave out for every type.",
      "uniqueItems": true
    }
  },
  "additionalProperties": false
}
Output schema
output_schema.json
{
  "type": "object",
  "required": [
    "category",
    "results",
    "page_metadata"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "description": "The page size applied."
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "amount"
        ],
        "properties": {
          "id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "USAspending's internal id; null for categories without one and for the unattributed row."
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's code: agency abbreviation, NAICS or PSC code, Assistance Listing number such as 93.778, two-letter state code, or three-letter country code. null on the unattributed row."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member's name. null on the unattributed row."
          },
          "amount": {
            "type": "number",
            "description": "Net dollars obligated by transactions dated inside the window. Can be negative (deobligations outweigh new obligations)."
          },
          "agency_slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "USAspending.gov page slug (agency categories)."
          },
          "total_outlays": {
            "type": [
              "number",
              "null"
            ],
            "description": "null on every row at the transaction level this tool uses."
          }
        },
        "additionalProperties": true
      },
      "description": "One row per category member, largest amount first. Empty when nothing matches."
    },
    "category": {
      "type": "string",
      "description": "The category ranked."
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Notices from USAspending: the 2007-10-01 search floor and a note that subawards are deprecated, on every call."
    },
    "page_metadata": {
      "type": "object",
      "required": [
        "page",
        "hasNext"
      ],
      "properties": {
        "next": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The next page number, or null."
        },
        "page": {
          "type": "integer",
          "description": "The page returned."
        },
        "hasNext": {
          "type": "boolean",
          "description": "True when a later page exists."
        },
        "previous": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The previous page number, or null."
        },
        "hasPrevious": {
          "type": "boolean",
          "description": "True when an earlier page exists."
        }
      },
      "additionalProperties": true
    },
    "spending_level": {
      "type": "string",
      "description": "Always transactions for this tool."
    }
  },
  "description": "USAspending's response: the ranked categories, largest amount first, and a paging block.",
  "additionalProperties": true
}