CMS.gov API

Health / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The CMS.gov Provider Data API gives access to Medicare and healthcare provider quality data from the Centers for Medicare and Medicaid Services. You need a free API key to use it, which you can obtain by registering on the data.cms.gov portal. It is useful for building healthcare comparison tools, hospital rating apps, or research dashboards.

💡

Beginner Tip

Obtain your free API key from data.cms.gov and include it as an X-App-Token header in your requests — the API follows the Socrata Open Data API (SODA) format, so you can use the , , and parameters to filter and paginate results.

Available Data

vehicle make and model
year and specifications
fuel economy
VIN decode data

Example Response

JSON Response
{
  "make": "Toyota",
  "model": "Camry",
  "year": 2025,
  "engine": "2.5L 4-cylinder",
  "fuel_economy": {
    "city_mpg": 28,
    "highway_mpg": 39
  },
  "msrp": 28400
}

Field Reference

provider_id Unique CMS identifier for the healthcare provider or facility.
provider_name Name of the hospital, clinic, or healthcare provider.
state Two-letter US state abbreviation where the provider is located.
overall_rating Overall quality star rating assigned by CMS (1-5 stars).
measure_score Numeric score for a specific quality measure or performance metric.

Implementation Example

const url = "https://data.cms.gov/provider-data/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

403 Forbidden or throttled response Requests without an API key are heavily rate-limited (1 request/second).
Always include your App Token in the X-App-Token header to increase your rate limit allowance.
Unexpected empty result set The filter clause may use incorrect field names or SQL syntax.
Check the dataset schema on data.cms.gov to confirm the exact column names before writing filter queries.
400 Bad Request on parameter Invalid SoQL (Socrata Query Language) syntax in the query parameter.
Use proper SoQL syntax, for example: =state='CA' rather than ?state=CA as a plain query param.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Health
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →