Recipient Autocomplete
/api/v2/autocomplete/recipient/This endpoint is used by the Recipient autocomplete filter on the Advanced Search page.
This route sends a request to the backend to retrieve recipients matching the specified search text. The endpoint will search for search_text in the recipient_name, uei and duns fields. The recipient_levels value can also be included to further filter results, but is not required.
Request
curl -X POST 'https://api.usaspending.gov/api/v2/autocomplete/recipient/' \
-H 'Content-Type: application/json' \
-d '{
"search_text": "Holdings"
}'Request body
limitnumberNumber of results to return (min: 1, max: 500)
search_textstringRequiredrecipient_levelsarray of string
Try it
Runs against the live API. Responses are real data.
/api/v2/autocomplete/recipient/Response · 200
resultsarray of RecipientMatchRequired4 fieldsrecipient_namestringRequiredNullablePopulated with the matching value when the search text matches, otherwise, populated for matches on UEI and DUNS.
recipient_levelstringRequiredNullableThis value is deprecated to avoid confusion when returning only a single Recipient.
ueistringRequiredNullableThis value is only populated when the search text matches a UEI.
dunsstringRequiredNullableThis value is only populated when the search text matches a DUNS.
messagesarray of stringRequiredAn array of warnings or instructional directives to aid consumers of this endpoint with development and debugging.
{
"results": [
{
"recipient_name": "LOCKHEED MARTIN",
"recipient_level": null,
"uei": "PUETYBNR91Z3"
"duns": "956973523"
},
{
"recipient_name": "LOCKHEED MARTIN",
"recipient_level": null,
"uei": "null",
"duns": "null"
}
]
}Recent changes
- DEV-15418: Update API contracts for dredd failures
- DEV-15418: Set max value of 'limit' to 500
- DEV-12500: Change recipient autocomplete to return unique recipients
- Mentioned in the September 18, 2024 release notes
- Mentioned in the August 27, 2024 release notes
Generated from contracts/v2/autocomplete/recipient.md in the USAspending API repo.