Loans¶
Federal financial-assistance awards of direct loans and loan guarantees are exposed at /api/assistance/loans/. For field definitions, see the Loans Data Dictionary. For how assistance awards, transactions, listings and recipients fit together, see the Financial assistance overview. The other assistance endpoints, which take the same filters and shapes: Grant awards · Direct payments · Other assistance.
The endpoint holds every award whose GSDM assistance type is one of:
| Code | Assistance type |
|---|---|
F003 | Direct Loan |
F004 | Loan Guarantee |
Loans measure money differently from the other kinds of assistance. face_value_of_loan is the amount lent or guaranteed. loan_subsidy_cost is the estimated long-term cost of the loan to the government, and it's what pragmatic_obligations holds on a loan, so ordering=-pragmatic_obligations ranks loans by what they cost the government and compares with grants and payments. The award_total_face_value_of_loan and award_total_loan_subsidy_cost fields are USAspending's published totals for the award.
Endpoints¶
GET /api/assistance/loans/(list, with filtering, search and ordering)GET /api/assistance/loans/{key}/(detail)GET /api/assistance/loans/{key}/transactions/(the award's transactions, latest first)GET /api/assistance/loans/{key}/listings/(the award's money broken out by assistance listing, primary listing first)
Identifiers¶
key is the canonical award identifier, and it's what every detail and sub-route URL takes. The fain (Federal Award Identification Number, on non-aggregate records) and uri (Unique Record Identifier, on aggregate records) are the identifiers agencies report; filter on them to find an award's key.
- Retired keys still resolve. When USAspending retires an award ID in favor of another, the old ID is kept in the award's
former_award_keys. Requesting a retired key returns the award that carries it now, with its currentkeyin the body. The sub-routes accept retired keys too. - An award lives under one endpoint. An award's endpoint follows the assistance type of its latest action. If that type moves to another group (a grant reclassified as a direct payment, say), the award moves to the other endpoint with the same
key, and its old URL returns 404. - A key that names no award on this endpoint returns 404 on detail and an empty list on the sub-routes.
Filtering¶
Swagger is the canonical list of query parameters. Any parameter an endpoint doesn't recognize returns 400, and so does a one-character search, awarding_agency or funding_agency.
Multi-value filter syntax¶
Filters marked "OR via |" match any of several values. Separate them with | or the literal word OR:
cfda_number=93.778|93.767
Award identifiers¶
| Param | What it does |
|---|---|
key | Award key (exact). OR via |. |
fain | Federal Award Identification Number (exact). OR via |. |
uri | Unique Record Identifier, carried by aggregate records (exact). OR via |. |
funding_opportunity_number | The funding opportunity number the award was made under, as on the Grants.gov opportunity (exact). OR via |. |
Recipients¶
| Param | What it does |
|---|---|
uei | Recipient UEI (exact). OR via |. |
recipient | Recipient name or UEI. Each term matches the 100 recipients closest to it by name similarity, among recipients whose legal_business_name contains it (case-insensitive) and who have an award on this endpoint: 10 for a term under four characters or a bare business suffix such as inc or llc. A UEI-shaped term matches the recipient with that UEI. A term under three characters returns 400. Works for every recipient, with or without a UEI. OR via | only; the word OR is not a separator here. |
A broad recipient term covers only its closest names, not every recipient whose name contains it. To pin one recipient, filter on uei.
Agencies¶
| Param | What it does |
|---|---|
awarding_agency | Awarding agency (code, name or abbreviation; best-effort matching). OR via |. See Agency search. |
funding_agency | Funding agency or department, with the same matching as awarding_agency. OR via |. |
Programs and types¶
| Param | What it does |
|---|---|
cfda_number | The award's primary assistance listing (CFDA) number, e.g. 93.778. OR via |. An award funded under several programs matches only on its primary one; its other programs are in listings. |
assistance_type | GSDM assistance type code (F001–F010), case-insensitive. OR via |. This endpoint holds only F003, F004, so another code matches nothing. |
record_type | 1 (aggregate), 2 (non-aggregate) or 3 (non-aggregate to an individual, PII-redacted). OR via |. An unknown code matches nothing. |
business_funds_indicator | NON (not Recovery Act) or REC (Recovery Act), case-insensitive. OR via |. |
disaster_emergency_fund_code | Disaster Emergency Fund Code (DEFC), e.g. L, case-insensitive. Matches the code as a whole within the award's list, so L doesn't match inside another code. OR via |. |
Dates and fiscal years¶
All date filters require YYYY-MM-DD. Invalid dates or inverted ranges return 400. See Date filters.
| Param | What it does |
|---|---|
award_date | Award date (exact). |
award_date_gte, award_date_lte | Award date range. |
fiscal_year | Federal fiscal year of the award (exact, YYYY). |
fiscal_year_gte, fiscal_year_lte | Fiscal year range (YYYY). |
pop_start_date_gte, pop_start_date_lte | Period of performance start date range. |
pop_end_date_gte, pop_end_date_lte | Period of performance current end date range. |
Place of performance¶
| Param | What it does |
|---|---|
pop_state | State code, e.g. VA (case-insensitive). OR via |. |
pop_country | Country code, ISO 3166 alpha-3, e.g. USA (case-insensitive). OR via |. |
pop_zip | Five-digit ZIP code (exact). OR via |. |
Dollars¶
| Param | What it does |
|---|---|
obligated_gte, obligated_lte | Obligated amount range (USD). |
To compare dollar amounts across the four assistance endpoints, read pragmatic_obligations rather than obligated: it's the obligation for grants and payments, and the subsidy cost for loans. See the data dictionary.
Search¶
search runs full-text search over each award's:
- identifiers:
key,fain,uri, retired keys and assistance listing numbers; - recipient name, as normalized and as filed;
- assistance listing titles;
- descriptions: the award's base description and every distinct transaction description.
Descriptions are searchable but aren't returned in responses; read summary and title instead.
The syntax is web-search style:
| Input | Matches |
|---|---|
flood mitigation | Awards matching every word. |
broadband or fiber | Awards matching either word. |
housing -veterans | Awards matching housing but not veterans. |
"rural health" | Awards matching both words, anywhere. A quoted phrase is not matched as adjacent words on these endpoints. |
Words are matched in their English stem forms, so mitigate also matches mitigation.
search combines with every filter and with ordering. Two forms are fast: search alone, ordered by award_date or obligated, and search with only date or fiscal-year filters (award_date, award_date_gte, award_date_lte, fiscal_year, fiscal_year_gte, fiscal_year_lte), ordered by award_date. Any other filter or ordering, or exact=true, takes a slower path.
Ordering¶
ordering= accepts a strict allowlist; prefix a field with - for descending. The default is -award_date.
award_dateobligatedpragmatic_obligations
Examples:
- Newest first:
GET /api/assistance/loans/?ordering=-award_date - Largest first, comparable across endpoints:
GET /api/assistance/loans/?ordering=-pragmatic_obligations
Pagination and counts¶
The four list endpoints use cursor-based (keyset) pagination, like the other award endpoints (see Contracts pagination):
limitsets the page size.- Follow the
next/previousURLs; to build a request by hand, pass thecursorparameter from thenextURL.
A filtered request, including one filtered by uei or recipient, is counted exactly up to 10,000 results and estimated above that. An unfiltered request's count is an estimate. Add ?exact=true for an exact count; see Result counts.
The sub-routes use page-number pagination (page, limit):
| Sub-route | Default limit | Max limit |
|---|---|---|
/transactions/ | 100 | 500 |
/listings/ | 10 | 100 |
Response shaping¶
These endpoints support response shaping via ?shape=.
Default shape (list and detail, no ?shape= param):
key,fain,uri,award_date,fiscal_year,assistance_type(code,description),record_type,cfda_number,assistance_listing(number,title),title,obligated,pragmatic_obligations,face_value_of_loan,loan_subsidy_cost,awarding_office(*),funding_office(*),recipient(*),place_of_performance(*),period_of_performance(start_date,current_end_date)
Leaves: key, fain, uri, award_date, last_action_date, last_modified_date, fiscal_year, assistance_type, record_type, cfda_number, title, summary, purposes_differ, obligated, pragmatic_obligations, non_federal_funding_amount, indirect_cost_federal_share_amount, face_value_of_loan, loan_subsidy_cost, insurance_coverage_amount, award_total_obligated, award_total_outlayed, award_total_non_federal_funding, award_total_face_value_of_loan, award_total_loan_subsidy_cost, covid19_obligated, covid19_outlayed, iija_obligated, iija_outlayed, transactions_count, listings_count, assistance_types_count, award_amount_basis, award_recipient_basis, business_funds_indicator, disaster_emergency_fund_codes, funding_opportunity_number, funding_opportunity_goals_text, sai_number, former_award_keys, treasury_accounts_funding_this_award, federal_accounts_funding_this_award, object_classes_funding_this_award, program_activities_funding_this_award, transactions
Expansions:
| Expansion | Fields |
|---|---|
recipient(...) | uuid, uei, duns, legal_business_name, legal_business_name_raw, county, congressional_district, congressional_district_original, highest_owner, business_types |
recipient_address(...) | address_line1, address_line2, city, state_or_province_code, zip_code, zip_code_plus4, country_code, county_fips, state_fips, foreign_city_name, foreign_province_name, foreign_postal_code, congressional_district_original, congressional_district_current |
place_of_performance(...) | country, state_code, state_name, state_fips, county_fips, county_name, city_name, zip_code, zip_plus_four, code, scope, foreign_location |
awarding_office(...), funding_office(...) | organization_id, office_code, office_name, agency_code, agency_name, department_code, department_name |
assistance_listing(...) | number, title (from the assistance listings catalog) |
assistance_type(...) | code, description |
period_of_performance(...) | start_date, current_end_date |
officers(...) | highly_compensated_officer_1_name, highly_compensated_officer_1_amount, … through highly_compensated_officer_5_amount |
obligations_by_fiscal_year(...) | fiscal_year, obligated |
listings(...) | cfda_number, is_primary, obligated, pragmatic_obligations, non_federal_funding_amount, indirect_cost_federal_share_amount, face_value_of_loan, loan_subsidy_cost, transactions_count, first_action_date, last_action_date |
transactions(...) | key, modification_number, transaction_date, action_type, assistance_type_code, correction_delete_indicator, cfda_number, obligated, pragmatic_obligations, non_federal_funding_amount, indirect_cost_federal_share_amount, face_value_of_loan, loan_subsidy_cost, award_amount_basis, award_recipient_basis, action_date_fiscal_year, last_modified_date, initial_report_date |
A few behaviors worth knowing:
recipientis a shared recipient record, shaped like an entity. Every assistance recipient has one, including the many with no UEI, and every award to that recipient points at the same record. Its values are the latest the recipient filed, all taken from that one filing, so an old address never sits beside a new name.recipient.uuidis Tango's recipient identifier; for a recipient with a UEI it's the same UUID the entity carries.business_typesis a list of{code, description}using USAspending's recipient-type codes, not SAM.gov's (codes).recipient_addressis that record's address, with the entity endpoints' key names, plus the two congressional districts filed on this award. It'snullwhen every key is empty.- Aggregate and PII-redacted records (record types
1and3) have no recipient, sorecipientisnullon them. cfda_numberis always a plain field.assistance_listing(number,title)adds the program title from the catalog, and isnullwhen the catalog doesn't list the number.officersisnullwhen no officers are reported.obligations_by_fiscal_yearisnullwhen no transaction carries a date.transactionsis also available as a leaf, which returns every key of every transaction. For long award histories, the/transactions/sub-route pages through them instead.
Access¶
These endpoints are available on every plan, and no field on them is tier-gated (see Plans & Data Access). Call them with an API key or OAuth token (see Authentication), under the same rate limits as the other award endpoints. They aren't alertable: no webhook alert covers financial-assistance awards.
Examples¶
# Loans with places of performance in Virginia, fiscal year 2024
curl -H "X-API-KEY: $TANGO_API_KEY" \
"https://tango.dev/api/assistance/loans/?pop_state=VA&fiscal_year=2024"
# The costliest loans to the government, with face value and subsidy cost
curl -H "X-API-KEY: $TANGO_API_KEY" \
"https://tango.dev/api/assistance/loans/?ordering=-pragmatic_obligations&shape=key,award_date,face_value_of_loan,loan_subsidy_cost,pragmatic_obligations,recipient(legal_business_name)&limit=10"
# Loan guarantees only
curl -H "X-API-KEY: $TANGO_API_KEY" \
"https://tango.dev/api/assistance/loans/?assistance_type=F004&ordering=-award_date"
# One loan's transactions
curl -H "X-API-KEY: $TANGO_API_KEY" \
"https://tango.dev/api/assistance/loans/ASST_NON_8582749100_073/transactions/?limit=50"
SDK examples¶
See also: Full SDK method reference — tango-python methods · tango-node methods.
The official SDKs don't yet expose first-class methods for these endpoints. You can call them through the SDK's internal HTTP helper.
import os
from tango import TangoClient
client = TangoClient(api_key=os.environ["TANGO_API_KEY"])
data = client._get(
"/api/assistance/loans/",
params={"pop_state": "VA", "fiscal_year": 2024, "limit": 25},
)
for award in data["results"]:
print(award["key"], award["award_date"], award["obligated"])
import { TangoClient } from "@makegov/tango-node";
const client = new TangoClient({ apiKey: process.env.TANGO_API_KEY });
const http = (client as any).http;
const data = await http.get("/api/assistance/loans/", {
pop_state: "VA",
fiscal_year: 2024,
limit: 25,
});
for (const award of data.results) {
console.log(award.key, award.award_date, award.obligated);
}