Restore Filters From URL Hash
POST
/api/v2/references/hash/Restores selected filter criteria, based on URL hash. Supports the advanced search page and allow for complex filtering for specific subsets of spending data. Primarily used when user shares or saves a url from an Advanced Search results page.
Restore Filters From URL Hash Data
Validation: The hash field is required and must be a valid 32-character hexadecimal MD5 hash string.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/references/hash/' \
-H 'Content-Type: application/json' \
-d '{
"hash": "5703c297b902ac3b76088c5c275b53f9"
}'Request body
hashstringRequired
Try it
Runs against the live API. Responses are real data.
POST
/api/v2/references/hash/Response · 200
filterobject2 fieldsfiltersobject22 fieldsawardAmountsobjectRequiredawardTypearray of stringRequiredextentCompetedarray of stringRequiredkeywordobjectRequiredlocationDomesticForeignstringRequiredpricingTypearray of stringRequiredrecipientDomesticForeignstringRequiredrecipientTypearray of stringRequiredselectedAwardIDsobjectRequiredselectedAwardingAgenciesobjectRequiredselectedCFDAobjectRequiredselectedFundingAgenciesobjectRequiredselectedLocationsobjectRequiredselectedNAICSobjectRequiredselectedPSCobjectRequiredselectedRecipientLocationsobjectRequiredselectedRecipientsarray of stringRequiredsetAsidearray of stringRequiredtimePeriodEndstringRequiredNullabletimePeriodFYarray of stringRequiredtimePeriodStartstringRequiredNullabletimePeriodTypestringRequired
versionstring
{
"filter": {
"filters": {
"keyword": {},
"setAside": [],
"awardType": [],
"pricingType": [],
"selectedPSC": {},
"awardAmounts": {},
"selectedCFDA": {},
"timePeriodFY": [
"2019"
],
"recipientType": [],
"selectedNAICS": {},
"timePeriodEnd": null,
"extentCompeted": [],
"timePeriodType": "fy",
"timePeriodStart": null,
"selectedAwardIDs": {},
"selectedLocations": {},
"selectedRecipients": [],
"locationDomesticForeign": "all",
"selectedFundingAgencies": {},
"recipientDomesticForeign": "all",
"selectedAwardingAgencies": {},
"selectedRecipientLocations": {}
},
"version": "2017-11-21"
}
}Recent changes
- DEV-15524: Updated Filter and Hash endpoints to use Pydantic validation, added size limit on request, and updated filter and hash contracts.
- Mentioned in the October 19, 2020 release notes
Generated from contracts/v2/references/hash.md in the USAspending API repo.