USAspending API ReferenceIndependent
Try the API

How a recipient profile is built

One recipient: totals, parent and child relationships, and awards over time.

A recipient profile covers one company, organization, or person that received federal money. The key detail is the recipient ID the page is built on.

Recipient IDs and levels

A recipient ID is a hash of the recipient's identifier plus a level suffix: -P for a parent, -C for a child, and -R for a recipient with no parent relationship. The same organization can have more than one profile, one for each level. Get IDs from POST /api/v2/recipient/, which is what the recipient list page calls, rather than building them yourself.

Reusing search endpoints

The charts on a recipient profile don't have endpoints of their own. They call the same search endpoints as Advanced Search with a recipient filter. If you can build an Advanced Search query, you can build these charts.

The calls, in order

  1. On the recipient list page

    POSTRecipient/api/v2/recipient/

    Search and sort all recipients.

  2. On load

    GETSpecific Recipient Duns/api/v2/recipient/{recipient_id}/

    The recipient id combines the unique identifier with a level: P (parent), C (child), or R (recipient).

  3. For parent recipients

    GETRecipient Children/api/v2/recipient/children/{duns_or_uei}/

    The list of child recipients.

  4. For the new awards chart

    POSTNew Awards Over Time/api/v2/search/new_awards_over_time/
  5. For transactions over time

    POSTSpending Over Time/api/v2/search/spending_over_time/

    The same search endpoint as Advanced Search, filtered to this recipient.

Sources

Traced from these files in the public usaspending-website repo:

Next: How an award summary is built

Loading…