Skip to content

Instantly share code, notes, and snippets.

Download v2 API

/v2/bulk_download/awards (POST)

Request

POST a JSON body:

{

Spending By Award Count

Route: /api/v2/search/spending_by_award_count/

Method: POST

This route takes award filters, and returns the number of awards in each award type (Contracts, Loans, Gran.

Request

filter: Defines how the awards are filtered. The filter object is defined here.

Spending By Award

Route: /api/v2/search/spending_by_award/

Method: POST

This route takes award filters and fields, and returns the fields of the filtered awards.

Request

field: Defines what award variables are returned.

Spending By Geography

Route: /api/v2/search/spending_by_geography/

Method: POST

This route takes award filters, and returns spending by state code.

Request

scope: Scope defines what location is used for filtering the aggregated_amount.

Spending By Category

Route: /api/v2/search/spending_by_category/

Method: POST

This route takes award filters, and returns spending by the defined category/scope. The category is defined by the "category" var, and the scope is defined by is denoted by the "scope" var.

Request

"category": What variable the aggregated_amount is broken up by.

Spending Over Time

Route: /api/v2/search/spending_over_time/

Method: POST

This route takes award filters, and returns spending by time. The amount of time is denoted by the "group" value.

Request

group: how the data is broken up. ex: "quarter", "fiscal_year", "month"

Download

Route: /api/v2/download/

Method: POST

This route sends a request to the backend to retrieve award IDs matching the specified search text.

Request example

CFDA Autocomplete

Route: /api/v2/autocomplete/cfda/

Method: POST

This route sends a request to the backend to retrieve award IDs matching the specified search text.

Request example

PSC Autocomplete

Route: /api/v2/autocomplete/psc/

Method: POST

This route sends a request to the backend to retrieve award IDs matching the specified search text.

Request example

Load Submission documentation

Call: python manage.py load_submission [options/args]

Purpose: Load submission data from submission file into the database

Flags: