Dashboard

LOINC API

Look up LOINC codes for laboratory and clinical observations.

Overview

LOINC (Logical Observation Identifiers Names and Codes) is the universal standard for identifying laboratory and clinical observations. FHIRfly provides fast lookups against the Regenstrief LOINC database.

Endpoints

Method Path Description
GET /v1/loinc/:code Single LOINC lookup
POST /v1/loinc/_batch Batch LOINC lookup (up to 100)
GET /v1/loinc/shapes List available response shapes

Single Lookup

Look up Glucose in Blood test

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

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

const result = await client.loinc.lookup("2339-0");
console.log(result.data);
Response
JSON
{
  "data": {
    "class": "CHEM",
    "code": "2339-0",
    "display_name": "Glucose, Blood",
    "fhir_coding": {
      "code": "2339-0",
      "display": "Glucose, Blood",
      "system": "http://loinc.org"
    },
    "long_name": "Glucose [Mass/volume] in Blood",
    "map_to": [],
    "order_obs": "Both",
    "parts": {
      "component": "Glucose",
      "method_typ": null,
      "property": "MCnc",
      "scale_typ": "Qn",
      "system": "Bld",
      "time_aspct": "Pt"
    },
    "shortname": "Glucose Bld-mCnc",
    "status": "ACTIVE",
    "units": {
      "example_ucum_units": "mg/dL",
      "example_units": "mg/dL"
    }
  },
  "meta": {
    "legal": {
      "attribution_required": true,
      "citation": "LOINC from Regenstrief Institute. Accessed 2026-01-14 via FHIRfly.",
      "license": "regenstrief_license",
      "source_name": "LOINC",
      "terms_of_use": "https://loinc.org/license/"
    }
  }
}

LOINC Code Format

LOINC codes follow the format NNNNN-N (e.g., 2339-0):

  • First part: 1-5 digits
  • Hyphen
  • Check digit

LOINC Code Parts

Part Description
Component What is measured (e.g., Glucose)
Property Type of measurement (e.g., MCnc = Mass concentration)
Time Point in time vs interval
System Specimen type (e.g., Bld = Blood)
Scale Quantitative, Ordinal, Nominal
Method How measured (optional)

Batch Lookup

Look up multiple LOINC codes in a single request (up to 100):

Look up multiple lab tests

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

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

const result = await client.loinc.lookupMany(["2339-0","718-7","2160-0"]);
console.log(result.data.results);
Response
JSON
{
  "count": 3,
  "results": [
    {
      "input": "2339-0",
      "code": "2339-0",
      "status": "ok",
      "data": {
        "display_name": "Glucose, Blood",
        "class": "CHEM"
      }
    },
    {
      "input": "718-7",
      "code": "718-7",
      "status": "ok",
      "data": {
        "display_name": "Hemoglobin",
        "class": "HEM/BC"
      }
    },
    {
      "input": "2160-0",
      "code": "2160-0",
      "status": "ok",
      "data": {
        "display_name": "Creatinine, Serum/Plasma",
        "class": "CHEM"
      }
    }
  ],
  "meta": {
    "legal": {
      "license": "Regenstrief Institute"
    }
  }
}

Batch with shape=full

When using shape=full on batch requests, the response includes meta.source with provenance information:

POST /v1/loinc/_batch?shape=full
{
  "count": 3,
  "results": [
    {
      "input": "2339-0",
      "code": "2339-0",
      "status": "ok",
      "data": { "display_name": "Glucose, Blood", "class": "CHEM" }
    }
  ],
  "meta": {
    "source": {
      "name": "LOINC",
      "url": "https://loinc.org/",
      "version": "2.78",
      "fhirfly_updated_at": "2026-03-01T03:00:00Z"
    },
    "legal": {
      "license": "Regenstrief Institute",
      "attribution_required": true,
      "terms_of_use": "https://loinc.org/license/"
    }
  }
}

Response Shapes

Control the level of detail in responses with the shape query parameter:

Shape Description
compact Code, display_name, shortname, class, component
standard + long_name, parts, status, units, fhir_coding
full + version info, ranks, source_org
# Minimal data
GET /v1/loinc/2339-0?shape=compact

# Standard data (default)
GET /v1/loinc/2339-0?shape=standard

# Full data with provenance
GET /v1/loinc/2339-0?shape=full

See Response Shapes for field details.

License Notice

LOINC data requires attribution. See the meta.legal field in responses for citation requirements.

Required Scopes

  • loinc.read - Single and batch lookups