Regulations Search
Status:
stableCategory:lookupAdded:2026-07-01Last reviewed:2026-10-14
Summary
Ranked search over the full Code of Federal Regulations — every title, at
section grain — plus an OSHA recordkeeping guidance corpus (FAQs, rulemaking
preamble excerpts, and letters of interpretation tied to 29 CFR 1904). Pass a
natural-language phrase, a partial word, or a section-number fragment like
1904.7 and get back the best-matching items with highlighted snippets.
Results carry a stable numeric id you feed to
/api/lookup/regulations/get for the complete text,
plus the code and label pair every lookup resource returns, so one
picker component works against every lookup search.
Endpoint
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/lookup/regulations/search |
| Full URL | https://engine.tripod-health.com/api/lookup/regulations/search |
| 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 |
|---|---|---|---|---|
q | string | Yes | — | Search text. Minimum two characters. Natural language, partial words, and section-number fragments all work; a query that looks like a section number (e.g. 1904.7) biases the ranking toward section-number prefix matches. |
type | string | No | regulation | One of regulation, guidance. Picks the corpus: CFR regulation text, or OSHA recordkeeping guidance. |
title | int | No | — | Restricts the search to one CFR title, 1–50. Regulation search only. |
part | string | No | — | Restricts the search to one CFR part (e.g. 1904). Regulation search only. |
section | string | No | — | Guidance search only. Filters to guidance items tagged to that section (e.g. 1904.5). |
limit | int | No | 10 | Maximum results to return. Range 1–50. |
Body
None.
Response
Success — 200 OK
{
"results": [
{
"type": "regulation",
"code": "50.20-3",
"label": "Criteria—Differences between medical treatment and first aid.",
"id": 106103,
"cfr_title": 30,
"part": "50",
"section": "50.20-3",
"heading": "Criteria—Differences between medical treatment and first aid.",
"content_type": "regulation",
"snippet": "multiple soakings, whirlpool **treatment**, **treatment** of infection, or other professional **treatments** and any **treatment** involving more than...amenable to **first** **aid** **treatment**.\n(ii) Medical **treatment** includes a series of **treatments** including soaks, whirlpool, skin grafts",
"score": 0.99
},
{
"type": "regulation",
"code": "1904.7",
"label": "General recording criteria.",
"id": 102444,
"cfr_title": 29,
"part": "1904",
"section": "1904.7",
"heading": "General recording criteria.",
"content_type": "regulation",
"snippet": "work or transfer to another job, medical **treatment** beyond **first** **aid**, or loss of consciousness. You must also...work, restricted work or job transfer, medical **treatment** beyond **first** **aid**, or loss of consciousness.\n(b) Implementation",
"score": 0.99
},
{
"type": "regulation",
"code": "Appendix V to Part 1918",
"label": "Appendix V to Part 1918—Basic Elements of a First Aid Training Program (Non-mandatory)",
"id": 103057,
"cfr_title": 29,
"part": "1918",
"section": "Appendix V to Part 1918",
"heading": "Appendix V to Part 1918—Basic Elements of a First Aid Training Program (Non-mandatory)",
"content_type": "appendix",
"snippet": "allergic reactions.\nc. the appropriate assessment and **first** **aid** **treatment** of a victim who has fainted.\n2. Bleeding...prophylaxis.\n3. Poisoning\nInstruction in the principles and **first** **aid** intervention of:\na. alkali, acid and systemic poisons",
"score": 0.99
}
],
"request_id": "95f78b51-bf75-4d47-b026-f9fd8ddf21db",
"timestamp": "2026-10-14T00:16:19.768Z"
}
results is always present. An empty array is a normal response (nothing
matched the query under the requested filters), not an error. Snippet text
wraps matched terms in ** markers — strip or render them as highlights.
Response fields
| Field | Type | Always present | Description |
|---|---|---|---|
results | array | Yes | Zero or more match objects, best match first. |
request_id | string | Yes | Correlation ID. Quote in support tickets. |
timestamp | string (ISO 8601 UTC) | Yes | Server time when the response was emitted. |
Regulation results (type=regulation)
| Field | Type | Always present | Description |
|---|---|---|---|
results[].type | string | Yes | Always regulation in this mode. |
results[].code | string | Yes | The lookup-family code: the same value as section. |
results[].label | string | Yes | The lookup-family label: the same value as heading. |
results[].id | integer | Yes | Stable numeric ID. Pass to /api/lookup/regulations/get ?id= for the full text. |
results[].cfr_title | integer | Yes | CFR title number, 1–50. |
results[].part | string | Yes | CFR part (e.g. "1904"). Treat as opaque text — some parts carry a letter suffix. |
results[].section | string | Yes | Section number (e.g. "1904.7"), or the full appendix designation for appendix items (e.g. "Appendix V to Part 1918"). |
results[].heading | string | Yes | Official section heading. |
results[].content_type | string | Yes | regulation for section text, appendix for appendix material. |
results[].snippet | string | Yes | Excerpt around the match. Matched terms are wrapped in ** markers; may contain \n line breaks. Not the full text. |
results[].score | number | Yes | Relevance score, higher is better. Use it to compare results within one response, not as an absolute threshold. |
Guidance results (type=guidance)
| Field | Type | Always present | Description |
|---|---|---|---|
results[].type | string | Yes | Always guidance in this mode. |
results[].code | string | Yes | The lookup-family code: the same value as identifier. |
results[].label | string | Yes | The lookup-family label: the same value as subject. |
results[].id | integer | Yes | Stable numeric ID. Pass to /api/lookup/regulations/get ?id=&type=guidance for the full text. |
results[].source_type | string | Yes | One of faq, interpretation (letter of interpretation), preamble (rulemaking preamble excerpt). |
results[].sections | array of string | Yes | The 29 CFR 1904 sections the item interprets (e.g. ["1904.5", "1904"]). |
results[].identifier | string | Yes | Natural identifier within its source_type — the OSHA FAQ number, letter date slug, or preamble slug. |
results[].subject | string | Yes | The item's subject line or question text. |
results[].snippet | string | Yes | Excerpt around the match, with ** markers on matched terms. |
results[].score | number | Yes | Relevance score, higher is better. |
Status codes
| Code | Meaning | When |
|---|---|---|
200 | OK | Search ran. results may be empty. |
400 | ValidationError | q missing or shorter than two characters, type not in the allowed set, title outside 1–50, part malformed, or limit out of range. |
401 | Unauthenticated | Missing or invalid API key. |
429 | RateLimited | Per-consumer rate limit exceeded. |
500 | InternalError | Unexpected failure. Quote request_id in the ticket. |
Examples
curl — regulation search
curl -sS "https://engine.tripod-health.com/api/lookup/regulations/search?q=first%20aid%20treatment&limit=3" \
-H "apikey: $ENGINE_API_KEY"
Returns the 200 body shown in Success above.
curl — guidance search
curl -sS "https://engine.tripod-health.com/api/lookup/regulations/search?q=parking%20lot&type=guidance&limit=2" \
-H "apikey: $ENGINE_API_KEY"
Receive (200):
{
"results": [
{
"type": "guidance",
"code": "5-1",
"label": "If a maintenance employee is cleaning the parking lot or an access road and is injured as a result, is the case work-related?",
"id": 69,
"source_type": "faq",
"sections": [
"1904.5",
"1904"
],
"identifier": "5-1",
"subject": "If a maintenance employee is cleaning the parking lot or an access road and is injured as a result, is the case work-related?",
"snippet": "Question: If a maintenance employee is cleaning the **parking** **lot** or an access road and is injured",
"score": 1
},
{
"type": "guidance",
"code": "5-10",
"label": "How does OSHA define a \"company parking lot\" for purposes of Recordkeeping?",
"id": 70,
"source_type": "faq",
"sections": [
"1904.5",
"1904"
],
"identifier": "5-10",
"subject": "How does OSHA define a \"company parking lot\" for purposes of Recordkeeping?",
"snippet": "Question: How does OSHA define a \"company **parking** **lot**\" for purposes of Recordkeeping?\n\nAnswer: Company **parking** **lots**...where the employer can limit access (such as **parking** **lots** limited to the employer's employees and visitors",
"score": 1
}
],
"request_id": "f80e4eee-3357-4357-af4a-bd9624281196",
"timestamp": "2026-10-14T00:16:20.651Z"
}
curl — section-number fragment
curl -sS "https://engine.tripod-health.com/api/lookup/regulations/search?q=1904.7" \
-H "apikey: $ENGINE_API_KEY"
Python (requests)
# Uses the call() helper from quickstart.md.
result = call("GET", "/api/lookup/regulations/search?q=first%20aid%20treatment&title=29&limit=5")
for row in result["results"]:
print(f"{row['id']:7} {row['code']:24} {row['label']}")
Node.js (native fetch)
// Uses the call() helper from quickstart.md.
const result = await call("GET", "/api/lookup/regulations/search?q=first%20aid%20treatment&title=29&limit=5");
for (const row of result.results) {
console.log(`${String(row.id).padEnd(7)} ${row.code.padEnd(24)} ${row.label}`);
}
TypeScript
interface RegulationSearchResult {
type: "regulation";
code: string;
label: string;
id: number;
cfr_title: number;
part: string;
section: string;
heading: string;
content_type: "regulation" | "appendix";
snippet: string;
score: number;
}
interface GuidanceSearchResult {
type: "guidance";
code: string;
label: string;
id: number;
source_type: "faq" | "interpretation" | "preamble";
sections: string[];
identifier: string;
subject: string;
snippet: string;
score: number;
}
interface RegulationsSearchResponse {
results: RegulationSearchResult[] | GuidanceSearchResult[];
request_id: string;
timestamp: string;
}
const result = await call<RegulationsSearchResponse>(
"GET",
"/api/lookup/regulations/search?q=first%20aid%20treatment",
);
Error scenarios
q too short
Send:
curl -sS "https://engine.tripod-health.com/api/lookup/regulations/search?q=a" \
-H "apikey: $ENGINE_API_KEY" \
-w "\nHTTP %{http_code}\n"
Receive (400):
{
"timestamp": "2026-10-14T00:16:20.904Z",
"error": "ValidationError",
"message": "Query parameter 'q' must be at least 2 characters",
"field": "q",
"request_id": "712de95c-ce18-47f4-9478-2ecac5ba3bdb"
}
Invalid title
Send:
curl -sS "https://engine.tripod-health.com/api/lookup/regulations/search?q=recordkeeping&title=99" \
-H "apikey: $ENGINE_API_KEY" \
-w "\nHTTP %{http_code}\n"
Receive (400):
{
"timestamp": "2026-10-14T00:16:21.146Z",
"error": "ValidationError",
"message": "Query parameter 'title' must be a CFR title number between 1 and 50",
"field": "title",
"request_id": "94f82d6f-d229-44df-b772-531c36b2a45a"
}
Intended use
- Finding the governing regulation text for a compliance question.
Search a phrase like
first aid treatmentormachine guarding, scan the snippets, then fetch the winningidvia/api/lookup/regulations/get. - Locating official OSHA recordkeeping guidance. Set
type=guidanceto search FAQs, preamble excerpts, and letters of interpretation; addsection=1904.5to see only guidance tagged to one section. - Resolving a half-remembered section number. A numeric query like
1904.7biases the ranking toward section-number prefix matches, so the section you meant surfaces first.
Mistaken use
- Do not use search to fetch a known section's full text. Use
/api/lookup/regulations/getwith?section=1904.7— search returns snippets, not the complete text. - Do not use search to browse a part's structure. Use
/api/lookup/regulations/tree— it returns one CFR part as a nested subpart/section outline in a single call. - Do not treat
snippetas quotable regulation text. Snippets are excerpts with**highlight markers inserted. Quote from thefull_textreturned by/api/lookup/regulations/get, which carries thesource_urlcitation. - Do not pass
titleorparton a guidance search, orsectionon a regulation search. Each filter belongs to one mode; the wrong-mode filter does not narrow the results.
Debugging
- Capture
request_idfrom the response body (or, if the response has no body from the engine, theX-Request-IDresponse header). - Empty
resultsfor a query you expected to match. Check the filters first —title=29on a phrase that lives in another title, orsection=narrowing guidance to a section the item is not tagged to, both produce clean empty responses. - A section-number query returns unrelated prose matches. Include
the whole fragment (
1904.7, not.7) — the numeric-prefix bias keys off a query that looks like a section number. - Guidance results seem missing for a non-1904 topic. Expected: the
guidance corpus covers OSHA recordkeeping under 29 CFR 1904. For other
topics, search the regulation corpus (
type=regulation).
Rate limits
See rate-limits.md for the current per-consumer limits.
Related
- lookup-regulations-get.md — fetch one item's complete
text by
idor section number. - lookup-regulations-tree.md — browse one CFR part as a nested subpart/section outline.
- recordability-analyze.md, recordability-factor.md, work_relatedness-analyze.md — the OSHA recordability analysis endpoints ground their AI reasoning in this same regulation and guidance content.
- lookup-naics-search.md,
lookup-icd10cm-search.md,
lookup-cpt-search.md,
lookup-fee_schedule-search.md — the
other lookup searches, which share the same
q,limit,code, andlabelrules. - 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/search to /api/lookup/regulations/search. Every hit adds code and label beside the existing fields (a regulation's section and heading, a guidance item's identifier and subject). Examples recaptured. |
| 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. |