Organizations¶
Organizations are the unified Federal Hierarchy model exposed at /api/organizations/ (departments, agencies, offices, and other intermediate nodes).
If you’re looking for field definitions, see the Organizations Data Dictionary.
Endpoints¶
GET /api/organizations/(list + filtering + search)GET /api/organizations/{identifier}/(detail — accepts either an integer Federal Hierarchy key or a UUID primary key)
Filtering¶
| Param | What it does |
|---|---|
search | Multi-stage org search (aliases → trigram → full-text → fuzzy). |
type | Filter by organization type (lenient allowlist; invalid values are ignored + warnings may be returned). |
level | Filter by hierarchy level (1 = department, 2 = agency, etc.). |
cgac | Filter by CGAC code. |
parent | Filter by parent organization (accepts organization key or common names/abbreviations). |
include_inactive | Include inactive orgs in list results (default false). Detail lookups always return the org regardless of active status. |
Response shaping¶
Organizations support shape=... (see Response Shaping).
Default shape (no ?shape= param):
key, fh_key, name, short_name, type, level, is_active, code, fpds_code, cgac, canonical_code, parent_fh_key, full_parent_path_name
All responses go through the shaping pipeline, even without a ?shape= parameter.
Root fields available via shaping:
| Field | Description |
|---|---|
key | Tango's internal UUID primary key. |
fh_key | Zero-padded 9-character string (e.g., "000000001"). Accepted for detail lookups alongside key (UUID). |
name | Full official name. |
short_name | Abbreviation or common name (e.g., "DOD"). |
type | Organization type (DEPARTMENT, AGENCY, OFFICE, etc.). |
level | Hierarchy depth (1 = department). |
is_active | Whether the organization is currently active. |
code | Office or agency code. |
fpds_code | FPDS 4-digit agency code. |
cgac | CGAC 3-character code. |
canonical_code | Level-prefixed canonical code (e.g., "L1:097"). |
fpds_org_id | FPDS organization identifier. |
aac_code | Activity Address Code. |
parent_fh_key | Parent's fh_key (zero-padded). |
full_parent_path_name | Human-readable hierarchy path. |
l1_fh_key .. l8_fh_key | Ancestor fh_key at each hierarchy level (zero-padded). |
start_date | Organization start date from Federal Hierarchy. |
end_date | Organization end date from Federal Hierarchy. |
logo | Logo URL, when available. |
summary | Short description or mission summary. |
mod_status | Modification status (ACTIVE, INACTIVE). |
description | Organization description. |
obligations | Total rolled-up obligations (alias for tree_obligations). |
total_obligations | Direct obligations for this organization. |
tree_obligations | Obligations for the entire subtree. |
obligation_rank | Percentile ranking (1–100) by obligations. |
Expansions:
| Expand | Fields | Notes |
|---|---|---|
parent(...) | key, fh_key, name, short_name, type, level, is_active, code, cgac | Immediate parent org. |
ancestors(...) | fh_key, name, short_name, level | All ancestors from L1 down to immediate parent. |
children(...) | key, fh_key, name, short_name, type, level, is_active, code, cgac | Immediate child organizations. |
department(...) | code, name, abbreviation | L1 ancestor as a department. Returns null for level 1 orgs (they are the department). |
agency(...) | code, name, abbreviation | L2 ancestor as an agency. Returns null for level 1 and 2 orgs (no agency above them). |
# Default response (no shape param)
/api/organizations/
# Select specific fields
/api/organizations/?shape=fh_key,name,type,level
# Include department and agency expands
/api/organizations/?shape=fh_key,name,department(code,name),agency(code,name,abbreviation)
# Include enriched ancestors
/api/organizations/?shape=fh_key,name,ancestors(fh_key,name,short_name,level)
department and agency expand level behavior
The department expand returns null for level 1 organizations (a department doesn't have a department — it is one). The agency expand returns null for level 1 or 2 organizations (departments and agencies don't have an agency above them). This means list responses with mixed levels work without errors.
Ordering¶
/api/organizations/ does not support ordering=....
(Results are returned in a stable way; searches preserve their own relevance ordering, and non-search lists are returned in a consistent key order.)
Pagination¶
Organizations use standard page-number pagination:
page(default 1)limit(max 100)
SDK examples¶
The SDKs don’t yet expose a first-class list_organizations() / listOrganizations() method. You can still call the endpoint via the SDK’s internal HTTP helper.
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/organizations/", {
search: "Treasury",
type: "DEPARTMENT|AGENCY",
include_inactive: "false",
limit: 25,
});
console.log("count:", data.count);