USAspending API ReferenceIndependent
Try the API

PSC Autocomplete

POST/api/v2/autocomplete/program_activity/

This endpoint is used by the Advanced Search page.

This route sends a request to the backend to retrieve program activities and their names based on a search string. This may be the 4-character program activity code or a name string.

Request

curl -X POST 'https://api.usaspending.gov/api/v2/autocomplete/program_activity/' \
  -H 'Content-Type: application/json' \
  -d '{
  "search_text": "Meat"
}'

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/program_activity/

Response · 200

  • resultsarray of ProgramActivityMatchRequired2 fields
    • program_activity_codestringRequired
    • program_activity_namestringRequired
Example response
{
  "results": [
    {
      "program_activity_code": "",
      "program_activity_name": ""
    }
  ]
}

Recent changes

Generated from contracts/v2/autocomplete/program_activity.md in the USAspending API repo.

Loading…