Loading documentation

Access required

Your account doesn't have access to the documentation. Contact your administrator.

Sign out
Skip to main content

Regulations Tree

Status: stable Category: lookup Added: 2026-07-01 Last reviewed: 2026-10-14

Summary​

Returns one CFR part as a nested subpart/section tree, in document order. Use it to build a browse or navigation surface over a part — each leaf entry carries the section number, its official heading, and a stable id, so your application can render the part's structure and fetch individual sections selectively via /api/lookup/regulations/get.

The tree carries headings only, never section text. It answers "what is in this part and in what order," not "what does this section say."

Endpoint​

FieldValue
MethodGET
Path/api/lookup/regulations/tree
Full URLhttps://engine.tripod-health.com/api/lookup/regulations/tree
AuthenticationAPI key (required)
Request bodynone
Response bodyapplication/json
IdempotentYes
Rate-limitedYes

Authentication​

Send a valid API key in the apikey header. See authentication.md.

Request​

Headers​

HeaderRequiredDescription
apikeyYesConsumer API key.

Path parameters​

None.

Query parameters​

ParameterTypeRequiredDefaultDescription
titleintegerYes—CFR title number, 1–50. OSHA recordkeeping lives under title 29.
partstringYes—CFR part number within the title, e.g. 1904. Treat as opaque text.

Both parameters are required. Omitting or malforming either returns 400 ValidationError naming the offending parameter.

Body​

None.

Response​

Success — 200 OK​

The response is the whole part as one nested object: the part's heading, then one node per subpart in document order, each holding its leaf entries in document order. Leaf entries are either regulation sections or appendices, distinguished by type.

The example below is the complete response for 29 CFR part 1904 (?title=29&part=1904): seven subparts and 34 leaf entries. Leaf entries are shown one per line for readability; the JSON is unchanged.

{
"cfr_title": 29,
"part": "1904",
"heading": "PART 1904—RECORDING AND REPORTING OCCUPATIONAL INJURIES AND ILLNESSES",
"children": [
{
"type": "subpart",
"subpart": "A",
"heading": "Subpart A—Purpose",
"children": [
{ "type": "regulation", "id": 102434, "section": "1904.0", "heading": "Purpose." }
]
},
{
"type": "subpart",
"subpart": "B",
"heading": "Subpart B—Scope",
"children": [
{ "type": "regulation", "id": 102436, "section": "1904.1", "heading": "Partial exemption for employers with 10 or fewer employees." },
{ "type": "regulation", "id": 102437, "section": "1904.2", "heading": "Partial exemption for establishments in certain industries." },
{ "type": "regulation", "id": 102438, "section": "1904.3", "heading": "Keeping records for more than one agency." },
{ "type": "appendix", "id": 102439, "section": "Non-Mandatory Appendix A to Subpart B of Part 1904", "heading": "Non-Mandatory Appendix A to Subpart B of Part 1904—Partially Exempt Industries" }
]
},
{
"type": "subpart",
"subpart": "C",
"heading": "Subpart C—Recordkeeping Forms and Recording Criteria",
"children": [
{ "type": "regulation", "id": 102441, "section": "1904.4", "heading": "Recording criteria." },
{ "type": "regulation", "id": 102442, "section": "1904.5", "heading": "Determination of work-relatedness." },
{ "type": "regulation", "id": 102443, "section": "1904.6", "heading": "Determination of new cases." },
{ "type": "regulation", "id": 102444, "section": "1904.7", "heading": "General recording criteria." },
{ "type": "regulation", "id": 102445, "section": "1904.8", "heading": "Recording criteria for needlestick and sharps injuries." },
{ "type": "regulation", "id": 102446, "section": "1904.9", "heading": "Recording criteria for cases involving medical removal under OSHA standards." },
{ "type": "regulation", "id": 102447, "section": "1904.10", "heading": "Recording criteria for cases involving occupational hearing loss." },
{ "type": "regulation", "id": 102448, "section": "1904.11", "heading": "Recording criteria for work-related tuberculosis cases." },
{ "type": "regulation", "id": 102449, "section": "1904.13-1904.28", "heading": "[Reserved]" },
{ "type": "regulation", "id": 102450, "section": "1904.29", "heading": "Forms." }
]
},
{
"type": "subpart",
"subpart": "D",
"heading": "Subpart D—Other OSHA Injury and Illness Recordkeeping Requirements",
"children": [
{ "type": "regulation", "id": 102452, "section": "1904.30", "heading": "Multiple business establishments." },
{ "type": "regulation", "id": 102453, "section": "1904.31", "heading": "Covered employees." },
{ "type": "regulation", "id": 102454, "section": "1904.32", "heading": "Annual summary." },
{ "type": "regulation", "id": 102455, "section": "1904.33", "heading": "Retention and updating." },
{ "type": "regulation", "id": 102456, "section": "1904.34", "heading": "Change in business ownership." },
{ "type": "regulation", "id": 102457, "section": "1904.35", "heading": "Employee involvement." },
{ "type": "regulation", "id": 102458, "section": "1904.36", "heading": "Prohibition against discrimination." },
{ "type": "regulation", "id": 102459, "section": "1904.37", "heading": "State recordkeeping regulations." },
{ "type": "regulation", "id": 102460, "section": "1904.38", "heading": "Variances from the recordkeeping rule." }
]
},
{
"type": "subpart",
"subpart": "E",
"heading": "Subpart E—Reporting Fatality, Injury and Illness Information to the Government",
"children": [
{ "type": "regulation", "id": 102462, "section": "1904.39", "heading": "Reporting fatalities, hospitalizations, amputations, and losses of an eye as a result of work-related incidents to OSHA." },
{ "type": "regulation", "id": 102463, "section": "1904.40", "heading": "Providing records to government representatives." },
{ "type": "regulation", "id": 102464, "section": "1904.41", "heading": "Electronic submission of Employer Identification Number (EIN) and injury and illness records to OSHA." },
{ "type": "regulation", "id": 102465, "section": "1904.42", "heading": "Requests from the Bureau of Labor Statistics for data." },
{ "type": "appendix", "id": 102466, "section": "Appendix A to Subpart E of Part 1904", "heading": "Appendix A to Subpart E of Part 1904—Designated Industries for § 1904.41(a)(1)(i) Annual Electronic Submission of Information From OSHA Form 300A Summary of Work-Related Injuries and Illnesses by Establishments With 20-249 Employees in Designated Industries" },
{ "type": "appendix", "id": 102467, "section": "Appendix B to Subpart E of Part 1904", "heading": "Appendix B to Subpart E of Part 1904—Designated Industries for § 1904.41(a)(2) Annual Electronic Submission of Information From OSHA Form 300 Log of Work-Related Injuries and Illnesses and OSHA Form 301 Injury and Illness Incident Report by Establishments With 100 or More Employees in Designated Industries" }
]
},
{
"type": "subpart",
"subpart": "F",
"heading": "Subpart F—Transition From the Former Rule",
"children": [
{ "type": "regulation", "id": 102469, "section": "1904.43", "heading": "Summary and posting of the 2001 data." },
{ "type": "regulation", "id": 102470, "section": "1904.44", "heading": "Retention and updating of old forms." },
{ "type": "regulation", "id": 102471, "section": "1904.45", "heading": "OMB control numbers under the Paperwork Reduction Act" }
]
},
{
"type": "subpart",
"subpart": "G",
"heading": "Subpart G—Definitions",
"children": [
{ "type": "regulation", "id": 102473, "section": "1904.46", "heading": "Definitions." }
]
}
],
"request_id": "13b660c9-18e8-4789-b88a-380ed16e8dd7",
"timestamp": "2026-10-14T00:16:22.728Z"
}

Response fields​

FieldTypeAlways presentDescription
cfr_titleintegerYesEchoes the requested title.
partstringYesEchoes the requested part.
headingstringYesOfficial part heading as published in the CFR.
childrenarrayYesSubpart nodes in document order.
children[].typestringYesAlways subpart at this level.
children[].subpartstringYesSubpart letter, e.g. "C".
children[].headingstringYesOfficial subpart heading.
children[].childrenarrayYesLeaf entries within the subpart, in document order.
children[].children[].typestringYesregulation or appendix.
children[].children[].idintegerYesStable identifier for the entry. Use it to enumerate what to fetch via /api/lookup/regulations/get.
children[].children[].sectionstringYesSection number (e.g. "1904.5"), a reserved range (e.g. "1904.13-1904.28"), or the full appendix designation.
children[].children[].headingstringYesOfficial heading of the section or appendix. Headings only — the tree never carries section text.
request_idstringYesCorrelation ID. Quote in support tickets.
timestampstring (ISO 8601 UTC)YesServer time when the response was emitted.

Status codes​

CodeMeaningWhen
200OKPart found; tree returned.
400ValidationErrortitle missing or not an integer 1–50, or part missing or malformed. field names the offender.
401UnauthenticatedMissing or invalid API key.
404NotFoundNo part matches (title, part).
429RateLimitedPer-consumer rate limit exceeded.
500InternalErrorUnexpected failure. Quote request_id in the ticket.

Examples​

curl​

curl -sS "https://engine.tripod-health.com/api/lookup/regulations/tree?title=29&part=1904" \
-H "apikey: $ENGINE_API_KEY"

Python (requests)​

# Uses the call() helper from quickstart.md.
tree = call("GET", "/api/lookup/regulations/tree?title=29&part=1904")
for subpart in tree["children"]:
print(subpart["heading"])
for entry in subpart["children"]:
print(f" {entry['section']}: {entry['heading']}")

Node.js (native fetch)​

// Uses the call() helper from quickstart.md.
const tree = await call("GET", "/api/lookup/regulations/tree?title=29&part=1904");
const leaves = tree.children.flatMap((s) => s.children);
console.log(`${tree.part}: ${leaves.length} entries`);

Error scenarios​

Missing parameter​

Send:

curl -sS "https://engine.tripod-health.com/api/lookup/regulations/tree?title=29" \
-H "apikey: $ENGINE_API_KEY" \
-w "\nHTTP %{http_code}\n"

Receive (400):

{
"timestamp": "2026-10-14T00:16:22.995Z",
"error": "ValidationError",
"message": "Query parameter 'part' is required",
"field": "part",
"request_id": "528811c3-b323-4e55-989c-a89a2e6a43d6"
}

Unknown part​

Send:

curl -sS "https://engine.tripod-health.com/api/lookup/regulations/tree?title=29&part=9999" \
-H "apikey: $ENGINE_API_KEY" \
-w "\nHTTP %{http_code}\n"

Receive (404):

{
"timestamp": "2026-10-14T00:16:23.344Z",
"error": "NotFound",
"message": "No part '9999' in CFR title 29",
"request_id": "018f464a-b09b-4772-9edb-81029565c9f7"
}

Intended use​

  • Building a browse/navigation UI over a part — the tree is already in document order and grouped by subpart, so it renders directly as a sidebar or table of contents.
  • Enumerating a part's sections to fetch selectively. Walk the leaves, pick the sections you need, and pull their full text via /api/lookup/regulations/get — one tree call replaces guessing at section numbers.
  • Detecting appendices. Appendices do not follow the part.section numbering scheme; the tree is the reliable way to discover they exist and what they are called.

Mistaken use​

  • Do not use the tree for text search. The tree matches nothing — it returns structure. Use /api/lookup/regulations/search to find sections by content.
  • Do not expect section text. Leaf entries carry headings only. Use /api/lookup/regulations/get to fetch the full text of a section or appendix.
  • Do not parse section as a number. Values include reserved ranges ("1904.13-1904.28") and full appendix designations. Treat the field as opaque display text and use id for lookups.

Debugging​

  1. Capture request_id from the response body (or, if the response has no body from the engine, the X-Request-ID response header).
  2. 400 ValidationError — both title and part are required; the field extra names the missing or malformed one. title must be an integer 1–50.
  3. 404 NotFound for a part you're sure exists — confirm the title is right. The same part number can exist under one title and not another.
  4. Fewer leaves than you expected — reserved section ranges are collapsed into a single entry (e.g. "1904.13-1904.28"), so the leaf count is lower than the raw section-number span.

Rate limits​

See rate-limits.md for the current per-consumer limits.

Change history​

DateChange
2026-07-01Initial publication.
2026-10-14Moved from /api/regulations/tree to /api/lookup/regulations/tree. Response shape unchanged. Examples recaptured; the success example now shows the complete part.
2026-10-14The X-Request-ID response header is the gateway's trace ID for the request and does not match request_id; quote request_id to support.