API for HCPCS (The Healthcare Common Procedure Coding System) Level II

The Level II HCPCS codes, according to the included README file, "are established by CMS's Alpha-Numeric Editorial Panel, primarily represent items and supplies and non-physician services not covered by the American Medical Association's Current Procedural Terminology-4 (CPT-4) codes; Medicare, Medicaid, and private health insurers use HCPCS procedure and modifier codes for claims processing. Level II alphanumeric procedure and modifier codes comprise the A to V range."

This service is provided "as is" and free of charge. Please see the Frequently Asked Questions page for more details on terms of service, etc.

API Demo

The following demo shows how this API might be used with an autocompleter we've developed.

For further experimentation with the autocompleter and this API, try the autocompleter demo page.

API Documentation

API Base URL: https://clinicaltables.nlm.nih.gov/api/hcpcs/v3/search (+ query string parameters)

This data set may also be accessed through the FHIR ValueSet $expand operation.

In addition to the base URL, you will need to specify other parameters. See the query string parameters section below for details.

Query String Parameters and Default Values

At a minimum, when using the above base URL, you will need to specify the "terms" parameter containing a word or partial word to match.

Parameter NameDefault ValueDescription
terms(Required.) The search string (e.g., just a part of a word) for which to find matches in the list. More than one partial word can be present in "terms", in which case there is an implicit AND between them.
maxList7 Optional, with a default of 7. Specifies the number of results requested, up to the upper limit of 500. If present but the value is empty, 500 will be used. Note that this parameter does not support pagination, see "count" and "offset" below for details on pagination support.
count7 The number of results to retrieve (page size). The maximum count allowed is 500, see "offset" below on pagination support.
offset0 The starting result number (0-based) to retrieve. Use offset and count together for pagination. Note that the current limit on the total number of results that can be retrieved (offset + count) is 7,500. We reserve the right to decrease or increase this limit based on system capacity and/or other factors. Please see the FAQ page on how to sign up to our email list to be notified of any changes or new features.
qAn optional, additional query string used to further constrain the results returned by the "terms" field. Unlike the terms field, "q" is not automatically wildcarded, but can include wildcards and can specify field names. See the Elasticsearch query string page for documentation of supported syntax.
dfcode,displayA comma-separated list of display fields (from the fields section below) which are intended for the user to see when looking at the results.
sfcode,short_desc,long_descA comma-separated list of fields to be searched.
cfcodeA field to regard as the "code" for the returned item data.
efA comma-separated list of additional fields to be returned for each retrieved list item. (See the Output format section for how the data for fields is returned.) If you wish the keys in the returned data hash to be something other than the field names, you can specify an alias for the field name by separating it from its field name with a colon, e.g., "ef=field_name1:alias1,field2,field_name3:alias3,etc. Note that not every field specified in the ef parameter needs to have an alias.

HCPCS Field Descriptions

FieldField Description
codeThe HCPCS code.
short_descThe "SHORT DESCRIPTION" value in the HCPCS data.
long_descThe "LONG DESCRIPTION" value in the HCPCS data.
displayNot an original HCPCS field. It's set to short_desc if exists, or long_desc if not.
add_dtThe "ADD DT" (or "ADD DATE" in NOC) value in the HCPCS data.
term_dtThe "TERM DT" (or "TERM DATE" in NOC) value in the HCPCS data.
act_eff_dtThe "ACT EFF DT" value in the HCPCS data.
obsoleteNot an original HCPCS field. Set to true if term_dt (terminated) is present, false otherwise.
is_nocNot an original HCPCS field. Set to true if the code is from the NOC (Not Otherwise Classified) codes, false otherwise. By default, NOC codes are included in the search results, but this field may be used to filter out NOC codes (q=is_noc:false) or to search for NOC codes only (q=is_noc:true)

Output format

Output for an API query is an array of the following elements:

  1. The total number of results on the server, which can be more than the number of results returned. This reported total number of results may also be significantly less than the actual number of results and is limited to 10,000, which may significantly improve the service response time.
  2. An array of codes for the returned items. (This is the field specified with the cf query parameter above.)
  3. A hash of the "extra" data requested via the "ef" query parameter above. The keys on the hash are the fields (or their requested aliases) named in the "ef" parameter, and the value for a field is an array of that field's values in the same order as the returned codes.
  4. An array, with one element for each returned code, where each element is an array of the display strings specified with the "df" query parameter.
  5. An array, with one element for each returned code, where each element is the "code system" for the returned code. Note that only code-system aware APIs will return this array.

Sample API Queries

QueryResultDescription
https://clinicaltables.nlm.nih.gov/api/hcpcs/v3/search?terms=air [65,["E0193","E0186","E0194","V5070","E0277","E0370","A0435"],null,[ ["E0193","Powered air flotation bed"], ["E0186","Air pressure mattress"], ["E0194","Air fluidized bed"], ["V5070","Glasses air conduction"], ["E0277","Powered pres-redu air mattrs"], ["E0370","Air elevator for heel"], ["A0435","Fixed wing air mileage"]]] Returns a list of 7 (out of 65 total) HCPCS records that match (or start with) "air".