Skip to navigation
Explore the dataAgencies, departments and offices

Agencies, departments and offices

Read government organizations through the organizations collection with the exact filter type = "agency". There is no separate /api/v1/agencies route. The same operation is available through both SDKs, CLI and MCP.

List agencies

curl --fail-with-body --get \
'https://app.defdex.io/api/v1/datasets/organizations' \
--header "Authorization: Bearer $DEFDEX_API_KEY" \
--data-urlencode 'filters={"type":"agency"}' \
--data-urlencode 'limit=25'
from defdex import DefDexClient
api = DefDexClient()
page = api.list("organizations", filters={"type": "agency"}, limit=25)
defdex list organizations --filters '{"type":"agency"}' --limit 25

For MCP, call search_records with {"dataset":"organizations","filters":{"type":"agency"},"limit":25}.

Choose the right level

FieldMeaning
idOrganization UUID for joins and exact id filters
sub_typeBroad grouping such as department, sub_agency or office
agency_levelPublished government hierarchy label, when present
agency_codePublished agency code; preserve leading zeros
office_codePublished office code, when present
parent_idPublished direct parent
navigation_parent_idSite navigation hierarchy; not a substitute for ownership or fiscal attribution

Narrow a request with multiple exact filters, for example {"type":"agency","sub_type":"department"}. Null hierarchy fields mean no published value, not evidence that the organization has no parent.

Read programs and awards

  1. Select the agency after checking its identity and hierarchy.
  2. Read programs with filters={"agency_id":"RETURNED_ORGANIZATION_UUID"}.
  3. Read the full awards dataset with awarding_agency_id, funding_agency_id or awarding_office_id, depending on the question.
  4. For published aggregate rows, use agency-summary-totals and agency-award-summaries with organization_id.

Awarding and funding agencies are distinct. Agency codes in baseline summary collections are not organization UUIDs. Use the schema’s code field when querying summaries, and do not turn codes into UUIDs or match departments by fuzzy names.