ICD-10-CM API
Free, anonymous, read-only access to U.S. ICD-10-CM code and term search, reviewed code guides, and release comparisons. No account or API key required.
DrSwarm serves approved records stored in PostgreSQL. This API is not wire-compatible with NLM Clinical Tables.
Quickstart
Prefer JSON POST for searches and comparisons. Put codes, terms, and dates in the request body, not browser URLs. Send only public reference values, never patient information, clinical notes, or claim data.
curl --disable --include --max-time 10 --request POST \
'https://drswarm.com/api/public/icd-10-cm/' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"terms":"E11.9"}'const response = await fetch("https://drswarm.com/api/public/icd-10-cm/", {
method: "POST",
credentials: "omit",
cache: "no-store",
redirect: "error",
referrerPolicy: "no-referrer",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({ terms: "hypertension" }),
signal: AbortSignal.timeout(10_000),
});
if (response.ok) {
const { release, results } = await response.json();
// Use only the returned fields and keep their release metadata.
}Cross-origin access (CORS) for this API applies only to these public endpoints and is noncredentialed. Do not send cookies or authorization headers.
Endpoints
All three support GET, HEAD, and POST. Use query parameters for GET and HEAD; HEAD has no response body. For POST, use Content-Type: application/json and send parameters only in the JSON body.
Search codes and terms
/api/public/icd-10-cm/
termsis required. Send a code or prefix (dotted or undotted) or short vocabulary terms: 2–80 characters including a letter or number.limitis an integer from 1 to 20 and defaults to 7. There is no cursor, offset, or total count.resultscontains matches for reportable codes in the current approved release:code(undotted),display_code,short_description,long_description, andis_reportable.- Each result has
editorial: a reviewed guide for the same code and release, ornull. Fields:description,hint,hint_source,guide_path, andupdated(YYYY-MM-DD).
Browse or search reviewed guides
/api/public/icd-10-cm/guides/
- Omit
termsto browse by code withGET, or send{"terms":"hypertension","limit":10}in aPOSTto filter the curated directory. Use the sametermsformat as search;limitdefaults to 10, maximum 20. - Keyset pagination: keep the same filter and pass the returned
next_afterasafter(an exclusive, uppercase, undotted code cursor). Stop whennext_afterisnull. resultsincludescode,display_code, and the reviewed guide fields above.descriptionis an AI-assisted DrSwarm explanation.hintis a workflow suggestion with ahint_sourcelabel and URL. Neither is official coding guidance.source_urlpoints to the official release.source_descriptionisnullunless the official title is separately approved for the directory.
Compare one code across releases
/api/public/icd-10-cm/changes/
- Send an exact
code(dotted or undotted) andfromandtodates inYYYY-MM-DDformat. For example:{"code":"E11.9","from":"2026-09-30","to":"2026-10-01"}. frommust be earlier thanto. The dates must resolve to distinct installed releases, both approved for public comparison.changeisadded,retired,changed,unchanged, ornot_in_either.changed_fieldslists differences inofficial_titleoris_reportablewhen the code is in both snapshots.- Each
fromandtosnapshot hasas_of,release, and anentrywithofficial_titleandis_reportable. Anentryofnullmeans the code is absent in that approved snapshot, not that the release is unavailable.
Use release.effective_from, release.effective_to, and release.revision to identify the effective dates and revision of the snapshot. Comparison includes this metadata on both sides. Search and guides do not fall back to older releases.
Shared public rate limits
Search, guides, and comparisons all count against the same rolling limits. Callers sharing a public IP share both per-IP limits.
- Peak per IP
- 25 requests/second
- Hourly per IP
- 500 requests/hour
- Global across all clients
- 1,000 requests/second
Plan for 500/hour: it often constrains sustained use long before the 25/s peak matters. At 25 requests/s, 500 requests take just 20 seconds.
On 429, wait at least as long as Retry-After before retrying. The JSON error includes contact_url set to /contact.
Availability and errors
An installed catalog is not automatically published. Official fields require approval for the release and endpoint. The examples do not imply a release is available.
400Invalid request- Check the parameters and JSON.
same_releasemeans both comparison dates resolve to the same release. 404 publication_pending- The release is installed but not approved for this endpoint.
404 no_release- No installed release covers the requested date.
404 no_guides- No reviewed directory is installed for the current release.
415Unsupported media type- Send
application/jsonfor POST. 503 service_unavailable- The public API is temporarily unavailable. Retry later.
A comparison release error includes side (from or to). Neither a missing nor an unapproved release tells you whether a code was retired. An empty results list on 200 means no matches on that page.
Handle 429 rate limits and temporary failures separately from empty results. Use bounded retries for temporary failures. Log only safe status or error codes, not request values or raw error details.
Permitted use
- Use approved responses in ordinary integrations under the public API terms. Respect source licenses and attribution requirements.
- No bulk export or unrestricted codebook redistribution. For full files, see the official CMS releases.
- The API only returns published reference material. It provides no patient, clinical, or claim records, access to private AI drafts, or live generation.
- Verify coding against the applicable official materials. A code or guide cannot determine a diagnosis, coverage, or payment.

