USAspending API ReferenceIndependent
Try the API

State Overview

GET/api/v2/recipient/state/{fips}/

These endpoints are used to power USAspending.gov's state profile pages. This data can be used to visualize the government spending that occurs in a specific state or territory.

This endpoint returns a high-level overview of a specific state or territory, given its USAspending.gov id.

Request

curl 'https://api.usaspending.gov/api/v2/recipient/state/51/'

Path parameters

  • fipsstringRequired

    The FIPS code for the state you want to view. You must include leading zeros.

    Example 51

Query parameters

  • yearstring

    The fiscal year you would like data for. Use all to view all time or latest to view the latest 12 months.

    Example 2017

Try it

Runs against the live API. Responses are real data.

GET/api/v2/recipient/state/51/?year=2017

Response · 200

  • namestringRequired

    Example Virginia

  • codestringRequired

    Example VA

  • fipsstringRequired

    Example 51

  • typestringRequired

    A string representing the type of area. Possible values are state, district, territory.

    Example state

  • populationnumberRequired

    Example 8414380

  • pop_yearnumberRequired

    The year the population is based on.

    Example 2017

  • median_household_incomenumberRequired

    Example 68114

  • mhi_yearnumberRequired

    The year the median household income is based on.

    Example 2017

  • total_prime_amountnumberRequired

    Example 300200000000

  • total_prime_awardsnumberRequired

    Example 327721

  • total_face_value_loan_amountnumberRequired

    Example 88888

  • total_face_value_loan_prime_awardsnumberRequired

    Example 10

  • award_amount_per_capitanumberRequired

    Example 916023.08

  • total_outlaysnumberRequired

    Example 16657372472.78

Example response
{
  "name": "Virginia",
  "code": "VA",
  "fips": "51",
  "type": "state",
  "population": 8414380,
  "pop_year": 2017,
  "median_household_income": 68114,
  "mhi_year": 2017,
  "total_prime_amount": 300200000000,
  "total_prime_awards": 327721,
  "total_face_value_loan_amount": 88888,
  "total_face_value_loan_prime_awards": 10,
  "award_amount_per_capita": 916023.08,
  "total_outlays": 16657372472.78
}

Recent changes

Generated from contracts/v2/recipient/state/fips.md in the USAspending API repo.

Loading…