Route: /api/v2/search/spending_over_time/
Method: POST
This route takes award filters, and returns spending by time. The amount of time is denoted by the "group" value.
group: how the data is broken up. ex: "quarter", "fiscal_year", "month"
filter: how the awards are filtered. The filter object is defined here.
https://gist.github.com/nmonga91/ba0e172b6d3f2aaf50f0ef1bb5d708bc#recipient-location
{
"group": "quarter",
"filters": {
"award_type_codes": ["A", "B", "03"],
"award_ids": [1, 2, 3],
"award_amounts": [
{
"lower_bound": 1000000.00,
"upper_bound": 25000000.00
},
{
"upper_bound": 1000000.00
},
{
"lower_bound": 500000000.00
}
],
}
}
{
"group": "quarter"
"results": [
{
"time_period": {"fiscal_year": "2017", "quarter": "3"},
"aggregated_amount": "200000000"
},
....
]
}
Possible HTTP Status Codes:
- 400 : Missing parameters or limit is not a valid, positive integer
- 500 : All other errors
{
"detail": "Sample error message"
}
https://github.com/fedspendingtransparency/usaspending-website/wiki/Award-Search-Visualizations