Skip to main content

This feature is in closed beta.Interested in this feature? Get in touch with your Customer Success Manager.
POST /v3/compendium/search searches the compendium in two modes:
  • canonical: find and rank canonical tests only.
  • crosswalk: select one canonical test, then map it into per-lab candidates.

Request body

Validation rules

Canonical mode

  • query is required and must be non-empty.
  • loinc_set_hash is not allowed.
  • limit must be 1..10.

Crosswalk mode

  • Exactly one of query or loinc_set_hash is required.
  • limit must be 1..20.
  • include_related controls whether related canonical candidates are returned.
If validation fails, the API returns HTTP 422.

Search modes

1) canonical

Purpose: return ranked canonical tests only. Behavior:
  • Returns:
    • selected_canonical: top candidate (or null).
    • canonical_candidates: ranked list (up to limit).
  • per_lab and related are empty in this mode.

2) crosswalk

Purpose: choose one canonical test and expand it across labs. Entry points:
  • By text query: pick best canonical from query.
  • By loinc_set_hash: load canonical directly by hash.
Behavior:
  • If no canonical is found, response has:
    • selected_canonical = null
    • canonical_candidates = []
    • no per-lab candidates.
  • If canonical is found, returns:
    • one selected_canonical and same item in canonical_candidates
    • per_lab: candidates grouped by lab slug
    • related: related canonical tests (if include_related=true)

Canonical tests

“Canonical tests” are normalized, cross-lab test concepts. They are used to:
  • normalize query intent (display_name, aliases, loinc_codes, etc.)
  • create one canonical anchor (selected_canonical)
  • crosswalk into concrete provider/lab tests (per_lab)
Canonical ranking combines match quality and popularity score. The selected labs filter which per-lab candidates are returned in crosswalk mode.

Output schema

Notes:
  • confidence is model/service-generated and relative to result quality.
  • Omitting labs defaults to all supported labs (labcorp, quest, bioreference, sonora_quest).

Example requests

Canonical mode

Crosswalk mode by query

Crosswalk mode by canonical hash

For endpoint schema and try-it behavior, see the API reference page: Compendium Search.