Quick Start
Get up and running with FHIRfly in under 5 minutes.
1. Install the SDK
Install the FHIRfly SDK from npm:
Node.js
npm install @fhirfly-io/terminology
2. Get Your API Key
Sign up at fhirfly.io/dashboard to create an account and generate your API key.
- Create an account using your email
- Create an organization
- Generate a Simple API credential
- Copy your API key (shown only once!)
3. Make Your First Request
Node.js
import { Fhirfly } from "@fhirfly-io/terminology";
const client = new Fhirfly({ apiKey: "YOUR_API_KEY" });
// Look up a drug by NDC
const result = await client.ndc.lookup("0069-0151-01");
console.log(result.data.brand_name); // "Lipitor"
Response
{
"data": {
"ndc": "0069-0151-01",
"brand_name": "Lipitor",
"generic_name": "Atorvastatin Calcium",
"labeler_name": "Pfizer Laboratories Div Pfizer Inc",
"dosage_form": "TABLET, FILM COATED",
"route": ["ORAL"],
"strength": "ATORVASTATIN CALCIUM 10 mg/1",
"is_active": true,
"type": "package"
},
"meta": {
"legal": {
"license": "public_domain"
}
}
}
4. Try More APIs
Node.js
// Look up a healthcare provider
const provider = await client.npi.lookup("1234567890");
console.log(`${provider.data.name.first} ${provider.data.name.last}`);
// Look up a lab code
const lab = await client.loinc.lookup("2345-7");
console.log(lab.data.display_name);
// Look up a diagnosis code
const dx = await client.icd10.lookup("E11.9");
console.log(dx.data.display);
// Batch lookup (up to 500 codes)
const drugs = await client.ndc.lookupMany([
"0069-0151-01",
"60505-0081-00",
"43547-0428-50"
]);
console.log(`Found ${drugs.count} drugs`);
Batch Response
Batch requests return results in a results array. With shape=full, the response includes meta.source provenance data:
{
"count": 3,
"results": [
{
"input": "0069-0151-01",
"ndc": "0069-0151-01",
"status": "ok",
"data": {
"brand_name": "Lipitor",
"generic_name": "Atorvastatin Calcium",
"labeler_name": "Pfizer Laboratories Div Pfizer Inc"
}
},
{
"input": "60505-0081-00",
"ndc": "60505-0081-00",
"status": "ok",
"data": {
"brand_name": "Sotalol Hydrochloride",
"generic_name": "Sotalol Hydrochloride",
"labeler_name": "Apotex Corp."
}
},
{
"input": "43547-0428-50",
"ndc": "43547-0428-50",
"status": "ok",
"data": {
"brand_name": "Pioglitazone",
"generic_name": "Pioglitazone Hydrochloride",
"labeler_name": "Solco Healthcare US, LLC"
}
}
],
"meta": {
"source": {
"name": "FDA NDC Directory",
"url": "https://www.fda.gov/drugs/drug-approvals-and-databases/national-drug-code-directory",
"version": "monthly",
"fhirfly_updated_at": "2026-03-01T03:00:00Z"
},
"legal": {
"license": "public_domain",
"attribution_required": false
}
}
}
Available APIs
| API | Description | Example Code |
|---|---|---|
| NDC | National Drug Codes | Drug product identification |
| NPI | National Provider Identifiers | Healthcare provider lookup |
| RxNorm | Drug terminology | Drug concept normalization |
| LOINC | Lab codes | Laboratory test identification |
| ICD-10 | Diagnosis codes | Medical diagnosis classification |
| CVX | Vaccine codes | Vaccine identification |
| MVX | Manufacturer codes | Vaccine manufacturer lookup |
| FDA Labels | Drug labels | Package insert information |
Next Steps
- Authentication Guide — API keys and OAuth2
- Response Shapes — Compact, standard, and full responses
- NDC API — Detailed NDC endpoint reference
- Rate Limits — Usage limits by plan