Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Medicare-registered hospital locations, characteristics, services, and ratings for building provider comparison and access tools.
From source to product signal
Hospital General Information lists Medicare-registered hospitals with addresses, ownership, services, and overall ratings. Start with one state and the stable dataset identifier. Ratings may be absent or not comparable across facility types, and addresses are not a measure of service access.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://data.cms.gov/provider-data/api/1/datastore/query/xubh-q36u/0",
params={"limit": 100},
timeout=30,
)
response.raise_for_status()
hospitals = pd.DataFrame(response.json()["results"])
sample = hospitals[hospitals["state"] == "CA"]
print(sample[["facility_id", "facility_name", "hospital_type", "hospital_overall_rating"]].head(20))Test a useful signal
Summarize hospital types, ownership, emergency services, and reported ratings in California.
Centers for Medicare & Medicaid Services is a government source. Last verified 2026-08-13. Temporal coverage: current provider records with archived releases.