Skip to main content
POST
/
api
/
usaspending
/
awards
/
search
/
count
/usaspending/awards/search/count
curl --request POST \
  --url https://api.anysite.io/api/usaspending/awards/search/count \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "keywords": [
    "<string>"
  ],
  "timeout": 300,
  "award_type_codes": [
    "A",
    "B",
    "C",
    "D"
  ],
  "start_date": "2020-01-01",
  "end_date": "2024-12-31"
}
'
[
  {
    "@type": "@usaspending_award_count",
    "contracts": 0,
    "direct_payments": 0,
    "grants": 0,
    "idvs": 0,
    "loans": 0,
    "other": 0
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
keywords
string[]
required

Text terms to match against awards

Minimum array length: 1
Examples:
["Lockheed"]
["solar", "energy"]
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
award_type_codes
enum<string>[] | null

Award types to include; omit to count across all categories

Available options:
A,
B,
C,
D,
IDV_A,
IDV_B,
IDV_B_A,
IDV_B_B,
IDV_B_C,
IDV_C,
IDV_D,
IDV_E,
02,
03,
04,
05,
06,
07,
08,
09,
10,
11
Example:
["A", "B", "C", "D"]
start_date
string | null

Count awards active on or after this date (YYYY-MM-DD)

Example:

"2020-01-01"

end_date
string | null

Count awards active on or before this date (YYYY-MM-DD)

Example:

"2024-12-31"

Response

Successful Response

@type
string
default:@usaspending_award_count
contracts
integer
default:0
direct_payments
integer
default:0
grants
integer
default:0
idvs
integer
default:0
loans
integer
default:0
other
integer
default:0