Regulations Tree
Status:
stableCategory:lookupAdded:2026-07-01Last 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
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/lookup/regulations/tree |
| Full URL | https://engine.tripod-health.com/api/lookup/regulations/tree |
| Authentication | API key (required) |
| Request body | none |
| Response body | application/json |
| Idempotent | Yes |
| Rate-limited | Yes |
Authentication
Send a valid API key in the apikey header. See
authentication.md.
Request
Headers
| Header | Required | Description |
|---|---|---|
apikey | Yes | Consumer API key. |
Path parameters
None.
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
title | integer | Yes | — | CFR title number, 1–50. OSHA recordkeeping lives under title 29. |
part | string | Yes | — | 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
| Field | Type | Always present | Description |
|---|---|---|---|
cfr_title | integer | Yes | Echoes the requested title. |
part | string | Yes | Echoes the requested part. |
heading | string | Yes | Official part heading as published in the CFR. |
children | array | Yes | Subpart nodes in document order. |
children[].type | string | Yes | Always subpart at this level. |
children[].subpart | string | Yes | Subpart letter, e.g. "C". |
children[].heading | string | Yes | Official subpart heading. |
children[].children | array | Yes | Leaf entries within the subpart, in document order. |
children[].children[].type | string | Yes | regulation or appendix. |
children[].children[].id | integer | Yes | Stable identifier for the entry. Use it to enumerate what to fetch via /api/lookup/regulations/get. |
children[].children[].section | string | Yes | Section number (e.g. "1904.5"), a reserved range (e.g. "1904.13-1904.28"), or the full appendix designation. |
children[].children[].heading | string | Yes | Official heading of the section or appendix. Headings only — the tree never carries section text. |
request_id | string | Yes | Correlation ID. Quote in support tickets. |
timestamp | string (ISO 8601 UTC) | Yes | Server time when the response was emitted. |
Status codes
| Code | Meaning | When |
|---|---|---|
200 | OK | Part found; tree returned. |
400 | ValidationError | title missing or not an integer 1–50, or part missing or malformed. field names the offender. |
401 | Unauthenticated | Missing or invalid API key. |
404 | NotFound | No part matches (title, part). |
429 | RateLimited | Per-consumer rate limit exceeded. |
500 | InternalError | Unexpected 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.sectionnumbering 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/searchto find sections by content. - Do not expect section text. Leaf entries carry headings only. Use
/api/lookup/regulations/getto fetch the full text of a section or appendix. - Do not parse
sectionas a number. Values include reserved ranges ("1904.13-1904.28") and full appendix designations. Treat the field as opaque display text and useidfor lookups.
Debugging
- Capture
request_idfrom the response body (or, if the response has no body from the engine, theX-Request-IDresponse header). 400 ValidationError— bothtitleandpartare required; thefieldextra names the missing or malformed one.titlemust be an integer1–50.404 NotFoundfor a part you're sure exists — confirm thetitleis right. The same part number can exist under one title and not another.- 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.
Related
- lookup-regulations-search.md — find sections by text content.
- lookup-regulations-get.md — fetch the full text of one section or appendix.
- lookup-icd10cm-tree.md, lookup-cpt-tree.md, lookup-fee_schedule-tree.md — the other lookup trees.
- authentication.md, errors.md, rate-limits.md, conventions.md — cross-cutting contract rules.
Change history
| Date | Change |
|---|---|
| 2026-07-01 | Initial publication. |
| 2026-10-14 | Moved from /api/regulations/tree to /api/lookup/regulations/tree. Response shape unchanged. Examples recaptured; the success example now shows the complete part. |
| 2026-10-14 | The 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. |