# NLM Clinical Tables API

> NLM Clinical Tables returns ICD-10-CM diagnosis codes and details as a workflow and API.

NLM Clinical Tables finds ICD-10-CM codes and official names from a plain-language condition description, with an optional result maximum. Explain diagnosis code returns an official name, category, chapter, and billable status for a supplied ICD-10-CM code, with or without a dot.

- Page: https://fous.com/workflows/nlm-clinical-tables
- Handle: `@nlm-clinical-tables`
- Category: [Health](https://fous.com/workflows/category/health)
- Source website: https://clinicaltables.nlm.nih.gov
- Last verified: Sep 29, 2026
- Fous is not affiliated with NLM Clinical Tables.

## Methods

### Explain diagnosis code

Operation `explain_diagnosis_code`, version 1. 1 credit per call.

Explain an ICD-10-CM diagnosis code with its official name, category, chapter, and whether it is billable. Codes are checked against the current NLM table and the corresponding official classification.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `code` | string | yes | `"E119"` | ICD-10-CM diagnosis code as printed, with or without the dot (for example, E11.9 or E119). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "code"
  ],
  "properties": {
    "code": {
      "type": "string",
      "description": "ICD-10-CM diagnosis code as printed, with or without the dot (for example, E11.9 or E119).",
      "examples": [
        "E119",
        "B20",
        "E11"
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "code": "E119"
    },
    {
      "code": "B20"
    },
    {
      "code": "E11"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `code` | string | `"E11.9"` | Diagnosis code with a dot after the first three characters. |
| `chapter` | string | `"Endocrine, nutritional and metabolic diseases"` | ICD-10-CM chapter name in words. |
| `billable` | boolean | `true` | Whether the code is sufficiently specific to bill. |
| `page_url` | string | `"https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=E11.9&sf=code"` | Link to the code in the NLM Clinical Tables search. |
| `category_code` | string | `"E11"` | Three-character ICD-10-CM category code. |
| `category_name` | string | `"Type 2 diabetes mellitus"` | Official three-character category name. |
| `official_name` | string | `"Type 2 diabetes mellitus without complications"` | Official diagnosis name. |

**Example input**

```json
{
  "code": "E119"
}
```

**Example output**

```json
{
  "code": "E11.9",
  "chapter": "Endocrine, nutritional and metabolic diseases",
  "billable": true,
  "page_url": "https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=E11.9&sf=code",
  "category_code": "E11",
  "category_name": "Type 2 diabetes mellitus",
  "official_name": "Type 2 diabetes mellitus without complications"
}
```

### Search diagnosis codes

Operation `search_diagnosis_codes`, version 1. 1 credit per call.

Find ICD-10-CM diagnosis codes and official names from a plain-language condition description. Results follow the source search order; broad or unfamiliar wording may not match every relevant code.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `description` | string | yes | `"asthma"` | Condition in plain words, such as "type 2 diabetes with kidney problems". |
| `max_results` | integer | no | `3` | Maximum number of matching codes to return, such as 10 (up to 50). |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "description"
  ],
  "properties": {
    "description": {
      "type": "string",
      "minLength": 1,
      "description": "Condition in plain words, such as \"type 2 diabetes with kidney problems\".",
      "examples": [
        "asthma",
        "type 2 diabetes with kidney problems",
        "zyxqw impossible diagnosis"
      ]
    },
    "max_results": {
      "type": "integer",
      "default": 10,
      "maximum": 50,
      "minimum": 1,
      "description": "Maximum number of matching codes to return, such as 10 (up to 50).",
      "x-fous-developer": true,
      "examples": [
        3,
        50
      ]
    }
  },
  "additionalProperties": false,
  "examples": [
    {
      "description": "asthma",
      "max_results": 3
    },
    {
      "description": "type 2 diabetes with kidney problems"
    },
    {
      "description": "zyxqw impossible diagnosis"
    }
  ]
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `diagnosis_codes` | array |  | Matching ICD-10-CM diagnosis codes, best match first. |
| `diagnosis_codes[].code` | string | `"J45.998"` | ICD-10-CM diagnosis code used on forms. |
| `diagnosis_codes[].page_url` | string | `"https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=J45.998&sf=code&df=code%2Cname&count=1"` | NLM record lookup link for this code. |
| `diagnosis_codes[].official_name` | string | `"Other asthma"` | Official ICD-10-CM diagnosis name. |

**Example input**

```json
{
  "description": "asthma",
  "max_results": 3
}
```

**Example output**

```json
{
  "diagnosis_codes": [
    {
      "code": "J45.998",
      "page_url": "https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=J45.998&sf=code&df=code%2Cname&count=1",
      "official_name": "Other asthma"
    },
    {
      "code": "J82.83",
      "page_url": "https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=J82.83&sf=code&df=code%2Cname&count=1",
      "official_name": "Eosinophilic asthma"
    },
    {
      "code": "J45.909",
      "page_url": "https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?terms=J45.909&sf=code&df=code%2Cname&count=1",
      "official_name": "Unspecified asthma, uncomplicated"
    }
  ]
}
```

## Quick start

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@nlm-clinical-tables",
  "visibility": "public",
  "operation": "explain_diagnosis_code",
  "version": 1,
  "input": {
    "code": "E119"
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

body = json.loads("{\n  \"api\": \"@nlm-clinical-tables\",\n  \"visibility\": \"public\",\n  \"operation\": \"explain_diagnosis_code\",\n  \"version\": 1,\n  \"input\": {\n    \"code\": \"E119\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=120) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_000),
  body: JSON.stringify({
  "api": "@nlm-clinical-tables",
  "visibility": "public",
  "operation": "explain_diagnosis_code",
  "version": 1,
  "input": {
    "code": "E119"
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

Or describe the data in plain language: send `{"api":"@nlm-clinical-tables","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## Use cases

- Find diagnosis codes from condition descriptions
- Look up official names for diagnosis codes
- Check a code’s category and chapter
- Determine whether a diagnosis code is billable

## FAQ

### Is Fous affiliated with NLM Clinical Tables?

No. Fous is not affiliated with NLM Clinical Tables. This workflow reads the public clinicaltables.nlm.nih.gov website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a NLM Clinical Tables account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from clinicaltables.nlm.nih.gov when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check on Sep 29, 2026.

### Which ICD-10-CM codes match a condition description?

Search diagnosis codes finds matching codes and official names from a plain-language condition description.

### What is the official name for an ICD-10-CM code?

Explain diagnosis code returns the official diagnosis name for a supplied code.

### Is an ICD-10-CM code billable?

Explain diagnosis code returns whether the code is sufficiently specific to bill.

## Related

- [Mayo Clinic API](https://fous.com/workflows/mayo-clinic.md): Mayo Clinic provides health information from public condition pages, including condition overviews and, where available, diagnosis, treatment, home care, alternative medicine, and appointment preparation.
- [MedlinePlus API](https://fous.com/workflows/medlineplus.md): MedlinePlus provides health information from the U.S. National Library of Medicine, including condition and symptom overviews and explanations of tests with matching pages.
- [ClinicalTrials.gov API](https://fous.com/workflows/clinicaltrials-gov.md): ClinicalTrials.gov helps users find studies and view public trial records, including sponsor-run or funded studies; site distances are approximate, and contacts, eligibility, or exact dates may be missing.
- [WebMD API](https://fous.com/workflows/webmd.md): Plain-language health condition and symptom guides from WebMD.
- [PubMed API](https://fous.com/workflows/pubmed.md): PubMed searches medical and life-science articles by topic and retrieves one article’s abstract and publication details; abstracts and free full-text links may be unavailable.
- [NHS API](https://fous.com/workflows/nhs.md): NHS provides condition and medicine guidance, with condition dates reflecting the latest pages used, and nearby England service listings ordered by distance; availability details may be missing.
- [NPI Registry API](https://fous.com/workflows/npi-registry.md): NPI Registry returns public US provider search results with contact and taxonomy details, plus individual 10-digit NPI records with registry dates; fields may be missing.
- [Drugs.com API](https://fous.com/workflows/drugs-com.md): Drugs.com provides public medicine guides, interaction and food or lifestyle warnings for 2–10 medicines, pill matches by imprint, color, or shape, and listed US cash prices by strength, form, and quantity.
- [All Health workflows](https://fous.com/workflows/category/health)
