USAspending API ReferenceIndependent
Try the API

Recipient Autocomplete

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

  • limitnumber

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

    Default 10

  • search_textstringRequired
  • recipient_levelsarray of string

    Example ["C","P","R"]

Try it

Runs against the live API. Responses are real data.

POST/api/v2/autocomplete/recipient/

Response · 200

  • resultsarray of RecipientMatchRequired4 fields
    • recipient_namestringRequiredNullable

      Populated with the matching value when the search text matches, otherwise, populated for matches on UEI and DUNS.

    • recipient_levelstringRequiredNullable

      This value is deprecated to avoid confusion when returning only a single Recipient.

    • ueistringRequiredNullable

      This value is only populated when the search text matches a UEI.

    • dunsstringRequiredNullable

      This value is only populated when the search text matches a DUNS.

  • messagesarray of stringRequired

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

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

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

Loading…