Send a GET request to https://clinicaltables.nlm.nih.gov/api/icd10cm/v3/search with the parameter terms set to your search string and maxList to control result count.
Parse the JSON response array: index 0 is total matches, index 1 is the list of codes, index 3 is the list of display names corresponding to each code.
For ICD-10-PCS (procedure) codes, use the endpoint https://clinicaltables.nlm.nih.gov/api/icd10pcs/v3/search with the same parameter structure.
For SNOMED CT, LOINC, or RxNorm lookups, substitute the appropriate API path segment (e.g. /api/snomed/v3/search or /api/loinc/v3/search) and consult the NLM Clinical Tables documentation for field differences.
Use the df parameter to request specific display fields and the q parameter for additional field-specific filters where supported.
Cache frequently used lookups locally to reduce latency and API load; the NLM asks developers to be respectful of rate limits.
Known gotchas
The NLM Clinical Tables API is intended for search/autocomplete use cases, not bulk terminology downloads; for full terminology content, use UMLS Metathesaurus or NLM's dedicated distribution files.
ICD-10-CM codes are updated annually (October 1); hard-coded code lists will become stale and may return invalid codes—always validate codes against the current version.
Search results are ranked by relevance, not clinical specificity; always present options to a clinician for selection rather than auto-selecting the top result.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp