USAspending API ReferenceIndependent
Try the API

Disaster Recipient Download

POST/api/v2/download/disaster/recipients/

Creates a new download job for the requested filters. Returns a link to a zipped file containing the generated data files.

Request

curl -X POST 'https://api.usaspending.gov/api/v2/download/disaster/recipients/' \
  -H 'Content-Type: application/json' \
  -d '{
  "filters": {
    "def_codes": [
      "L",
      "M",
      "N",
      "O",
      "P",
      "U"
    ],
    "award_type_codes": [
      "A",
      "B",
      "C",
      "D"
    ]
  }
}'

Request body

The filters object is shared by every search endpoint. The filter object explains each filter with examples.

  • filtersobject · Filters3 fields
    • def_codesarray of DEFCRequired

      List of Disaster Emergency Fund (DEF) Codes (DEFC) defined by legislation at the time of writing. A list of current DEFC can be found here.

    • award_type_codesarray of AwardTypeCodes

      List of procurement and assistance award type codes supported by USAspending.gov

      Allowed values
      • 02
      • 03
      • 04
      • 05
      • 06
      • 07
      • 08
      • 09
      • 10
      • 11
      • A
      • B
      • C
      • D
      • IDV_A
      • IDV_B_A
      • IDV_B_B
      • IDV_B_C
      • IDV_B
      • IDV_C
      • IDV_D
      • IDV_E
      • F001
      • F002
      • F003
      • F004
      • F005
      • F006
      • F007
      • F008
      • F009
      • F010
    • querystring

      A "keyword" or "search term" to filter down results based on this text snippet

  • file_formatenum (string)

Try it

Runs against the live API. Responses are real data.

POST/api/v2/download/disaster/recipients/

Response · 200

  • status_urlstringRequired

    The endpoint used to get the status of a download.

  • file_namestringRequired

    Is the name of the zipfile containing CSVs that will be generated (with a timestamp suffix).

  • file_urlstringRequired

    The URL for downloading the zip file containing the generated data files. It might not resolve to a file if the download is in-progress.

  • download_requestobjectRequired

    The JSON object used when processing the download.

Example response
{
  "status_url": "https://api.usaspending.gov/api/v2/download/status?file_name=COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
  "file_name": "COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
  "file_url": "https://files.usaspending.gov/generated_downloads/COVID-19_Profile_2020-07-09_H17M39S27272793.zip",
  "download_request": {
    "award_category": "Contracts",
    "columns": [
      "recipient",
      "award_obligations",
      "award_outlays",
      "number_of_awards"
    ],
    "download_types": [
      "disaster_recipient"
    ],
    "file_format": "csv",
    "filters": {
      "award_type_codes": [
        "A",
        "B",
        "C",
        "D"
      ],
      "def_codes": [
        "L",
        "M",
        "N",
        "O",
        "P"
      ]
    }
  }
}

Recent changes

Generated from contracts/v2/download/disaster/recipients.md in the USAspending API repo.

Loading…