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
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/program_activity/Response · 200
resultsarray of ProgramActivityMatchRequired2 fieldsprogram_activity_codestringRequiredprogram_activity_namestringRequired
{
"results": [
{
"program_activity_code": "",
"program_activity_name": ""
}
]
}Recent changes
- DEV-15418: Update API contracts for dredd failures
- DEV-15418: Set max value of 'limit' to 500
- Mentioned in the September 18, 2024 release notes
- Mentioned in the August 07, 2024 release notes
Generated from contracts/v2/autocomplete/program_activity.md in the USAspending API repo.