Dashboard

LOINC Search API

Search Regenstrief's LOINC database for laboratory and clinical observation codes.

Endpoint

GET /v1/loinc/search

Quick Start

Node.js
import { Fhirfly } from "@fhirfly-io/terminology";

const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });

// Search for glucose tests in chemistry
const results = await client.loinc.search({
  q: "glucose",
  class: "CHEM"
});

console.log(`Found ${results.total} codes`);
for (const item of results.items) {
  console.log(`${item.code}: ${item.display_name}`);
}

Parameters

At least one text search parameter is required.

Parameter Description Example
q General text search q=hemoglobin
name Search display name name=glucose
component Search component (analyte) component=sodium

Filters

Parameter Type Description Example
class string LOINC class CHEM, HEM/BC
system string Specimen system Ser/Plas, Urine
property string Property measured MCnc, SCnc
scale string Scale type Qn, Ord, Nom
method string Method used Automated count
order_obs string Order/Observation Both, Order, Observation
status string LOINC status ACTIVE, DEPRECATED

Pagination & Response

Parameter Default Max Description
limit 20 100 Results per page
page 1 100 Page number
shape compact compact, standard, full

Example Response

{
  "facets": {
    "class": {
      "CHEM": 169
    },
    "order_obs": {
      "Both": 131,
      "Observation": 38
    },
    "scale": {
      "Qn": 154,
      "Ord": 7,
      "Nom": 2
    },
    "system": {
      "Ser/Plas": 19,
      "Urine": 22,
      "Bld": 10
    }
  },
  "has_more": true,
  "items": [
    {
      "class": "CHEM",
      "code": "51595-7",
      "component": "Glucose",
      "display_name": "Glucose, Stool",
      "shortname": "Glucose Stl Ql"
    },
    {
      "class": "CHEM",
      "code": "2349-9",
      "component": "Glucose",
      "display_name": "Glucose, Urine",
      "shortname": "Glucose Ur Ql"
    }
  ],
  "limit": 2,
  "meta": {
    "legal": {
      "attribution_required": true,
      "citation": "LOINC from Regenstrief Institute. Accessed 2026-01-28 via FHIRfly.",
      "license": "regenstrief_license",
      "source_name": "LOINC",
      "terms_of_use": "https://loinc.org/license/"
    }
  },
  "page": 1,
  "total": 169,
  "total_capped": false
}

Use Cases

Find Blood Chemistry Tests

Node.js
const results = await client.loinc.search({
  q: "sodium",
  class: "CHEM",
  system: "Ser/Plas"
});

Find Urinalysis Tests

Node.js
const results = await client.loinc.search({
  class: "UA",
  system: "Urine",
  order_obs: "Both"
});

Find Quantitative Tests

Node.js
// Qn = Quantitative (numeric result)
const results = await client.loinc.search({
  component: "hemoglobin",
  scale: "Qn"
});

Find Orderable Tests

Node.js
const results = await client.loinc.search({
  q: "complete blood count",
  order_obs: "Order"
});

LOINC Classes

Common LOINC classes:

Class Description
CHEM Chemistry
HEM/BC Hematology/Blood Cell Count
UA Urinalysis
MICRO Microbiology
SERO Serology
COAG Coagulation
DRUG/TOX Drug/Toxicology

Scale Types

Scale Description
Qn Quantitative (numeric)
Ord Ordinal (ordered categories)
Nom Nominal (unordered categories)
Nar Narrative (free text)
Doc Document

Facets

LOINC search returns these facets:

Facet Description
class Distribution by LOINC class
system Distribution by specimen system
scale Distribution by scale type
order_obs Distribution by order/observation

License Note

LOINC requires attribution. The meta.legal field includes:

  • attribution_required: true
  • Link to LOINC license terms

Required Scope

loinc.search

See Also