USAspending API ReferenceIndependent
Try the API

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

  • limitnumber

    Number of results to return (min: 1, max: 500)

    Default 10

  • search_textstringRequired

Try it

Runs against the live API. Responses are real data.

POST/api/v2/autocomplete/awarding_agency/

Response · 200

  • resultsarray of AwardingAgencyMatchObjectRequired4 fields
    • idnumberRequired
    • toptier_flagbooleanRequired
    • toptier_agencyobjectRequired3 fields
      • toptier_codestringRequired
      • abbreviationstringRequiredNullable
      • namestringRequired
    • subtier_agencyobjectRequired2 fields
      • abbreviationstringRequiredNullable
      • namestringRequired
  • messagesarray of stringRequired

    An array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.

Example response
{
  "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.

Loading…