Skip to content

Offices

Deprecated endpoint

This endpoint is deprecated. Use Organizations for the unified federal hierarchy. This endpoint will be removed in a future version.

Offices are sub-agency organizations exposed at /api/offices/.

If you need the unified Federal Hierarchy model (departments/agencies/offices all as one tree), see Organizations. For field definitions, see the Organizations Data Dictionary.

Endpoints

  • GET /api/offices/ (list)
  • GET /api/offices/{code}/ (detail)

Filtering

Param What it does
search Full-text search over offices (vector-backed).

Ordering

/api/offices/ does not support ordering=....

Pagination

Offices use standard page-number pagination:

  • page (default 1)
  • limit (max 100)

Response shaping

This endpoint supports response shaping via the shape query parameter.

  • Leaves: code, name, plus flat aliases office_code, office_name, agency_code, agency_name, department_code, department_name
  • Expansions:
  • agency(code,name,abbreviation)
  • department(code,name,abbreviation,description,cgac,website,congressional_justification)

Default shape (no ?shape= param): office_code,office_name,agency_code,agency_name,department_code,department_name (flat aliases)

# Default flat format
/api/offices/?shape=office_code,office_name,agency_name

# Direct leaves with nested expansion
/api/offices/4700/?shape=code,name,agency(code,name,abbreviation)

# Office with department details
/api/offices/4700/?shape=code,name,department(name,description,website)

SDK examples

The SDKs don’t yet expose a first-class list_offices() / listOffices() method. You can still call the endpoint via 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/offices/", params={"search": "OIG", "page": 1, "limit": 25})
print("count:", data.get("count"))
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/offices/", { search: "OIG", page: 1, limit: 25 });
console.log("count:", data.count);