NLM Clinical Table Search Service API
Free NLM Clinical Table Search Service with no key: autocomplete search over ICD-10-CM, LOINC, RxTerms, HPO, SNOMED conditions and NPI. Built for type-ahead boxes.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the NLM Clinical Table Search Service API?
The NLM Clinical Table Search Service is a free, key-free API providing fast prefix search across a dozen clinical terminologies including ICD-10-CM diagnosis codes, LOINC lab codes, RxTerms medication names, HPO phenotypes and the NPI provider registry.
Type-ahead is the use case this service was built for, and it shows in the response format. Instead of an array of objects you get a four-element positional array: total match count, an array of codes, a null slot reserved for extra data, and an array of display rows. That is a deliberately compact shape designed to be handed straight to an autocomplete widget with minimal parsing, and it is documented, not accidental.
One service covers many vocabularies by swapping a path segment: `icd10cm`, `icd11cm`, `loinc_items`, `rxterms`, `hpo`, `conditions`, `npi_idv` and more, each with its own searchable and displayable fields selected through `sf` and `df`. Be clear about what these codes are and are not. ICD-10-CM is the United States clinical modification and differs from the WHO ICD-10 used elsewhere, so codes are not portable between countries. The service returns terminology, not clinical guidance — it will tell you that E23.2 is the code for diabetes insipidus, and nothing whatsoever about what to do with that.
Quick facts
- Base URL
https://clinicaltables.nlm.nih.gov/api- Authentication
- No API key or account. The service is provided by the US National Library of Medicine. Most underlying vocabularies are freely usable, but some embedded terminologies carry their own licence terms — check the source vocabulary before redistributing large extracts.
- Rate limit
- No published limit. Responses are small and the service is designed for per-keystroke querying, so ordinary autocomplete traffic is expected.
- Pricing
- Free, with no registration.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the NLM Clinical Table Search Service API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Search ICD-10-CM for diagnosis codes matching 'diabetes'
GET https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=diabetes&maxList=3
curl 'https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=diabetes&maxList=3'const res = await fetch("https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=diabetes&maxList=3");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search?sf=code,name&terms=diabetes&maxList=3", timeout=20)
res.raise_for_status()
print(res.json())[
481,
[
"E23.2",
"N25.1",
"P70.2"
],
null,
[
[
"E23.2",
"Diabetes insipidus"
],
[
"N25.1",
"Nephrogenic diabetes insipidus"
],
[
"P70.2",
"Neonatal diabetes mellitus"
]
]
]Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(table) | path segment | Required | Which terminology to search: `icd10cm`, `loinc_items`, `rxterms`, `hpo`, `conditions`, `npi_idv` and others. icd10cm |
terms | query | Required | The search string. Matching is prefix and word based, tuned for partial input. diabetes |
sf | query | Optional | Search fields — which columns the term is matched against, comma separated. code,name |
df | query | Optional | Display fields — which columns appear in the fourth array element. code,name |
maxList | query | Optional | Maximum results to return. Defaults to 7, which suits a dropdown. 3 |
count | query | Optional | Page size when paging through a large result set. 50 |
offset | query | Optional | Zero-based offset for paging. 0 |
q | query | Optional | Additional Lucene-style filter applied alongside `terms`. code:E11* |
Response fields
[0]integer- Total number of matches for the search, not the number returned. The example reports 481 while returning 3.
[1]array- The codes themselves, in result order — `["E23.2","N25.1","P70.2"]`.
[2]null- Reserved slot for extra per-item data. Null unless you request extra fields; do not assume it is absent.
[3]array- Display rows, one array per result containing the columns named in `df` — code and description in the example.
What you can build with the NLM Clinical Table Search Service API
- Power a diagnosis-code autocomplete in a clinical form
- Validate that a user-entered ICD-10-CM code exists
- Look up LOINC codes for laboratory result mapping
- Search medication names for a prescribing interface
- Resolve a provider by name against the NPI registry
Common errors and how to fix them
Cannot find fields in the response
The response is a positional array, not objects.
Fix: Index it: element 0 is the count, 1 the codes, 3 the display rows. There are no field names in the payload at all.
Empty code array with a non-zero count
`df` did not include the columns you expected.
Fix: Set `sf` and `df` explicitly. The defaults differ per table and are not always what you want.
404
The table name in the path is wrong.
Fix: Table names are exact — `icd10cm` not `icd10`, `loinc_items` not `loinc`. The index page lists every valid one.
Codes rejected by a non-US system
ICD-10-CM is the US clinical modification.
Fix: It has more codes and greater specificity than WHO ICD-10. Use the appropriate national edition if you are outside the United States.
NLM Clinical Table Search Service API — frequently asked questions
Is the Clinical Table Search Service free?
Yes, free with no key or registration, provided by the US National Library of Medicine. Some of the vocabularies it indexes carry their own licence terms, so check the source before redistributing bulk extracts.
Why does the response look like a nested array instead of JSON objects?
Because it is optimised for autocomplete. The four elements are total count, codes, a reserved extra-data slot, and display rows. It keeps per-keystroke responses tiny at the cost of being unreadable without the documentation.
Which terminologies can I search?
ICD-10-CM and ICD-11, LOINC, RxTerms, HPO phenotypes, a curated conditions list, the NPI provider registry and several more. You choose by changing one path segment; the query parameters stay the same.
Is ICD-10-CM the same as ICD-10?
No. ICD-10-CM is the United States clinical modification, with substantially more codes and finer specificity than the WHO's international ICD-10. Codes from one are not reliably valid in the other, which matters if your users are outside the US.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
Text Compare
Compare two texts online free and highlight every difference. A private text comparison tool that finds matches and changes right in your browser.
NLM Clinical Table Search Service is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.