# Medical Code Lookup: ICD-10-CM, ICD-10-PCS, HCPCS & NDC (`lepidata/medical-code-lookup`) Actor

Look up ICD-10-CM diagnosis, ICD-10-PCS procedure, HCPCS Level II and NDC drug codes in bulk, or search code titles. Current public release files, versions on every row. Unofficial. No CPT.

- **URL**: https://apify.com/lepidata/medical-code-lookup.md
- **Developed by:** [Lepi Data](https://apify.com/lepidata) (community)
- **Categories:** Developer tools, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 code records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Medical Code Lookup: ICD-10-CM, ICD-10-PCS, HCPCS & NDC

*Unofficial tool. Not affiliated with or endorsed by CDC, CMS, FDA, NLM, HHS, AMA, ADA, or WHO. No HIPAA, CMS, or other certification is claimed. Reference data only: not medical, clinical, coding, billing, or reimbursement advice.*

Look up thousands of US medical codes in one run, or search code titles by keyword. Every run downloads the current public release files, so you get the codes, titles and flags as released, with the code-set version and source file on every row. It's for billing and claims tools, EHR and practice-management developers, health-data analysts and pharmacy apps.

**Input:** lists of ICD-10-CM diagnosis codes, ICD-10-PCS procedure codes, HCPCS Level II codes and modifiers, NDC drug codes, or a text search.

**Output:** one row per code.

- ICD-10-CM: short and long title, billable or header, parent code, child count, fiscal-year version and effective dates.
- ICD-10-PCS: short and long title, valid for reporting, section, table code and table title.
- HCPCS Level II: short and long description, procedure or modifier, active or terminated, add / effective / termination dates, action code, coverage code and its meaning, BETOS and type of service.
- NDC: product and package (brand, generic, labeler, dosage form, route, active ingredients and strengths, marketing category and dates, DEA schedule, package description) and the 11-digit 5-4-2 form.

**Not included:** CPT® (AMA) and CDT® (ADA) codes are licensed and are not in this tool. A CPT-format or D code gets a free `not-covered` row. SNOMED CT, LOINC and the ICD-10-CM index and tabular instructional notes are not included either.

### Input

- `icd10cmCodes`: e.g. `E11.9`, `E119`, `S72.001A`, or a header code like `E11`
- `icd10pcsCodes`: e.g. `0DTJ4ZZ`, or a 3-character table code like `0DT`
- `hcpcsCodes`: e.g. `J1100`, `G0438`, `E0114`, or a Level II modifier like `LT`
- `ndcs`: package NDCs in any FDA format (`0002-1433-80`, 10 or 11 digits) or product NDCs (`0002-1433`)
- `search` + `searchSystems` (`icd10cm` default, `icd10pcs`, `hcpcs`, `ndc`) + `billableOnly`: keyword search of code titles; every word must appear and the last word may be a prefix
- `maxResults`: up to 1,000 paid rows per run (up to 1,000 codes per run)

**Example:** `{"icd10cmCodes":["E11.9","I10"],"hcpcsCodes":["J1100"],"ndcs":["0002-1433-80"]}`

**Memory:** 2048 MB (default) handles everything. ICD-10 and HCPCS-only runs also work at 1024 MB.

### Output fields

`type`, `input`, `code_system`, `code`, `code_formatted`, `short_title`, `long_title`, `billable`, `header`, `parent_code`, `child_count`, `valid_for_reporting`, `table_code`, `table_title`, `hcpcs_type`, `short_description`, `long_description`, `status`, `effective_date`, `add_date`, `termination_date`, `action_code`, `coverage_code`, `coverage_code_meaning`, `betos`, `type_of_service`, `match`, `products`, `product_ndc`, `brand_name`, `generic_name`, `labeler_name`, `dosage_form`, `route`, `active_ingredients`, `package_ndc`, `ndc11`, `ndc11_formatted`, `package_description`, `version`, `effective_from`, `effective_to`, `source_file`, `source_url`, `retrieved_at`, `notice`, `attribution`

Free status rows (not charged): `invalid-input`, `invalid-code`, `not-covered`, `not-found`, `not-offered`, `not-available`, `source-error`, `no-results`, `free-plan-limit`, `charge-limit-reached`.

### Data source and compliance

- Source credit: US government public data. ICD-10-CM: CDC/NCHS order file (file obtained from cms.gov). ICD-10-PCS and HCPCS Level II: CMS release files. NDC: the FDA NDC Directory bulk file from openFDA (CC0). Each row carries the reference-data notice and the attribution line for its source.
- Each run downloads only the files your input needs: up to 6 requests per run: up to 4 file downloads plus 2 small index pages that list the newest file names, one request at a time, at least 1.1 seconds apart, with a declared User-Agent and contact address. Your codes never leave the run: they are matched inside the downloaded files.
- Do not send protected health information. Codes alone are not PHI; do not put patient names, dates or record numbers in the input.
- Data may lag new releases by a few days. Check the `version` field and confirm with the code-set publisher before clinical or claims use.
- Titles and descriptions are passed through as released. This tool adds no coding guidance of its own.
- Free-plan accounts get up to 100 results per run.

**Opt-out.** Removal requests: support@lepidata.com (handled within 30 days).
NDC labelers can ask to be removed by labeler code; their products then return a free `not-available` row in every run.

**Pricing.** Pay per result: $0.40 per 1,000 codes ($0.0004 each), the same price on every plan, no start fee. Free status rows are never charged.

# Actor input Schema

## `icd10cmCodes` (type: `array`):

Diagnosis codes, with or without the dot (E11.9 or E119). Header codes (E11) are returned too, marked billable=false.

## `icd10pcsCodes` (type: `array`):

7-character inpatient procedure codes (0DTJ4ZZ), or a 3-character table code (0DT).

## `hcpcsCodes` (type: `array`):

Level II codes (J1100, G0438, E0114) and 2-character Level II modifiers (LT, GA). CPT codes (5 digits) and CDT dental codes (D....) are not included and come back as a free not-covered row.

## `ndcs` (type: `array`):

Package NDCs (0002-1433-80, 00002143380, 10 or 11 digits) or product NDCs (0002-1433). Needs at least 2048 MB memory.

## `search` (type: `string`):

Words that must all appear in the code title, e.g. 'type 2 diabetes hyperglycemia'. The last word may be a prefix.

## `searchSystems` (type: `array`):

Used only with a text search.

## `billableOnly` (type: `boolean`):

Text search only: drop ICD-10 header codes that are not valid for reporting.

## `maxResults` (type: `integer`):

Upper limit on paid rows (looked-up codes, NDC matches and search results) for this run.

## Actor input object example

```json
{
  "icd10cmCodes": [
    "E11.9",
    "I10"
  ],
  "hcpcsCodes": [
    "J1100"
  ],
  "searchSystems": [
    "icd10cm"
  ],
  "billableOnly": false,
  "maxResults": 100
}
```

# Actor output Schema

## `items` (type: `string`):

All rows from this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "icd10cmCodes": [
        "E11.9",
        "I10"
    ],
    "hcpcsCodes": [
        "J1100"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lepidata/medical-code-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "icd10cmCodes": [
        "E11.9",
        "I10",
    ],
    "hcpcsCodes": ["J1100"],
}

# Run the Actor and wait for it to finish
run = client.actor("lepidata/medical-code-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "icd10cmCodes": [
    "E11.9",
    "I10"
  ],
  "hcpcsCodes": [
    "J1100"
  ]
}' |
apify call lepidata/medical-code-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lepidata/medical-code-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/G8jtXsrOfwVKkKkrQ/builds/RpmX84HohsheBaycG/openapi.json
