+Medical Codes API
Search ICD-10-CM, HCPCS Level II, LOINC and RxTerms codes from one API key, as clean JSON.
The API.SH Medical Codes API searches the US code sets that clinical and billing software needs every day. Look up ICD-10-CM diagnosis codes by word or code prefix and narrow by chapter, find HCPCS Level II codes for supplies, equipment, drugs and services with their added and terminated dates, search LOINC lab tests with component, method and usual units, and match drug names to RxTerms strengths and forms with their RxCUIs. A conditions search maps consumer-friendly condition names to ICD-10-CM and ICD-9 codes with MedlinePlus links. Every search pages the same way and returns the same JSON shape.
- 5 endpoints
- from $1 / 1,000 calls
- 1,000 free credits / month
- failed calls free
GET https://api.api.sh/medical-codes/v1/ conditions
{ "success": true } What you can build with the Medical Codes API
Diagnosis code autocomplete in an EHR or intake form
As a clinician or patient types, search ICD-10-CM by word or code prefix and show the code and name. Use the conditions search to accept plain-language names like "high blood pressure" and map them to ICD-10-CM codes.
Billing and claims checks
Look up HCPCS Level II codes by word or prefix and filter out obsolete or not-otherwise-classified codes, using the added, terminated and action effective dates to check a code was valid on the date of service.
Lab result mapping
Map local lab test names to LOINC numbers with their component, property, method, data type and usual units, so results from different labs line up in one record.
Medication pickers and e-prescribing prototypes
Search drug names and get each prescribable strength and form with its RxCUI, plus synonyms and the route, to build a medication list or a prescribing screen.
Clinical NLP and AI agents
Give a coding assistant or an AI agent code lookups over MCP so it can suggest ICD-10-CM, LOINC or RxTerms codes for free-text notes and show the official names next to them.
Medical Codes data you get
Field names from real responses. Numbers come parsed, URLs absolute, dates in ISO 8601.
Medical Codes API endpoints and prices
Every Medical Codes endpoint costs 1 credit per call: credits are $1 per 1,000 on a monthly plan, $2 pay-as-you-go. Pricing
| Medical condition search /medical-codes/ | $1 · $2 PAYG 1 credit |
| HCPCS code search /medical-codes/ | $1 · $2 PAYG 1 credit |
| ICD-10-CM diagnosis code search /medical-codes/ | $1 · $2 PAYG 1 credit |
| LOINC lab test search /medical-codes/ | $1 · $2 PAYG 1 credit |
| Drug names and strengths (RxTerms) /medical-codes/ | $1 · $2 PAYG 1 credit |
Call the Medical Codes API
Medical condition search: GET https://api.api.sh/medical-codes/
curl "https://api.api.sh/medical-codes/v1/conditions?q=asthma" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/medical-codes/v1/conditions",
params={"q": "asthma"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/medical-codes/v1/conditions");
url.searchParams.set("q", "asthma");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); # Google Sheets (API.SH add-on)
=APISH("/medical-codes/v1/conditions", "q", "asthma")
# Zapier, Make, n8n (verified node): pick the API.SH app,
# choose "Medical Codes" and "Medical condition search".
# AI agents (Claude, ChatGPT, Cursor): add the
# API.SH MCP server https://api.sh/mcp - Create a free accountConfirm your email and get 1,000 free credits every month. No card needed.
- Create an API keyOne key works for all 483 platforms.
- Send the requestJSON back in one call. Add
output=csvoroutput=ndjsonfor files.
Why API.SH for Medical Codes data
- Public data only: no Medical Codes login, cookies or account needed
- One key and one response shape for Medical Codes and 482 other platforms
- Built and maintained by API.SH, not third-party publishers
- Pay per call; errors on our side cost nothing
- Live status for every endpoint
API.SH vs the official Medical Codes API
The code sets are public, and free source APIs exist: the National Library of Medicine's Clinical Table Search Service offers ICD-10-CM and other code searches "as is", and the WHO ICD-API covers the international ICD-10 and ICD-11 after you register for an account. API.SH puts ICD-10-CM, HCPCS Level II, LOINC, RxTerms and consumer condition names behind one key, one JSON shape and one paging style, with Sheets, Zapier, Make, n8n and MCP support.
Reference sites such as ICD10Data, ICD List and AAPC Codify are built for people looking codes up by hand, and GitHub ICD-10 projects need you to host and update the code files yourself. API.SH gives you hosted, searchable code sets you call with one key.
Medical Codes API questions
What medical code data can I get?+
ICD-10-CM diagnosis codes with name and chapter (/medical-codes/v1/icd10), HCPCS Level II codes with descriptions, dates and obsolete status (/medical-codes/v1/hcpcs), LOINC lab tests with component, method and units (/medical-codes/v1/lab-tests), RxTerms drug names with strengths, forms and RxCUIs (/medical-codes/v1/drugs) and consumer condition names mapped to ICD-10-CM and ICD-9 codes with MedlinePlus links (/medical-codes/v1/conditions).
How much does the Medical Codes API cost?+
Every Medical Codes endpoint costs 1 credit per call. On a monthly plan 1,000 credits cost $1 (Starter is $50/month for 50,000 credits). Pay-as-you-go is $2 per 1,000 credits, with top-ups from $15 that never expire.
Is there a free ICD-10 API?+
Yes. Every account gets 1,000 free credits every month. That is 1,000 calls to /medical-codes/v1/conditions at 1 credit each. Free source APIs also exist, such as the National Library of Medicine's Clinical Table Search Service and the WHO ICD-API; API.SH adds HCPCS, LOINC and RxTerms under the same key and response format.
Where does the data come from?+
From the published US code sets: ICD-10-CM (the US clinical modification of ICD-10 maintained by the CDC), HCPCS Level II (codes billed to Medicare), LOINC for lab tests and clinical observations, and RxTerms for prescribable drug names, with MedlinePlus links for consumer condition names.
Do I need keys for the underlying sources?+
No. One API.SH key covers every medical code search. You do not register with the WHO, NLM or any other source.
Does it include CPT codes?+
No. CPT codes are not part of this API. It covers HCPCS Level II, which lists supplies, equipment, drugs and services billed to Medicare, along with ICD-10-CM, LOINC and RxTerms.
Can I use the ICD-10 API from Python?+
Yes. It is a plain HTTPS API that returns JSON, so any HTTP client works, and there is an official Python SDK. Search with q, set limit, and pass next_page back as page until it is null.
How do I get started?+
1. Sign up at api.sh. 2. Copy your API key. 3. Call /medical-codes/v1/icd10 with q set to a word such as diabetes or a code prefix such as E11. Request examples and every parameter are in the docs at https://api.sh/docs. You can also use the JS or Python SDK, Google Sheets, Zapier, Make, n8n or the MCP server at https://api.sh/mcp.