# USAspending API

> USAspending returns federal awards, company obligations, and agency spending as a workflow and API.

Search federal awards by keyword; optionally choose an agency, state, award type, date range, sorting, and result count. Get agency budgets, obligations, leading recipients, spending categories, and award counts; enter an agency and optionally choose a fiscal year.

- Page: https://fous.com/workflows/usaspending
- Handle: `@usaspending`
- Category: [Government](https://fous.com/workflows/category/government)
- Source website: https://usaspending.gov
- Last verified: Sep 29, 2026
- Fous is not affiliated with USAspending.

## Methods

### Get agency spending

Operation `get_agency_spending`, version 1. 1 credit per call.

Get a federal agency’s fiscal-year budgetary resources, obligations, share of federal obligations, new award count, leading award recipients, and spending classes. Recipient amounts cover published awards; account obligations also include spending not tied to awards. The data date is the latest published award-data update; account reporting may lag.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `agency` | string | yes | `"Department of Defense"` | Federal agency name or common abbreviation, for example NASA or Department of Defense. |
| `fiscal_year` | integer | no | `2025` | Federal fiscal year, for example 2025. Defaults to the latest year with agency data. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "agency"
  ],
  "properties": {
    "agency": {
      "type": "string",
      "description": "Federal agency name or common abbreviation, for example NASA or Department of Defense.",
      "examples": [
        "Department of Defense",
        "NASA"
      ]
    },
    "fiscal_year": {
      "type": "integer",
      "description": "Federal fiscal year, for example 2025. Defaults to the latest year with agency data.",
      "examples": [
        2025
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "agency": "Department of Defense",
      "fiscal_year": 2025
    },
    {
      "agency": "NASA"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `as_of_date` | string | `"2026-09-28"` |  |
| `agency_code` | string | `"097"` |  |
| `agency_link` | string | `"https://www.usaspending.gov/agency/department-of-defense"` |  |
| `agency_name` | string | `"Department of Defense"` |  |
| `fiscal_year` | integer | `2025` |  |
| `top_recipients` | array |  |  |
| `top_recipients[].name` | string | `"LOCKHEED MARTIN CORPORATION"` |  |
| `top_recipients[].page_link` | string or null | `"https://www.usaspending.gov/recipient/6cf5fb1b-4988-d087-5dc1-70939d8fc6c4-C/latest"` |  |
| `top_recipients[].amount_usd` | number | `34088390516.22` |  |
| `number_of_awards` | integer | `3882326` |  |
| `total_obligations_usd` | number | `1451320548889.53` |  |
| `top_spending_categories` | array |  |  |
| `top_spending_categories[].name` | string | `"Benefits for former personnel"` |  |
| `top_spending_categories[].page_link` | string or null | `"https://www.usaspending.gov/agency/department-of-defense"` |  |
| `top_spending_categories[].amount_usd` | number | `262479472111.13` |  |
| `total_budgetary_resources_usd` | number | `2213230963902.27` |  |
| `share_of_federal_obligations_percent` | number | `14.3318` |  |

**Example input**

```json
{
  "agency": "Department of Defense",
  "fiscal_year": 2025
}
```

**Example output**

```json
{
  "as_of_date": "2026-09-28",
  "agency_code": "097",
  "agency_link": "https://www.usaspending.gov/agency/department-of-defense",
  "agency_name": "Department of Defense",
  "fiscal_year": 2025,
  "top_recipients": [
    {
      "name": "LOCKHEED MARTIN CORPORATION",
      "page_link": "https://www.usaspending.gov/recipient/6cf5fb1b-4988-d087-5dc1-70939d8fc6c4-C/latest",
      "amount_usd": 34088390516.22
    },
    {
      "name": "ELECTRIC BOAT CORPORATION",
      "page_link": "https://www.usaspending.gov/recipient/d5ab5f51-db3a-a26f-96a1-1b24c3e2802c-C/latest",
      "amount_usd": 21366142819.4
    },
    {
      "name": "RAYTHEON COMPANY",
      "page_link": "https://www.usaspending.gov/recipient/01c4a3a3-b4c5-ce4e-822b-d17f09985001-C/latest",
      "amount_usd": 10753486398.51
    }
  ],
  "number_of_awards": 3882326,
  "total_obligations_usd": 1451320548889.53,
  "top_spending_categories": [
    {
      "name": "Benefits for former personnel",
      "page_link": "https://www.usaspending.gov/agency/department-of-defense",
      "amount_usd": 262479472111.13
    },
    {
      "name": "Equipment",
      "page_link": "https://www.usaspending.gov/agency/department-of-defense",
      "amount_usd": 195427216144.42
    },
    {
      "name": "Supplies and materials",
      "page_link": "https://www.usaspending.gov/agency/department-of-defense",
      "amount_usd": 155628353863.18
    }
  ],
  "total_budgetary_resources_usd": 2213230963902.27,
  "share_of_federal_obligations_percent": 14.3318
}
```

### Get company federal awards

Operation `get_company_federal_awards`, version 1. 1 credit per call.

Federal obligations and distinct awards for a company or organization and its parent and child recipient records. Amounts by type and agency reflect obligations during the selected fiscal year(s); recent award amounts are each award’s total obligations. Figures can include negative adjustments, and reporting may be revised.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `recipient` | string | yes | `"Johns Hopkins University"` | Company or organization name, for example Lockheed Martin. |
| `award_type` | string | no | `"grants"` | Award category, for example grants; contracts include IDVs and other includes direct payments. |
| `max_recent` | integer | no | `3` | Maximum recent awards, for example 10. |
| `fiscal_year` | string | no | `"2024"` | Federal fiscal year, for example 2025; use all for the last five complete fiscal years. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "recipient"
  ],
  "properties": {
    "recipient": {
      "type": "string",
      "description": "Company or organization name, for example Lockheed Martin.",
      "examples": [
        "Johns Hopkins University",
        "Lockheed Martin"
      ]
    },
    "award_type": {
      "enum": [
        "all",
        "contracts",
        "grants",
        "loans",
        "other"
      ],
      "type": "string",
      "default": "all",
      "description": "Award category, for example grants; contracts include IDVs and other includes direct payments.",
      "examples": [
        "grants",
        "contracts"
      ]
    },
    "max_recent": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum recent awards, for example 10.",
      "x-fous-developer": true,
      "examples": [
        3,
        2
      ]
    },
    "fiscal_year": {
      "type": "string",
      "default": "latest",
      "description": "Federal fiscal year, for example 2025; use all for the last five complete fiscal years.",
      "examples": [
        "2024",
        "all"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "recipient": "Johns Hopkins University",
      "award_type": "grants",
      "max_recent": 3,
      "fiscal_year": "2024"
    },
    {
      "recipient": "Lockheed Martin"
    },
    {
      "recipient": "Lockheed Martin",
      "award_type": "contracts",
      "max_recent": 2,
      "fiscal_year": "all"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `currency` | string | `"USD"` |  |
| `fiscal_years` | array |  |  |
| `recent_awards` | array |  |  |
| `recent_awards[].amount` | number | `440684.55` |  |
| `recent_awards[].award_id` | string or null | `"FA945325CX054"` |  |
| `recent_awards[].award_link` | string | `"https://www.usaspending.gov/award/CONT_AWD_FA945325CX054_9700_-NONE-_-NONE-"` |  |
| `recent_awards[].award_type` | string | `"Definitive Contract"` |  |
| `recent_awards[].start_date` | string or null | `"2025-10-08"` |  |
| `recent_awards[].description` | string or null | `"SPACE DATA NETWORKING EXPERIMENTATION - LMCO"` |  |
| `recent_awards[].awarding_agency` | string or null | `"Department of Defense"` |  |
| `recipient_uei` | string or null | `"ZFN2JJXBLZT3"` |  |
| `recipient_name` | string | `"LOCKHEED MARTIN CORP"` |  |
| `number_of_awards` | integer | `27519` |  |
| `amounts_by_award_type` | object |  |  |
| `amounts_by_award_type.loans` | number | `0` |  |
| `amounts_by_award_type.other` | number | `0` |  |
| `amounts_by_award_type.grants` | number | `12477911` |  |
| `amounts_by_award_type.contracts` | number | `65403657216.02` |  |
| `top_awarding_agencies` | array |  |  |
| `top_awarding_agencies[].agency` | string | `"Department of Defense"` |  |
| `top_awarding_agencies[].amount` | number | `63964766619.34` |  |
| `total_obligated_amount` | number | `65416135127.02` |  |

**Example input**

```json
{
  "recipient": "Lockheed Martin"
}
```

**Example output**

```json
{
  "currency": "USD",
  "fiscal_years": [
    2025
  ],
  "recent_awards": [
    {
      "amount": 440684.55,
      "award_id": "FA945325CX054",
      "award_link": "https://www.usaspending.gov/award/CONT_AWD_FA945325CX054_9700_-NONE-_-NONE-",
      "award_type": "Definitive Contract",
      "start_date": "2025-10-08",
      "description": "SPACE DATA NETWORKING EXPERIMENTATION - LMCO",
      "awarding_agency": "Department of Defense"
    },
    {
      "amount": 2309290,
      "award_id": "N0001925F0927",
      "award_link": "https://www.usaspending.gov/award/CONT_AWD_N0001925F0927_9700_N0001923G0002_9700",
      "award_type": "Delivery Order",
      "start_date": "2025-10-01",
      "description": "DALO HOT DESK SUPPORT FOLLOW ON CONTRACT",
      "awarding_agency": "Department of Defense"
    },
    {
      "amount": 18105854.98,
      "award_id": "W31P4Q25F0273",
      "award_link": "https://www.usaspending.gov/award/CONT_AWD_W31P4Q25F0273_9700_W31P4Q22D0022_9700",
      "award_type": "Delivery Order",
      "start_date": "2025-09-30",
      "description": "PATRIOT ADVANCED CAPABILITY-3 (PAC-3) MISSILE SUPPORT CENTER (P3MSC) FOR THE UNITED STATES (US) AND FOREIGN MILITARY SALES (FMS) CUSTOMER, OBSOLESCENCE (OBS) MITIGATION AND TEST EQUIPMENT DEVELOPMENT.",
      "awarding_agency": "Department of Defense"
    }
  ],
  "recipient_uei": "ZFN2JJXBLZT3",
  "recipient_name": "LOCKHEED MARTIN CORP",
  "number_of_awards": 27519,
  "amounts_by_award_type": {
    "loans": 0,
    "other": 0,
    "grants": 12477911,
    "contracts": 65403657216.02
  },
  "top_awarding_agencies": [
    {
      "agency": "Department of Defense",
      "amount": 63964766619.34
    },
    {
      "agency": "National Aeronautics and Space Administration",
      "amount": 1341594223.09
    },
    {
      "agency": "Department of Homeland Security",
      "amount": 64994361.73
    }
  ],
  "total_obligated_amount": 65416135127.02
}
```

### Search federal awards

Operation `search_federal_awards`, version 1. 1 credit per call.

Search USAspending federal awards by keywords, awarding agency, state of performance, and date. Includes contracts, grants, loans and direct payments; loan amounts are face values, and loans may lack end dates. Searches from October 1, 2007 onward.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `sort` | string | no | `"newest"` | Order by largest amount or newest award, for example newest. |
| `state` | string | no | `"California"` | State where the work is performed, for example California or CA. |
| `agency` | string | no | `"Department of Energy"` | Awarding agency name, for example Department of Energy. |
| `end_date` | string | no | `"2026-09-29"` | Last date to search, for example 2026-09-29. Defaults to today. |
| `keywords` | string | yes | `"wildfire"` | Topic to search for, for example wildfire prevention. |
| `award_type` | string | no | `"grants"` | Award kinds to include, for example grants. |
| `start_date` | string | no | `"2024-01-01"` | First date to search, for example 2025-10-01. Defaults to 12 months before end date. |
| `max_results` | integer | no | `3` | Maximum awards to return, for example 25. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "keywords"
  ],
  "properties": {
    "sort": {
      "enum": [
        "largest_amount",
        "newest"
      ],
      "type": "string",
      "default": "largest_amount",
      "description": "Order by largest amount or newest award, for example newest.",
      "examples": [
        "newest"
      ]
    },
    "state": {
      "type": "string",
      "description": "State where the work is performed, for example California or CA.",
      "examples": [
        "California"
      ]
    },
    "agency": {
      "type": "string",
      "description": "Awarding agency name, for example Department of Energy.",
      "examples": [
        "Department of Energy"
      ]
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "Last date to search, for example 2026-09-29. Defaults to today.",
      "examples": [
        "2026-09-29"
      ]
    },
    "keywords": {
      "type": "string",
      "minLength": 1,
      "description": "Topic to search for, for example wildfire prevention.",
      "examples": [
        "wildfire",
        "wildfire prevention",
        "zzzxxyyqqnonexistent9876"
      ]
    },
    "award_type": {
      "enum": [
        "all",
        "contracts",
        "grants",
        "loans",
        "direct_payments"
      ],
      "type": "string",
      "default": "all",
      "description": "Award kinds to include, for example grants.",
      "examples": [
        "grants",
        "all",
        "contracts"
      ]
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "First date to search, for example 2025-10-01. Defaults to 12 months before end date.",
      "examples": [
        "2024-01-01"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 25,
      "maximum": 100,
      "minimum": 1,
      "description": "Maximum awards to return, for example 25.",
      "x-fous-developer": true,
      "examples": [
        3,
        5,
        2
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "sort": "newest",
      "state": "California",
      "agency": "Department of Energy",
      "end_date": "2026-09-29",
      "keywords": "wildfire",
      "award_type": "grants",
      "start_date": "2024-01-01",
      "max_results": 3
    },
    {
      "keywords": "wildfire prevention",
      "award_type": "grants",
      "max_results": 3
    },
    {
      "keywords": "wildfire",
      "award_type": "all",
      "max_results": 5
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `awards` | array |  |  |
| `awards[].amount` | number or null | `49445046` |  |
| `awards[].award_id` | string or null | `"DEGD0001017"` |  |
| `awards[].end_date` | string or null | `"2029-12-31"` |  |
| `awards[].award_link` | string or null | `"https://www.usaspending.gov/award/ASST_NON_DEGD0001017_089"` |  |
| `awards[].award_type` | string or null | `"PROJECT GRANT (B)"` |  |
| `awards[].start_date` | string or null | `"2025-01-01"` |  |
| `awards[].description` | string or null | `"THE ROLE OF PLANT-MYCORRHIZAL RELATIONSHIPS IN FOREST LOSS FOLLOWING WILDFIRE"` |  |
| `awards[].currency_code` | string | `"USD"` |  |
| `awards[].recipient_uei` | string or null | `"DP7KERAZ7LY3"` |  |
| `awards[].recipient_name` | string or null | `"GENERAC POWER SYSTEMS, INC."` |  |
| `awards[].awarding_agency` | string or null | `"Department of Energy"` |  |
| `awards[].place_of_performance_city` | string or null | `"STOCKTON"` |  |
| `awards[].place_of_performance_state` | string or null | `"California"` |  |

**Example input**

```json
{
  "sort": "newest",
  "state": "California",
  "agency": "Department of Energy",
  "end_date": "2026-09-29",
  "keywords": "wildfire",
  "award_type": "grants",
  "start_date": "2024-01-01",
  "max_results": 3
}
```

**Example output**

```json
{
  "awards": [
    {
      "amount": 49445046,
      "award_id": "DEGD0001017",
      "end_date": "2029-12-31",
      "award_link": "https://www.usaspending.gov/award/ASST_NON_DEGD0001017_089",
      "award_type": "PROJECT GRANT (B)",
      "start_date": "2025-01-01",
      "description": "BIPARTISAN INFRASTRUCTURE LAW (BIL) - ACCELERATING CLEAN ENERGY RESILIENCY FOR THE GRID AND CALIFORNIA WATER UTILITIES\nTHE GOAL OF THIS PROJECT IS TO BRING CLEAN ENERGY RESILIENCY TO THE CRITICAL INFR…",
      "currency_code": "USD",
      "recipient_uei": "DP7KERAZ7LY3",
      "recipient_name": "GENERAC POWER SYSTEMS, INC.",
      "awarding_agency": "Department of Energy",
      "place_of_performance_city": "STOCKTON",
      "place_of_performance_state": "California"
    },
    {
      "amount": 30000000,
      "award_id": "DECD0000074",
      "end_date": "2029-09-30",
      "award_link": "https://www.usaspending.gov/award/ASST_NON_DECD0000074_089",
      "award_type": "COOPERATIVE AGREEMENT (B)",
      "start_date": "2024-10-01",
      "description": "THIS PROJECT AIMS TO PREVENT LOCAL FOREST FIRES WHILE PROVIDING LOW-CARBON, STABLE ENERGY FOR THREE COMMUNITIES IN THE SIERRA NEVADA MOUNTAINS OF CALIFORNIA. BURNEY, MARIPOSA, AND MAMMOTH LAKES ARE SM…",
      "currency_code": "USD",
      "recipient_uei": "W7CJZL5YJK33",
      "recipient_name": "WEST BIOFUELS LLC",
      "awarding_agency": "Department of Energy",
      "place_of_performance_city": null,
      "place_of_performance_state": "California"
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@usaspending",
  "visibility": "public",
  "operation": "get_agency_spending",
  "version": 1,
  "input": {
    "agency": "Department of Defense",
    "fiscal_year": 2025
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@usaspending\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_agency_spending\",\n  \"version\": 1,\n  \"input\": {\n    \"agency\": \"Department of Defense\",\n    \"fiscal_year\": 2025\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@usaspending",
  "visibility": "public",
  "operation": "get_agency_spending",
  "version": 1,
  "input": {
    "agency": "Department of Defense",
    "fiscal_year": 2025
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@usaspending","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Review a company’s federal obligations and recent awards.
- Compare a recipient’s award amounts across award types.
- Find awards by topic, agency, state, and date range.
- Summarize an agency’s obligations and budgetary resources.
- Identify an agency’s leading recipients and spending categories.

## FAQ

### Is Fous affiliated with USAspending?

No. Fous is not affiliated with USAspending. This workflow reads the public usaspending.gov website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a USAspending account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from usaspending.gov when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### How much federal funding has a company received?

Get company federal awards returns obligations, award counts, and recent awards for a company or organization, with optional award type and fiscal year.

### Which federal awards match a topic or location?

Search federal awards finds awards by keyword and optional agency, state, award type, and date range.

### What are an agency’s obligations and top recipients?

Get agency spending returns fiscal-year obligations, budgetary resources, leading recipients, spending categories, and award count.

## Related

- [Grants.gov API](https://fous.com/workflows/grants-gov.md): U.S. federal grant opportunities and application information.
- [SAM.gov API](https://fous.com/workflows/sam-gov.md): U.S. federal contract opportunities and government notices.
- [USAJOBS API](https://fous.com/workflows/usajobs.md): Federal government job listings and announcements.
- [NIH RePORTER API](https://fous.com/workflows/nih-reporter.md): Public research funding and project records from the National Institutes of Health.
- [Congress.gov API](https://fous.com/workflows/congress-gov.md): Congress.gov returns federal bills and resolutions matching topic, Congress, status, or chamber, and provides an individual bill’s status, summary, titles, actions, and related bills; summaries may be unavailable.
- [Tenders Electronic Daily API](https://fous.com/workflows/tenders-electronic-daily.md): Tenders Electronic Daily provides recently published EU procurement notices, open tenders with future deadlines, and newest-first contract awards; values and deadlines may be absent.
- [US Treasury API](https://fous.com/workflows/us-treasury.md): US Treasury provides official daily interest rates and national debt figures for requested or latest available dates, plus quarterly reporting exchange rates using the latest preceding quarter when needed.
- [Federal Register API](https://fous.com/workflows/federal-register.md): Search United States federal rules, proposed rules, notices, and presidential documents.
- [All Government workflows](https://fous.com/workflows/category/government)
