canonical: https://jentic.com/apis/cms.gov/cms

# Cms Gov CMS Provider Data API

Jentic publishes the only available OpenAPI specification for CMS Provider Data API, keeping it validated and agent-ready. The API exposes the public Centers for Medicare and Medicaid Services provider datasets - hospitals, nursing homes, dialysis facilities, home health agencies, hospices, and physicians - through DKAN-style query, download, and SQL endpoints. Callers can search the dataset catalog, fetch metadata schemas, and run filtered queries against any individual distribution to retrieve quality measures, ratings, and provider directory data without authentication.

## For AI agents

Query Medicare provider data - hospitals, nursing homes, hospices, physicians, and quality measures - via the public CMS DKAN datastore.

## Scope

Does not handle individual patient records, claims processing, or insurance enrollment - use for public CMS provider, facility, and quality datasets only.

## Capabilities

- Query any CMS provider dataset by distribution ID via /datastore/query/{distributionId}
- Run SQL-style filters across the datastore using GET /datastore/sql
- Search the full provider dataset catalog with GET /search and GET /search/facets
- Download filtered query results as CSV through /datastore/query/download
- Browse and inspect dataset metadata via /metastore/schemas and /metastore/schemas/dataset/items/{identifier}

## Use cases

### Hospital Compare and Quality Lookups

Fetch CMS Hospital Compare measures - readmission rates, mortality, patient experience scores - for a specific hospital or set of hospitals. Use GET /search to locate the relevant dataset, then /datastore/query/{distributionId} with conditions on provider ID or state to filter results. The API has no authentication so a quality dashboard can be wired up in well under a day.

Example prompt: Search for the Hospital General Information dataset, then query /datastore/query/{distributionId} for hospitals in California and return the top 10 by overall rating.

### Nursing Home and Long-Term Care Research

Pull nursing home star ratings, staffing data, and inspection results for analytics or consumer-facing tools. /datastore/sql lets the caller run SQL-style filters across the long-term-care datasets and /datastore/query/download returns CSV for downstream warehousing. Because all data is public domain, results can be redistributed without licensing review.

Example prompt: Run a SQL query via /datastore/sql to return nursing homes in Texas with overall rating of 5 stars.

### Dataset Catalog Discovery

Programmatically browse the full set of CMS provider datasets to keep an internal catalog or data warehouse in sync. GET /search returns dataset records with identifiers, /search/facets exposes filterable categories, and /metastore/schemas/{schema_id}/items lists the items under each schema. This pattern is useful when the underlying CMS distributions change identifier on quarterly refresh.

Example prompt: Call GET /search with the keyword 'hospice' and return the dataset identifiers and titles for all matching datasets.

### AI Agent Provider Data Lookups via Jentic

An AI agent answering healthcare questions discovers CMS provider data through Jentic, loads the relevant query schema, and executes filtered datastore calls. Because the API has no authentication, the agent can chain a /search call and a /datastore/query call in a single workflow without managing credentials. Jentic still tracks the call so traffic, errors, and latency are observable.

Example prompt: Use Jentic to search for 'CMS hospital data', load the /datastore/query/{distributionId} schema, and return Medicare-rated hospitals in zip code 10001.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /search | Search the CMS dataset catalog |
| GET | /datastore/sql | Run a SQL-like query |
| GET | /datastore/query/{distributionId} | Query a single dataset distribution |
| GET | /datastore/query/{distributionId}/download | Download query results as CSV |
| GET | /metastore/schemas/{schema_id}/items | List all items for a metadata schema |
| GET | /metastore/schemas/dataset/items/{identifier} | Fetch a dataset record |

## Key resources

- **Datastore Query** — Run filtered queries against any CMS distribution via GET/POST /datastore/query and /datastore/query/{distributionId}
- **Datastore SQL** — Execute SQL-like queries across the datastore via /datastore/sql
- **Datastore Imports** — List, start, inspect, and delete datastore imports for managed pipelines
- **Metastore Schemas** — Browse dataset metadata schemas and items, and create or update dataset records
- **Search** — Search the CMS dataset catalog and retrieve facets

## Why Jentic

- **Setup:** Wiring the CMS Provider Data API by hand means targeting data.cms.gov/provider-data/api/1, constructing DKAN datastore SQL and query calls, and handling paging and retries across its datasets yourself. Through Jentic you install once, import the CMS Provider Data API from the API Directory, and your agent calls it with no key to manage.
- **Permission scoping:** The CMS Provider Data API is unauthenticated and read-only, so scope the agent to the operations it needs, such as searching datasets or running a datastore query. You choose that set, so operations like the raw SQL endpoint are not included unless you add them.
- **Credential handling:** The CMS Provider Data API needs no credentials, so there is nothing to store. Your Jentic One instance still proxies each call and applies retry and timeout policy, keeping the agent's prompt, logs, and context free of secrets.
- **Discovery method:** Agents search Jentic by intent such as 'find Medicare hospital ratings', and Jentic returns the matching CMS query operation with its parameter schema so the agent builds a valid distribution query without parsing the DKAN documentation.

## Related APIs

- **HealthCare.gov Marketplace** — HealthCare.gov exposes Marketplace plan and issuer data for ACA enrollment.
- **ClinicalTrials.gov** — ClinicalTrials.gov provides metadata on registered clinical trials.
- **Data.gov Catalog** — Data.gov is the cross-agency US government open data catalog.
- **1upHealth** — 1upHealth provides FHIR-based patient and clinical data integrations.

## FAQ

### Why is there no official OpenAPI spec for CMS Provider Data API?

CMS does not publish an OpenAPI specification for its DKAN provider data endpoints. Jentic generates and maintains this spec so that AI agents and developers can call CMS Provider Data API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the CMS Provider Data API use?

The CMS Provider Data API is public domain and requires no authentication for read operations. Through Jentic the call is still tracked so an agent gets observability, retries, and rate-limit handling without managing any keys.

### Can I query Medicare hospital quality measures with the CMS Provider Data API?

Yes. Search the dataset catalog with GET /search for terms such as 'hospital general information' or 'readmission', then call /datastore/query/{distributionId} with the returned identifier and conditions on provider ID or state to retrieve quality measures.

### What are the rate limits for the CMS Provider Data API?

The OpenAPI spec does not declare numeric rate limits. CMS applies general fair-use throttling on data.cms.gov, so large extracts should use /datastore/query/download for CSV export rather than paginating thousands of JSON queries.

### How do I run a SQL-style query through Jentic?

Search Jentic for 'query CMS data', load the GET /datastore/sql schema, and execute with the SQL-style query string. Install the SDK with pip install jentic and call it via the async client. The endpoint accepts the DKAN SQL dialect for selecting and filtering distributions.

### Is the data returned by this API redistributable?

Yes. The CMS Provider Data API is licensed as public domain (usa.gov government works), so results from /datastore/query and /datastore/query/download can be cached, redistributed, or republished without licensing fees.

### Can I limit what my agent is allowed to do with the CMS Provider Data API?

Yes. Because you run Jentic One yourself, your own rules decide which CMS Provider Data operations the agent may call, so you can grant only what a task needs, such as GET /search to find datasets and GET /datastore/query/{distributionId} to read them. Higher-reach operations like the raw GET /datastore/sql endpoint stay out of the agent's reach unless you explicitly add them. Since the API is unauthenticated and read-only, this operation-level scoping is the main control, and your self-hosted instance enforces it on every call.
