RxClass (Drug Classifications) API
Look up drug classification hierarchies from NLM MED-RT.
Overview
RxClass provides standardized drug classification data from the NLM/VA MED-RT system. Classifications organize drugs by mechanism of action, physiologic effect, pharmacologic class, and more. FHIRfly provides fast lookups against the RxClass hierarchy, including class membership queries.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/rxclass/:classId |
Single class lookup |
| POST | /v1/rxclass/_batch |
Batch lookup (up to 100) |
| GET | /v1/rxclass/shapes |
List available response shapes |
| GET | /v1/rxclass/:classId/members |
List drugs in a class |
Single Lookup
Look up an Established Pharmacologic Class
const response = await fetch(
"https://api.fhirfly.io/v1/rxclass/N0000175355",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
console.log(data);{
"data": {
"class_id": "N0000175355",
"class_name": "Angiotensin 2 Receptor Blocker",
"class_type": "EPC",
"source": "FDASPL",
"description": "Established Pharmacologic Class [EPC]"
},
"meta": {
"legal": {
"attribution_required": false,
"citation": "NLM MED-RT via RxClass. Accessed 2026-03-01 via FHIRfly.",
"license": "UMLS",
"source_name": "RxClass"
}
}
}Class Types
RxClass organizes drugs into multiple classification systems:
| Type | Full Name | Source | Description |
|---|---|---|---|
MoA |
Mechanism of Action | MED-RT | How the drug works at the molecular level |
PE |
Physiologic Effect | MED-RT | The drug's effect on body processes |
EPC |
Established Pharmacologic Class | FDA SPL | FDA-designated pharmacologic class |
TC |
Therapeutic Category | VA | Therapeutic use categories |
SC |
Structural Class | MED-RT | Chemical structure classification |
PK |
Pharmacokinetics | MED-RT | Drug absorption, distribution, metabolism |
Batch Lookup
Look up multiple class IDs in a single request (up to 100):
Look up multiple drug classes
const response = await fetch(
"https://api.fhirfly.io/v1/rxclass/_batch",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"codes": [
"N0000175355",
"N0000000225"
]
})
}
);
const data = await response.json();
console.log(data);{
"count": 2,
"results": [
{
"input": "N0000175355",
"class_id": "N0000175355",
"status": "ok",
"data": {
"class_name": "Angiotensin 2 Receptor Blocker",
"class_type": "EPC"
}
},
{
"input": "N0000000225",
"class_id": "N0000000225",
"status": "ok",
"data": {
"class_name": "Decreased Platelet Aggregation",
"class_type": "PE"
}
}
],
"meta": {
"legal": {
"license": "UMLS"
}
}
}Batch with shape=full
When using shape=full on batch requests, the response includes meta.source with provenance information:
POST /v1/rxclass/_batch?shape=full
{
"count": 2,
"results": [
{
"input": "N0000175355",
"class_id": "N0000175355",
"status": "ok",
"data": { "class_name": "Angiotensin 2 Receptor Blocker", "class_type": "EPC" }
}
],
"meta": {
"source": {
"name": "RxClass",
"url": "https://rxnav.nlm.nih.gov/RxClassIntro.html",
"version": "monthly",
"fhirfly_updated_at": "2026-03-01T03:00:00Z"
},
"legal": {
"license": "UMLS",
"attribution_required": false
}
}
}
Class Members
Retrieve the drugs that belong to a specific class:
List drugs in Angiotensin 2 Receptor Blocker class
const response = await fetch(
"https://api.fhirfly.io/v1/rxclass/N0000175355/members",
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY",
}
}
);
const data = await response.json();
console.log(data);{
"data": {
"class_id": "N0000175355",
"class_name": "Angiotensin 2 Receptor Blocker",
"member_count": 8,
"members": [
{
"rxcui": "83818",
"name": "valsartan",
"tty": "IN"
},
{
"rxcui": "52175",
"name": "losartan",
"tty": "IN"
},
{
"rxcui": "29046",
"name": "irbesartan",
"tty": "IN"
},
{
"rxcui": "321064",
"name": "olmesartan",
"tty": "IN"
}
]
},
"meta": {
"legal": {
"license": "UMLS",
"source_name": "RxClass"
}
}
}The members endpoint returns all drugs classified under the given class, linked by RxCUI. Use this to discover drugs by their pharmacologic properties rather than brand or ingredient name.
Response Shapes
Control the level of detail in responses with the shape query parameter:
| Shape | Description |
|---|---|
compact |
class_id, class_name, class_type |
standard |
+ source, description, parent classes |
full |
+ child classes, ingest metadata |
# Minimal data
GET /v1/rxclass/N0000175355?shape=compact
# Standard data (default)
GET /v1/rxclass/N0000175355?shape=standard
# Full data with provenance
GET /v1/rxclass/N0000175355?shape=full
See Response Shapes for field details.
Required Scopes
rxclass.read- Single and batch lookups, class member queries