USAspending API ReferenceIndependent
Try the API

Keyword search

Full-text search across transactions.

Open a row for parameters and ready-to-run samples. The full reference has every field and a live console.

POSTSpending By Transaction Count/api/v2/search/spending_by_transaction_count/

Returns the counts of transaction records which match the keyword grouped by award categories.

filters
curl -X POST 'https://api.usaspending.gov/api/v2/search/spending_by_transaction_count/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "keywords": [
      "test"
    ],
    "award_type_codes": [
      "A",
      "B",
      "C",
      "D"
    ]
  }
}'
POSTSpending By Transaction Grouped/api/v2/search/spending_by_transaction_grouped/

Searches for transaction records based on a provided set of filters and groups them by their prime award.

filterslimitpagesortorder
curl -X POST 'https://api.usaspending.gov/api/v2/search/spending_by_transaction_grouped/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "award_type_codes": [
      "A",
      "B",
      "C",
      "D"
    ]
  },
  "page": 1,
  "limit": 35,
  "sort": "award_id",
  "order": "desc"
}'
POSTSpending By Transaction/api/v2/search/spending_by_transaction/

Returns transaction records which match the provided filters.

filtersfieldslimitpagesortorder
curl -X POST 'https://api.usaspending.gov/api/v2/search/spending_by_transaction/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "keywords": [
      "test"
    ],
    "award_type_codes": [
      "A",
      "B",
      "C",
      "D"
    ]
  },
  "fields": [
    "Award ID",
    "Mod",
    "Recipient Name",
    "Action Date",
    "Transaction Amount",
    "Awarding Agency",
    "Awarding Sub Agency",
    "Award Type"
  ],
  "page": 1,
  "limit": 35,
  "sort": "Transaction Amount",
  "order": "desc"
}'
POSTIDV Funding/api/v2/search/transaction_spending_summary/

Returns the high-level aggregations of the counts and dollar amounts for all transactions which match the keyword filter

filters
curl -X POST 'https://api.usaspending.gov/api/v2/search/transaction_spending_summary/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "keyword": "test"
  }
}'

Loading…