# getRecipientSpendingBreakdown

**Identifier:** `usaspending_getRecipientSpendingBreakdown`

**Provider:** [USAspending](https://kirha.com/providers/usaspending.md)

Federal obligations to one recipient (company) by fiscal year and by awarding agency, from its recipientId or UEI. Use it for time series of a company's US government revenue, its growth, and which departments buy from it. A parent recipientId (-P) covers all its subsidiaries.

## Run it with the CLI

```bash
kirha tools run usaspending_getRecipientSpendingBreakdown \
  --input '{}'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "usaspending_getRecipientSpendingBreakdown",
  "input": {}
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "agencyLimit": {
      "default": 10,
      "maximum": 30,
      "minimum": 1,
      "type": "integer"
    },
    "awardCategory": {
      "description": "Omit for all award types",
      "enum": [
        "contracts",
        "idvs",
        "grants",
        "directPayments",
        "loans",
        "other"
      ],
      "type": "string"
    },
    "endFiscalYear": {
      "maximum": 2100,
      "minimum": 2008,
      "type": "integer"
    },
    "recipientId": {
      "description": "USAspending recipient ID (hash ending in -P parent, -C child or -R recipient), from searchRecipients",
      "pattern": "^[0-9a-f-]{36}-[PCR]$",
      "type": "string"
    },
    "startFiscalYear": {
      "maximum": 2100,
      "minimum": 2008,
      "type": "integer"
    },
    "uei": {
      "description": "12-character SAM Unique Entity ID, e.g., FSY4LVSBGWB7",
      "pattern": "^[A-Za-z0-9]{12}$",
      "type": "string"
    }
  },
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "byAgency": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "abbreviation": {
            "type": "string"
          },
          "agency": {
            "type": "string"
          },
          "amountUsd": {
            "type": "number"
          }
        },
        "required": [
          "agency",
          "amountUsd"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "byFiscalYear": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "contractsUsd": {
            "type": "number"
          },
          "directPaymentsUsd": {
            "type": "number"
          },
          "fiscalYear": {
            "type": "number"
          },
          "grantsUsd": {
            "type": "number"
          },
          "idvsUsd": {
            "type": "number"
          },
          "loansUsd": {
            "type": "number"
          },
          "otherUsd": {
            "type": "number"
          },
          "totalUsd": {
            "type": "number"
          }
        },
        "required": [
          "fiscalYear",
          "totalUsd"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "context": {
      "type": "string"
    },
    "recipientId": {
      "type": "string"
    },
    "totalObligationsUsd": {
      "type": "number"
    },
    "url": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "recipientId",
    "url",
    "totalObligationsUsd",
    "byFiscalYear",
    "byAgency"
  ],
  "type": "object"
}
```

## Related tools

Other USAspending tools that this tool refers to, or that refer to it.

- [`searchRecipients`](https://kirha.com/providers/usaspending/searchRecipients.md)

-----

[All USAspending tools](https://kirha.com/providers/usaspending.md) · [< Back to tools list](https://kirha.com/tools.md)