USAspending API ReferenceIndependent
Try the API

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

    Default `5703c297b902ac3b76088c5c275b53f9` (returns default filters)

Try it

Runs against the live API. Responses are real data.

POST/api/v2/references/hash/

Response · 200

  • filterobject2 fields
    • filtersobject22 fields
      • awardAmountsobjectRequired
      • awardTypearray of stringRequired
      • extentCompetedarray of stringRequired
      • keywordobjectRequired
      • locationDomesticForeignstringRequired
      • pricingTypearray of stringRequired
      • recipientDomesticForeignstringRequired
      • recipientTypearray of stringRequired
      • selectedAwardIDsobjectRequired
      • selectedAwardingAgenciesobjectRequired
      • selectedCFDAobjectRequired
      • selectedFundingAgenciesobjectRequired
      • selectedLocationsobjectRequired
      • selectedNAICSobjectRequired
      • selectedPSCobjectRequired
      • selectedRecipientLocationsobjectRequired
      • selectedRecipientsarray of stringRequired
      • setAsidearray of stringRequired
      • timePeriodEndstringRequiredNullable
      • timePeriodFYarray of stringRequired
      • timePeriodStartstringRequiredNullable
      • timePeriodTypestringRequired
    • versionstring
Example response
{
  "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

Generated from contracts/v2/references/hash.md in the USAspending API repo.

Loading…