USAspending API ReferenceIndependent
Try the API

Program Activities Total

POST/api/v2/federal_accounts/{federal_account_code}/program_activities/total

This endpoint returns an array of each program activity's obligation, code, name, and type for the specified federal account

Request

curl -X POST 'https://api.usaspending.gov/api/v2/federal_accounts/431-0500/program_activities/total' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "time_period": [
      {
        "start_date": "2019-10-01",
        "end_date": "2020-09-30"
      }
    ],
    "program_activity": [
      "0001"
    ]
  }
}'

Path parameters

  • federal_account_codestringRequired

    Federal account code consisting of the AID and main account code

    Example 431-0500

Request body

The filters object is shared by every search endpoint. The filter object explains each filter with examples.

  • filtersobject · FederalAccountTotalsFilterObject3 fields

    This can filter by time period, object class, and/or program activity

    • time_periodstring

      { "start_date": "2019-10-01", "end_date": "2020-09-30" }]`(optional, array[TimePeriod], fixed-type)

      Example `[

    • object_classarray of string

      Example ["\"254\""]

    • program_activityarray of string

      Each string should be either PAC or PARK code

      Example ["\"123\""]

  • limitnumber

    The number of results to include per page.

    Default 10

  • pagenumber

    The page of results to return based on the limit.

    Default 1

Try it

Runs against the live API. Responses are real data.

POST/api/v2/federal_accounts/431-0500/program_activities/total

Response · 200

  • resultsarray of FederalAccountTotalsRequired4 fields
    • obligationsnumberRequired
    • codestringRequired
    • namestringRequired
    • typeenum (string)Required

      Whether the Program Activity values are from the older Program Activity Code / Name (PAC/PAN) or the Program Activity Reporting Key (PARK)

      Allowed values
      • PAC/PAN
      • PARK
  • page_metadataobject · PageMetadataRequired7 fields
    • limitnumberRequired
    • pagenumberRequired
    • nextnumberRequiredNullable
    • previousnumberRequiredNullable
    • hasNextbooleanRequired
    • hasPreviousbooleanRequired
    • totalnumberRequired
Example response
  {
      "results": [
        {"obligations": 44112.0, "code": "00000000003", "name": "PARK 3", "type": "PARK"},
        {"obligations": 6000.0, "code": "00000000001", "name": "PARK 1", "type": "PARK"},
        {"obligations": 130.0, "code": "00000000002", "name": "PARK 2", "type": "PARK"},
        {"obligations": 1.0, "code": "0001", "name": "PAC/PAN 1", "type": "PAC/PAN"},
      ],
      "page_metadata": {
        "page": 1,
        "total": 4,
        "limit": 10,
        "next": None,
        "previous": None,
        "hasNext": False,
        "hasPrevious": False
      },
  }

Recent changes

Generated from contracts/v2/federal_accounts/federal_account_totals/program_activities.md in the USAspending API repo.

Loading…