Grants¶
Grant opportunities are exposed at /api/grants/. For field definitions, see the Grants Data Dictionary.
Endpoints¶
GET /api/grants/(list + filtering + search + ordering)GET /api/grants/{grant_id}/(detail)
Response Shaping¶
Grants default to the shaping pipeline — all responses go through shaping even without ?shape=. Use ?shape= to customize which fields are returned.
- List default:
grant_id,opportunity_number,agency_code,title,description,applicant_eligibility_description,funding_activity_category_description,grantor_contact,last_updated, plus expandedstatus(*),category(*),cfda_numbers(*),applicant_types(*),funding_categories(*),funding_instruments(*),funding_details(*),important_dates(*),additional_info(*) - Detail default: Same as list, plus
synopsis,forecast,opportunity_history
See Response Shaping for full syntax and the Grants Data Dictionary for field definitions.
Filtering¶
Core filters (date filters require YYYY-MM-DD format; invalid dates or inverted ranges return 400 — see Date filters):
| Param | What it does |
|---|---|
search | Full-text search (vector-backed). |
agency | Filter by agency abbreviation (substring). |
opportunity_number | Exact opportunity number. |
cfda_number | CFDA number (substring match). |
status | Opportunity status (case-insensitive choice). |
applicant_types | Eligibility/applicant types (case-insensitive choice). |
funding_categories | Funding category codes (case-insensitive choice). |
funding_instruments | Funding instruments (case-insensitive choice). |
posted_date | Posted date (exact, YYYY-MM-DD). |
posted_date_after, posted_date_before | Posted date range. |
response_date_after, response_date_before | Response/deadline date range. |
rank | Relevance rank threshold (primarily useful with search). |
Ordering¶
Grants support ordering= with a strict allowlist:
posted_date(also acceptslast_updated)deadline_currentrank(relevance ranking; most useful whensearchis present)
Examples:
- Most recently posted first:
GET /api/grants/?ordering=-posted_date - Soonest deadline first:
GET /api/grants/?ordering=deadline_current
Pagination¶
Grants use standard page-number pagination:
page(default 1)limit(max 100)
SDK examples¶
import os
from tango import ShapeConfig, TangoClient
client = TangoClient(api_key=os.environ["TANGO_API_KEY"])
resp = client.list_grants(
agency="HHS",
search="opioid",
ordering="-posted_date",
limit=10,
shape=ShapeConfig.GRANTS_MINIMAL,
)
for g in resp.results:
print(g.grant_id, g.posted_date, g.title)
import { ShapeConfig, TangoClient } from "@makegov/tango-node";
const client = new TangoClient({ apiKey: process.env.TANGO_API_KEY });
const resp = await client.listGrants({
agency: "HHS",
search: "opioid",
ordering: "-posted_date",
limit: 10,
shape: ShapeConfig.GRANTS_MINIMAL,
});
for (const g of resp.results) {
console.log(g.grant_id, g.posted_date, g.title);
}