How to find which providers bill a CPT code using free Medicare data
What CPT and HCPCS codes are, how to download CMS's free Medicare billing file, and how to find the providers and practices that bill a procedure code.
Every claim a clinic sends to an insurer lists the services it provided as codes. U.S. health plans use the same code sets, called CPT and HCPCS, so a code means the same thing whether the payer is Medicare, Medicaid or a commercial insurer. The Centers for Medicare & Medicaid Services (CMS) publishes the Medicare portion of that billing data by provider and by code as a free download. It makes it possible to find which providers bill a specific procedure. The 2024 file has 9,781,673 rows covering 1,207,473 providers and 6,471 codes.
This guide is for founders, sales and revenue leaders, marketers and go-to-market (GTM) engineers who sell to medical practices and need to know what a practice does, not only its specialty. Billing codes answer that, which makes them useful for lead generation, lead research, market segmentation, market research and financial projections.
The guide covers what CPT and HCPCS codes are, how to download and load the CMS file, how to query it for providers and practices, ten use cases, and what the data does not show.
Rather not build it yourself? Narwhalim is a searchable database of U.S. medical practices for sales teams, and each practice shows the procedures it bills most often. Start browsing free: any specialty, any state, the top 25 practices. No card.
All counts are from the CMS file for data year 2024.
What is a CPT code
CPT stands for Current Procedural Terminology. It is a set of codes, maintained by the American Medical Association (AMA), that describes the services a provider performs. Each service has a five-character code. A provider lists these codes on every claim, and the payer uses them to decide what to pay. The codes are not specific to Medicare. Federal rules under HIPAA name CPT and HCPCS as the standard code sets that health plans use for physician and other health care services (45 CFR 162.1002).
The number ranges of the main CPT sections group the codes by type of service. The exact ranges are in the AMA's codebook for each year, and published lists differ slightly at the edges:
| Section | Code range | Example |
|---|---|---|
| Evaluation and Management (office and hospital visits) | 99202–99499 | 99214: established patient office visit, moderate complexity |
| Anesthesia | 00100–01999 | |
| Surgery | 10004–69990 | 66984: cataract removal with lens implant |
| Radiology | 70010–79999 | |
| Pathology and laboratory | 80047–89398 | |
| Medicine | 90281–99607 | 92134: retinal imaging. 95810: sleep study in a sleep lab |
Evaluation and Management codes sit inside the number range of the Medicine section. The AMA lists them as their own section.
CPT and HCPCS
HCPCS (Healthcare Common Procedure Coding System, pronounced "hick-picks") is the code system used on U.S. health claims. It has two levels:
- Level I is CPT. These are the five-digit numeric codes, maintained by the AMA.
- Level II codes start with a letter. CMS maintains them for products, supplies and services that CPT does not cover, such as drugs (J codes), ambulance services (A codes) and some care-management and screening services (G codes). Examples:
J1010(injection of methylprednisolone),A0425(ambulance mileage) andG0439(annual wellness visit).
The CMS file has one column, HCPCS_Cd, that holds both. In the 2024 file:
| Code format | Codes in the file |
|---|---|
| Five digits (CPT) | 5,331 |
| Letter plus four digits (HCPCS Level II) | 929 |
| Four digits plus T (CPT Category III, for emerging technology) | 102 |
| Four digits plus U (proprietary laboratory tests) or M (multianalyte assays) | 109 |
CPT copyright
The AMA owns the copyright on CPT and requires a license for products that contain CPT content. The CMS data dictionary says CPT codes, descriptions and other data in the file are AMA copyright, and CMS presents an AMA license agreement to users who access the data. In the file, the description of a CPT code is the AMA's consumer-friendly descriptor, and the description of a Level II code is CMS's text, truncated to 256 bytes. Read the license terms before putting CPT descriptions in a product you sell.
Why billing codes matter for selling to practices
A specialty label does not tell you which services a practice offers. Retinal imaging (code 92134) shows the difference. In the 2024 file, 27,541 providers billed it. 14,191 of them are listed as optometrists and 13,276 as ophthalmologists. A search for ophthalmology practices finds about half of them.
Codes also show volume. The file reports how many Medicare patients a provider saw for each code and how much Medicare paid, so a list can be sorted by how active a practice is in the area you sell into.
I wrote more about matching practices by specialty here: How to find medical practices by specialty with NPI taxonomy codes.
Where the data comes from
CMS publishes three Medicare Physician & Other Practitioners datasets: by provider, by provider and service, and by geography and service. This guide uses by provider and service: one row for each provider, code and place of service. The dataset page is at data.cms.gov and the field definitions are in the data dictionary.
CPT codes appear on claims to every payer, but this file covers one: it is built from claims for Original Medicare Part B, which is fee-for-service Medicare. It does not include Medicare Advantage, Medicaid, commercial insurance or cash payments.
CMS removes any value that comes from fewer than 11 beneficiaries. The smallest beneficiary count in the file is 11, and 481,337 rows have exactly 11. A provider who billed a code for 10 patients does not appear.
How to download the Medicare provider and service file
The 2024 file is a 3.3 GB CSV. The file name includes the release and the data year (D24 is 2024), so it changes with each release:
curl -L -O https://data.cms.gov/sites/default/files/2026-05/b5ebab5a-f490-418a-9bce-4b9f31419356/PHY_R26_P05_V10_D24_Prov_Svc.csv
Downloading from the dataset page in a browser also works, and the page shows the AMA license agreement before the download. If the link has changed, get the current one from the dataset page. In testing, data.cms.gov refused requests from Python's requests library, so use curl or a browser to fetch the file.
The columns that matter
The file has 28 columns. One row is one provider, one code and one place of service.
| Column | Meaning |
|---|---|
Rndrng_NPI |
The provider's National Provider Identifier (NPI) |
Rndrng_Prvdr_Ent_Cd |
I for an individual, O for an organization, as registered in NPPES |
Rndrng_Prvdr_Last_Org_Name, Rndrng_Prvdr_First_Name |
Provider name |
Rndrng_Prvdr_St1, _City, _State_Abrvtn, _Zip5 |
Provider address, as reported in NPPES |
Rndrng_Prvdr_Type |
Specialty from the provider's claims, 113 types. For a provider with several, the one with the most services |
HCPCS_Cd, HCPCS_Desc |
The code and its description: the AMA's consumer-friendly text for CPT codes, CMS's text for Level II codes |
Place_Of_Srvc |
O for non-facility, generally an office, and F for facility, such as a hospital or surgery center |
Tot_Benes |
Distinct Medicare beneficiaries for this provider, code and place of service |
Tot_Srvcs |
Number of services provided. The unit that is counted varies by code |
Avg_Mdcr_Pymt_Amt |
Average amount Medicare paid per service, after deductible and coinsurance |
The file also has submitted charges, allowed amounts, standardized payments, a drug indicator and rural-urban fields.
How to load the file with DuckDB
DuckDB is a free database that runs inside a Python script and reads CSV files directly (pip install duckdb). The script below keeps 15 columns and converts the numbers.
import duckdb
SRC = "PHY_R26_P05_V10_D24_Prov_Svc.csv" # the name changes with each release
con = duckdb.connect("medicare_services.duckdb")
con.execute(f"""
CREATE OR REPLACE TABLE services AS
SELECT
Rndrng_NPI AS npi,
Rndrng_Prvdr_Ent_Cd AS entity_type,
Rndrng_Prvdr_Last_Org_Name AS last_or_org_name,
Rndrng_Prvdr_First_Name AS first_name,
Rndrng_Prvdr_St1 AS address,
Rndrng_Prvdr_City AS city,
Rndrng_Prvdr_State_Abrvtn AS state,
Rndrng_Prvdr_Zip5 AS zip5,
Rndrng_Prvdr_Type AS provider_type,
HCPCS_Cd AS code,
HCPCS_Desc AS description,
Place_Of_Srvc AS place_of_service,
CAST(Tot_Benes AS INTEGER) AS beneficiaries,
CAST(Tot_Srvcs AS DOUBLE) AS services,
CAST(Avg_Mdcr_Pymt_Amt AS DOUBLE) AS avg_payment
FROM read_csv('{SRC}', header = true, all_varchar = true)
""")
The script loads every column as text first and converts the three numeric columns explicitly. This keeps NPIs and ZIP codes as text.
How to find the providers that bill a CPT code
To list the providers in one state that billed a code, filter on the code and the state. This query finds the providers that billed retinal imaging (92134) in Texas, with their Medicare patient counts:
SELECT npi, first_name, last_or_org_name, provider_type, address, city, zip5,
SUM(beneficiaries) AS beneficiaries,
SUM(services) AS services
FROM services
WHERE code = '92134' AND state = 'TX'
GROUP BY ALL
ORDER BY beneficiaries DESC;
It returns 1,784 providers. The query sums over the two places of service, so a provider that billed the code in an office and in a facility appears once.
To see which specialties bill a code, group by provider type. For 92134 nationwide:
SELECT provider_type, COUNT(DISTINCT npi) AS providers
FROM services
WHERE code = '92134'
GROUP BY provider_type
ORDER BY providers DESC;
The top results are optometry (14,191), ophthalmology (13,276), physician assistants (36) and neurology (13).
From providers to practices
The file is organized by provider, not by practice. Every one of the 1,207,473 NPIs in the file has exactly one address, so grouping by address gives an approximate list of practices:
SELECT address, city, zip5, COUNT(DISTINCT npi) AS providers
FROM services
WHERE code = '92134' AND state = 'TX'
GROUP BY ALL
ORDER BY providers DESC;
The 1,784 Texas providers are at 1,069 distinct addresses. The address is as reported in NPPES, and it is a rough stand-in for a practice. The same building can be written several ways, and a practice can have several addresses. A provider who works in a hospital can be registered at the hospital's address. The top address in this result has 28 providers.
To add phone numbers, taxonomy codes and the authorized official, join on NPI to the NPPES registry. I wrote more about that file here: How to download the NPPES NPI file and build a list of medical practices.
Ten use cases for CPT data
A code set can stand in for a service line. These are ten groups of codes that founders selling to practices ask about now. Providers are NPIs with at least 11 Medicare patients for the code in 2024. Addresses are distinct provider addresses.
| Use case | Codes | Providers | Addresses | Most common provider types |
|---|---|---|---|---|
| Remote patient monitoring | 99453, 99454, 99457, 99458, 99091 | 7,550 | 5,661 | Internal medicine, family practice, nurse practitioner |
| Chronic care management | 99490, 99487, 99489, 99491 | 19,909 | 13,210 | Family practice, internal medicine, nurse practitioner |
| Transitional care management (after a hospital stay) | 99495, 99496 | 28,693 | 19,405 | Family practice, internal medicine, nurse practitioner |
| Annual wellness visit | G0438, G0439 | 110,794 | 58,066 | Family practice, internal medicine, nurse practitioner |
| Behavioral health integration | 99484, 99492, 99493, 99494, G0323 | 1,637 | 1,257 | Nurse practitioner, internal medicine |
| Continuous glucose monitoring | 95249, 95250, 95251 | 6,825 | 4,406 | Endocrinology, nurse practitioner |
| Obesity counseling and nutrition therapy | G0447, G0270, 97802, 97803, 97804 | 5,089 | 4,271 | Dietitian, internal medicine, family practice |
| Sleep testing | 95800, 95806, 95810, G0398, G0399 | 4,667 | 3,743 | Pulmonary disease, sleep medicine, neurology |
| Cognitive assessment and care planning | 99483 | 2,003 | 1,728 | Nurse practitioner, neurology |
| AI-assisted diabetic retinal imaging | 92229 | 69 | 63 | Family practice, internal medicine, endocrinology |
The last row shows an early market. Only 69 providers billed the automated retinal imaging code in 2024.
Finding clinics that do one service but not a related one
A list of clinics that already bill a service is useful for sales to clinics that do not. This query finds addresses where a provider billed chronic care management and nobody billed remote patient monitoring:
SELECT address, city, state, zip5, COUNT(DISTINCT npi) AS providers
FROM services
GROUP BY address, city, state, zip5
HAVING COUNT(*) FILTER (WHERE code IN ('99490','99487','99489','99491')) > 0
AND COUNT(*) FILTER (WHERE code IN ('99453','99454','99457','99458','99091')) = 0;
13,210 addresses have a provider billing chronic care management. 10,107 of them have no provider billing remote patient monitoring. In Texas the query returns 926 addresses. The reverse query, addresses that bill both, is a list of clinics that already run a monitoring program.
What the CPT data does not show
Services are units, not visits
Tot_Srvcs counts services in the unit of the code. Some units are small. The codes with the most services in the file include A0425 (ambulance mileage, 98,427,741 miles), Q9967 (contrast material, 95,202,153 milliliters) and J1010 (an injected drug, 74,842,826 milligrams). Ranking by services puts these above office visits. To rank by activity, use beneficiaries, the number of providers or payments.
Office and facility rows
A provider can bill the same code in an office and in a facility. 363,367 provider and code pairs appear in both. Cataract surgery (66984) has 10,370 facility rows and 5,577 office rows. The provider's address in the file is the one reported in NPPES. A surgeon who operates at an ambulatory surgery center still appears at the practice address on file. Sum the rows for a provider and a code, or filter on the place of service on purpose.
Original Medicare only
CPT codes are used by every payer, but this file counts one. Practices whose patients are mostly on Medicare Advantage, Medicaid or commercial insurance, or who pay cash, are under-represented. Pediatrics has little or no volume in the file, and so do cash-pay clinics. A low count in this file does not mean a practice does not offer a service.
Small counts and the data lag
Values for fewer than 11 beneficiaries are removed, so low-volume providers and new service lines are missing. The file also lags. It describes 2024, and codes created after that year have no rows. The advanced primary care management codes (G0556 to G0558) and the digital mental health treatment codes (G0552 to G0554) took effect on January 1, 2025, and neither set is in the file.
Beneficiary counts add up across providers
Tot_Benes counts patients for one provider, code and place of service. Summing it across providers, or across the two places of service, counts a patient more than once. For 92134, the sum of beneficiary counts is 4,373,805, which is not the number of patients.
Provider rows and organization rows
The file has 9,306,818 rows from 1,147,484 providers registered as individuals and 474,855 rows from 59,989 registered as organizations. The organizations are mostly vaccination billers, ambulance services, ambulatory surgery centers, pharmacies and laboratories. Check Rndrng_Prvdr_Ent_Cd before treating a row as a person.
Skip the build
Narwhalim is a database of U.S. medical practices for sales teams. Search by specialty and state, and each practice comes with its locations, phone numbers, the people who run it, its size, the procedures it bills most often, which electronic health record (EHR) system it uses, and whether it's affiliated with a health system.
Start browsing free: search any specialty and state and see the top 25 practices. No card.
Just need one list? Build it here and pay per practice.