NAICS Get
Status:
stableCategory:naicsAdded:2026-04-27Last reviewed:2026-04-27
Summary
Returns the full BLS injury and illness benchmark row for one NAICS
code. Use this when the user has already selected a code (typically
via /api/naics/search) and you need every rate
field — total recordable, DART, days-away, transfer/restriction, and
other-recordable — to display alongside an employer's reported numbers.
The dataset is the BLS Survey of Occupational Injuries and Illnesses,
reseeded annually. Lookups always return the latest published year for
the requested (naics_code, ownership) pair.
Endpoint
| Field | Value |
|---|---|
| Method | GET |
| Path | /api/naics/get |
| Full URL | https://engine.tripod-health.com/api/naics/get |
| 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. |
X-Request-ID | No | Optional correlation ID, up to 128 characters. Echoed in the response body's request_id and the X-Request-ID response header. |
Path parameters
None.
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
code | string | Yes | — | NAICS code, 2–6 digits. Treat as opaque text rather than parsing as a number — 01 is not the same as 1. |
ownership | string | No | private | One of private, state_government, local_government. Picks the BLS ownership cohort. |
Body
None.
Response
Success — 200 OK
{
"naics_code": "236220",
"industry_name": "Commercial Building Construction",
"ownership": "private",
"year": 2024,
"total_recordable_rate": 2.6,
"dart_rate": 1.4,
"days_away_rate": 0.7,
"transfer_restriction_rate": 0.7,
"other_recordable_rate": 1.2,
"request_id": "8f2c3b1d-5e4a-4a9c-9b1e-2a7f1d3e4c5b",
"timestamp": "2026-04-27T17:32:10.812Z"
}
Rate fields are nullable. BLS suppresses cells when the survey sample is
too small to publish a stable estimate. Per
conventions.md § Null vs. missing,
suppressed values are returned as explicit null, never omitted.
Response fields
| Field | Type | Always present | Description |
|---|---|---|---|
naics_code | string | Yes | Echoes the requested code. |
industry_name | string | Yes | Industry name as published by BLS. |
ownership | string | Yes | Echoes the requested ownership. |
year | integer | Yes | BLS release year for the returned row (today: 2024). Useful for detecting that an annual reseed has landed since your last lookup. |
total_recordable_rate | number | null | Yes | All recordable cases per 100 FTE. |
dart_rate | number | null | Yes | Days Away, Restricted, or Transferred (DART) cases per 100 FTE. Equal to days_away_rate + transfer_restriction_rate. |
days_away_rate | number | null | Yes | Cases involving days away from work, per 100 FTE. |
transfer_restriction_rate | number | null | Yes | Cases involving job transfer or restriction (no days away), per 100 FTE. |
other_recordable_rate | number | null | Yes | Cases requiring medical treatment beyond first aid but no DART, per 100 FTE. Equal to total_recordable_rate − dart_rate. |
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 | Row found. |
400 | ValidationError | code missing or not 2–6 digits, or ownership not in the allowed set. |
401 | Unauthenticated | Missing or invalid API key. |
404 | NotFound | No row matches (code, ownership). The pair may simply not be published in the requested ownership cohort. |
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/naics/get?code=236220" \
-H "apikey: $ENGINE_API_KEY"
Python (requests)
# Uses the call() helper from quickstart.md.
row = call("GET", "/api/naics/get?code=236220")
print(f"{row['industry_name']}: TRR={row['total_recordable_rate']} (year {row['year']})")
Node.js (native fetch)
// Uses the call() helper from quickstart.md.
const row = await call("GET", "/api/naics/get?code=236220");
console.log(`${row.industry_name}: TRR=${row.total_recordable_rate} (year ${row.year})`);
TypeScript
interface NaicsBenchmark {
naics_code: string;
industry_name: string;
ownership: "private" | "state_government" | "local_government";
year: number;
total_recordable_rate: number | null;
dart_rate: number | null;
days_away_rate: number | null;
transfer_restriction_rate: number | null;
other_recordable_rate: number | null;
request_id: string;
timestamp: string;
}
const row = await call<NaicsBenchmark>("GET", "/api/naics/get?code=236220");
Error scenarios
Unknown code
Send:
curl -sS "https://engine.tripod-health.com/api/naics/get?code=999999" \
-H "apikey: $ENGINE_API_KEY" \
-H "X-Request-ID: docs-naics-get-unknown" \
-w "\nHTTP %{http_code}\n"
Receive (404):
{
"timestamp": "2026-04-27T17:32:10.812Z",
"error": "NotFound",
"message": "No NAICS benchmark for code '999999' with ownership 'private'",
"request_id": "docs-naics-get-unknown"
}
Malformed code
Send:
curl -sS "https://engine.tripod-health.com/api/naics/get?code=2362ABC" \
-H "apikey: $ENGINE_API_KEY" \
-H "X-Request-ID: docs-naics-get-bad-code" \
-w "\nHTTP %{http_code}\n"
Receive (400):
{
"timestamp": "2026-04-27T17:32:10.812Z",
"error": "ValidationError",
"message": "Query parameter 'code' must be a 2-6 digit NAICS code",
"request_id": "docs-naics-get-bad-code",
"field": "code"
}
Intended use
- Filling out a benchmark display alongside an employer's reported numbers, after the user has chosen a code in your UI.
- Validating that a stored NAICS code is still published. A
404signals the (code, ownership) pair was either never published or has rolled out of the latest BLS release. - Detecting that a new BLS release has landed. Compare the
returned
yearto the one your client last saw — when it bumps, the whole table has been reseeded.
Mistaken use
- Do not call
/api/naics/getto do fuzzy matching. Use/api/naics/search— name-substring or numeric-prefix matching, ranked, with alimit. - Do not call
/api/naics/getand then run your own employer-vs- benchmark math client-side. Use/api/naics/calculate— it pulls the benchmark server-side and produces the comparison block in one round trip. - Do not parse
naics_codeas an integer. NAICS codes are strings. Numeric parsing collapses leading-zero distinctions and drops the trailing-digit semantics. Treat the field as opaque text.
Debugging
- Capture
request_id. Present in every response body and in theX-Request-IDresponse header. 404 NotFoundfor a code you're sure exists. Re-check?ownership=— most non-private codes are unpublished. The same code under?ownership=privatemay exist while?ownership=local_governmentdoes not.- Most rate fields are
null. Expected on narrow 6-digit codes where BLS suppressed the cells. Drop down to a 4- or 5-digit parent code if you need a populated row. yeardiffers from what you expected. A new BLS release has landed since the previous reseed. Refresh any cached values.
Rate limits
See rate-limits.md for the current per-consumer limits.
Related
- naics-search.md — type-ahead search to discover a code by industry name.
- naics-calculate.md — compute employer rates and compare against the benchmark.
- authentication.md, errors.md, rate-limits.md, conventions.md — cross-cutting contract rules.
Change history
| Date | Change |
|---|---|
| 2026-04-27 | Initial publication. |