# ICD-10 Codes Scraper (`parseforge/icd10-codes-scraper`) Actor

Scrapes official ICD-10 and ICD-9 medical codes by keyword or code prefix and returns each match as a flat row with description and hierarchy data.

- **URL**: https://apify.com/parseforge/icd10-codes-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Other, Lead generation
- **Stats:** 2 total users, 0 monthly users, 89.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### ICD-10 Codes Scraper

**Scrape ICD-10-CM, ICD-10-PCS, and legacy ICD-9 diagnosis and procedure codes by keyword or code prefix.** Each result includes the official code, description, and hierarchical context, ready for clinical data pipelines and health informatics projects. Export to CSV, JSON, Excel, or XML.

Medical coding databases are essential for billing, research, and clinical informatics, but manually looking up codes is slow and error-prone. This actor queries the official ICD code sets directly, returning structured data for any search term or code prefix. It supports both current ICD-10 systems and legacy ICD-9 codes, making it suitable for historical data migration and modern application development.

| Who uses it | What they scrape ICD-10 Data for |
|---|---|
| Health informatics developers | Populating a clinical application's diagnosis lookup table with official ICD-10-CM codes. |
| Medical billers and coders | Verifying the description and validity of a specific procedure code before submitting a claim. |
| Healthcare data analysts | Building a reference dataset to map legacy ICD-9 codes to the current ICD-10 standard. |
| Healthtech startup founders | Bootstrapping a symptom-to-condition search feature without paying for a proprietary API. |

### What it does

This Actor collects ICD-10 and ICD-9 medical codes by keyword search or code prefix and returns each match as a flat, structured row.

- 🔍 **Keyword search:** Find codes by entering a condition name, symptom, or body part, such as 'diabetes' or 'femur fracture'.
- 📋 **Code prefix enumeration:** Enter the first few characters of a code to list all matching entries, useful for exploring a category.
- 🏛️ **Multi-system support:** Switch between ICD-10-CM diagnoses, ICD-10-PCS procedures, and legacy ICD-9-CM diagnosis and procedure sets.
- ⚙️ **Configurable volume:** Set a maximum number of codes to collect per run, from a single lookup to a million-row reference export.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with ICD-10 Data data

**🏥 Build a diagnosis lookup tool.**

A health informatics developer scrapes the full ICD-10-CM diagnosis set to populate the autocomplete search in their electronic health record application.

**📊 Migrate historical billing data.**

A healthcare data analyst collects the legacy ICD-9-CM procedure codes and their modern ICD-10-PCS equivalents to map decades of billing records to the current standard.

**📋 Validate claims before submission.**

A medical coder enters a procedure code prefix to verify its official description and ensure it matches the clinical documentation before the billing deadline.

**🔬 Curate a research dataset.**

An epidemiology researcher searches for all codes related to a specific condition to define a cohort for a retrospective study.

### Why choose this scraper

|  | What you get |
|---|---|
| **Official source data** | Queries the National Library of Medicine for authoritative code definitions and hierarchies. |
| **No API key required** | Accesses public clinical data feeds directly, avoiding registration and rate-limit hurdles. |
| **Legacy code support** | Includes ICD-9-CM diagnosis and procedure codes for historical data conversion projects. |
| **Structured flat output** | Every code is returned as a single row, ready for direct import into databases or spreadsheets. |

### How it compares

This actor focuses on querying the live NLM service across multiple code systems, while the alternatives listed below target specific static releases or different health data sources.

| Feature | ParseForge | ICD-10 Codes Scraper | ICD-10-CM Codes Scraper | MedlinePlus Scraper |
|---|---|---|---|---|
| Live NLM service query | Yes | Yes | Not listed | Not listed |
| ICD-10-PCS procedure codes | Yes | Not listed | Not listed | Not listed |
| Legacy ICD-9-CM support | Yes | Not listed | Not listed | Not listed |
| Keyword and symptom search | Yes | Yes | Not listed | Yes |
| Official CMS release export | Not listed | Not listed | Yes | Not listed |
| Consumer health topic summaries | Not listed | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor with a search term or code prefix, select the target code system, and set a maximum number of codes to return. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "searchTerm": "diabetes",
  "maxItems": 10,
  "codeSystem": "icd10cm"
}
```

A larger pull:

```json
{
  "searchTerm": "diabetes",
  "maxItems": 200,
  "codeSystem": "icd10cm"
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [ICD-10 Codes Scraper](https://apify.com/parseforge/icd10-codes-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to ICD-10 Data through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/icd10-codes-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results for my search term?**

Check that you have selected the correct code system. A procedure code will not be found in the ICD-10-CM diagnosis set. Try a shorter keyword or a broader term, and verify the spelling of the condition name.

**The actor is returning fewer codes than I expected.**

The 'Maximum codes' setting limits the total output. Increase this number if you need more results. Also, ensure your search term is not too specific; a broader prefix or keyword will match more codes.

**I need the hierarchical structure of codes, but the output looks flat.**

The actor returns each code as a flat row. Hierarchical context, such as parent category information, is included as fields within that row. You can reconstruct the tree structure in post-processing using these fields.

**Can I search for codes that were added or deleted in a specific year?**

The actor returns the current official code set. It does not filter by fiscal-year addenda or deletion status. For historical code changes, you would need to run the actor against archived data sources.

**The run takes a long time when I set a high maximum codes value.**

Enumerating tens of thousands of codes requires many sequential requests. Reduce the maximum codes if you only need a subset, or run the actor on an Apify plan with higher memory to improve throughput.

### FAQ

| Question | Answer |
|---|---|
| What is the difference between ICD-10-CM and ICD-10-PCS? | ICD-10-CM (Clinical Modification) is used for diagnosis coding in all U.S. healthcare settings. ICD-10-PCS (Procedure Coding System) is used exclusively for inpatient hospital procedure coding. |
| Can I scrape the entire ICD-10 code set? | Yes. Leave the search term empty and set the maximum codes to a high number to enumerate all codes in the selected system. The ICD-10-CM set contains roughly 72,000 codes. |
| Does this actor require an API key or login? | No. It reads publicly available data from the National Library of Medicine's clinical tables, so no registration, API key, or authentication is needed. |
| Can I search by a partial code? | Yes. Enter a code prefix like 'E11' to return all codes that start with that string, which is useful for exploring a category such as type 2 diabetes mellitus. |
| What export formats are supported? | The dataset can be exported in CSV, JSON, Excel, or XML formats from the Apify platform, or pushed directly to an external database via an integration. |
| Is the data up to date? | The actor queries the National Library of Medicine's live service, so it reflects the current official release of each code system. |
| Can I use this for ICD-9 codes? | Yes. The actor supports both ICD-9-CM diagnosis codes and ICD-9-CM procedure codes, which are useful for analyzing historical medical records. |
| How do I search for a condition by name? | Enter the condition name, symptom, or keyword into the 'Code or keyword' input field. The actor will return all matching codes and their official descriptions. |
| What is the maximum number of codes I can collect? | You can set the maximum up to 1,000,000 codes per run, which is more than enough to capture the entire ICD-10-CM and ICD-10-PCS code sets combined. |
| Is this actor suitable for production clinical systems? | It provides official code data suitable for populating reference tables and lookup features. Always validate the output against your specific clinical workflow and compliance requirements. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by National Library of Medicine. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `searchTerm` (type: `string`):

Search text (code prefix or condition name). Leave empty to enumerate codes.

## `maxItems` (type: `integer`):

How many ICD-10 codes to collect per run.

## `codeSystem` (type: `string`):

Which clinical code system to query.

## Actor input object example

```json
{
  "searchTerm": "diabetes",
  "maxItems": 10,
  "codeSystem": "icd10cm"
}
```

# Actor output Schema

## `results` (type: `string`):

Scraped ICD-10 Codes Reference Scraper - Diagnoses & Procedures records

# 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 = {
    "searchTerm": "diabetes",
    "maxItems": 10,
    "codeSystem": "icd10cm"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/icd10-codes-scraper").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 = {
    "searchTerm": "diabetes",
    "maxItems": 10,
    "codeSystem": "icd10cm",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/icd10-codes-scraper").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 '{
  "searchTerm": "diabetes",
  "maxItems": 10,
  "codeSystem": "icd10cm"
}' |
apify call parseforge/icd10-codes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/icd10-codes-scraper"
        }
    }
}

```

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/fHKUZRFVkU9Yk3FLp/builds/4WQBTV1FIMbdoPTkG/openapi.json
