FORMAT: 1A HOST: https://api.usaspending.gov
This endpoint supports the advanced search page and allow for complex filtering for specific subsets of spending data.
This endpoint returns a list of aggregated award amounts grouped by time period in ascending order (earliest to most recent).
-
Request (application/json)
-
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object" }
-
Attributes (object)
group
(required, enum[string])- Members
fiscal_year
quarter
month
- Default
fiscal_year
- Members
filters
(required, AdvancedFilterObject)subawards
(optional, boolean) True to group by sub-awards instead of prime awards. Defaults to false.- Default: false
-
Body
{ "group": "fiscal_year", "filters": { "keywords": ["Filter is required"] } }
-
-
Response 200 (application/json)
- Attributes (object)
group
(required, enum[string])- Members
fiscal_year
quarter
month
- Members
results
(array[TimeResult], fixed-type)messages
(optional, array[string]) An array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.
- Attributes (object)
time_period
(required, TimePeriodGroup)aggregated_amount
(required, number) The aggregate award amount for this time period and the given filters.
fiscal_year
(required, string)quarter
(optional, string) Excluded when grouping byfiscal_year
ormonth
.month
(optional, string) Excluded when grouping byfiscal_year
orquarter
.
keywords
:transport
(optional, array[string])time_period
(optional, array[TimePeriodObject], fixed-type)place_of_performance_scope
(optional, enum[string])- Members
domestic
foreign
- Members
place_of_performance_locations
(optional, array[LocationObject], fixed-type)agencies
(optional, array[AgencyObject], fixed-type)recipient_search_text
:Hampton
,Roads
(optional, array[string])- Text searched across a recipient’s name, UEI, and DUNS
recipient_scope
(optional, enum[string])- Members
domestic
foreign
- Members
recipient_locations
(optional, array[LocationObject], fixed-type)recipient_type_names
:category_business
,sole_proprietorship
(optional, array[string])award_type_codes
(optional, FilterObjectAwardTypes)award_ids
: [SPE30018FLGFZ
,SPE30018FLJFN
] (optional, array[string]) Award IDs surrounded by double quotes (e.g."SPE30018FLJFN"
) will perform exact matches as opposed to the default, fuzzier full text matches. Useful for Award IDs that contain spaces or other word delimiters.award_amounts
(optional, array[AwardAmounts], fixed-type)program_numbers
:10.331
(optional, array[string])naics_codes
(optional, NAICSCodeObject)tas_codes
(optional, array[TASCodeObject], fixed-type)psc_codes
(optional, enum[PSCCodeObject, array[string]]) Supports new PSCCodeObject or legacy array of codes.contract_pricing_type_codes
:J
(optional, array[string])set_aside_type_codes
:NONE
(optional, array[string])extent_competed_type_codes
:A
(optional, array[string])treasury_account_components
(optional, array[TreasuryAccountComponentsObject], fixed-type)object_class
(optional, array[string])program_activity
(optional, array[number])def_codes
(optional, array[DEFC], fixed-type) If thedef_codes
provided are in the COVID-19 or IIJA group, the query will only return results of transactions where theaction_date
is on or after the enactment date of the public law associated with that disaster code.
This TimePeriodObject can fall into different categories based on the request.
-
if
subawards
trueSee the Subaward Search category defined in SubawardSearchTimePeriodObject
-
otherwise
See the Transaction Search category defined in TransactionSearchTimePeriodObject
These fields are defined in the StandardLocationObject
type
(required, enum[string])- Members
awarding
funding
- Members
tier
(required, enum[string])- Members
toptier
subtier
- Members
name
:Office of Inspector General
(required, string)toptier_name
:Department of the Treasury
(optional, string) Only applicable whentier
issubtier
. Ignored whentier
istoptier
. Provides a means by which to scope subtiers with common names to a specific toptier. For example, several agencies have an "Office of Inspector General". If not provided, subtiers may span more than one toptier.
lower_bound
(optional, number)upper_bound
: 1000000 (optional, number)
require
: [33
] (optional, array[string], fixed-type)exclude
: [3333
] (optional, array[string], fixed-type)
require
: [[Service
,B
,B5
]] (optional, array[array[string]], fixed-type)exclude
: [[Service
,B
,B5
,B502
]] (optional, array[array[string]], fixed-type)
require
: [[091
]] (optional, array[array[string]], fixed-type)exclude
: [[091
,091-0800
]] (optional, array[array[string]], fixed-type)
ata
(optional, string, nullable) Allocation Transfer Agency Identifier - three charactersaid
(required, string) Agency Identifier - three charactersbpoa
(optional, string, nullable) Beginning Period of Availability - four digitsepoa
(optional, string, nullable) Ending Period of Availability - four digitsa
(optional, string, nullable) Availability Type Code - X or nullmain
(required, string) Main Account Code - four digitssub
(optional, string, nullable) Sub-Account Code - three digits
List of filterable award types
A
B
C
D
02
03
04
05
06
07
08
09
10
11
A
B
C
D
IDV_A
IDV_B
IDV_B_A
IDV_B_B
IDV_B_C
IDV_C
IDV_D
IDV_E
List of Disaster Emergency Fund (DEF) Codes (DEFC) defined by legislation at the time of writing. A list of current DEFC can be found here.