Awarding Agency Autocomplete
POST
/api/v2/autocomplete/awarding_agency/Deprecated: Please see the following API contract for the new awarding endpoint usaspending_api/api_contracts/contracts/v2/autocomplete/awarding_agency_office.md.
This endpoint is used by the Awarding Agency autocomplete filter on the Advanced Search page.
This route sends a request to the backend to retrieve awarding agencies matching the specified search text.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/autocomplete/awarding_agency/' \
-H 'Content-Type: application/json' \
-d '{
"search_text": "Defense"
}'Request body
limitnumberNumber of results to return (min: 1, max: 500)
search_textstringRequired
Try it
Runs against the live API. Responses are real data.
POST
/api/v2/autocomplete/awarding_agency/Response · 200
resultsarray of AwardingAgencyMatchObjectRequired4 fieldsidnumberRequiredtoptier_flagbooleanRequiredtoptier_agencyobjectRequired3 fieldstoptier_codestringRequiredabbreviationstringRequiredNullablenamestringRequired
subtier_agencyobjectRequired2 fieldsabbreviationstringRequiredNullablenamestringRequired
messagesarray of stringRequiredAn array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.
{
"results": [
{
"id": 0,
"toptier_flag": false,
"toptier_agency": {
"toptier_code": "",
"abbreviation": null,
"name": ""
},
"subtier_agency": {
"abbreviation": null,
"name": ""
}
}
],
"messages": []
}Recent changes
Generated from contracts/v2/autocomplete/awarding_agency.md in the USAspending API repo.