Skip to main content
POST
/
api
/
usaspending
/
autocomplete
/usaspending/autocomplete
curl --request POST \
  --url https://api.anysite.io/api/usaspending/autocomplete \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "search_text": "<string>",
  "count": 2,
  "timeout": 300
}
'
[
  {
    "resolve_type": "<string>",
    "@type": "@usaspending_autocomplete_result",
    "code": "<string>",
    "name": "<string>",
    "description": "<string>",
    "agency_id": 123,
    "toptier_code": "<string>",
    "toptier_name": "<string>",
    "abbreviation": "<string>",
    "subtier_name": "<string>",
    "is_toptier": true,
    "uei": "<string>",
    "duns": "<string>",
    "recipient_level": "<string>",
    "year_retired": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
search_text
string
required

Text prefix to resolve into matching entities

Minimum string length: 1
resolve_type
enum<string>
required

Entity type to resolve the text against

Available options:
awarding_agency,
funding_agency,
recipient,
naics,
psc,
cfda
count
integer
required

Max number of results

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

resolve_type
string
required
@type
string
default:@usaspending_autocomplete_result
code
string | null
name
string | null
description
string | null
agency_id
integer | null
toptier_code
string | null
toptier_name
string | null
abbreviation
string | null
subtier_name
string | null
is_toptier
boolean | null
uei
string | null
duns
string | null
recipient_level
string | null
year_retired
integer | null