<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Theta Tech</title>
    <description>The latest articles on DEV Community by Theta Tech (@thetatech).</description>
    <link>https://dev.to/thetatech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4225205%2Fe4441f42-7803-4064-adb7-5de646f5d66c.png</url>
      <title>DEV Community: Theta Tech</title>
      <link>https://dev.to/thetatech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thetatech"/>
    <language>en</language>
    <item>
      <title>How to Use a Hospital Star Ratings API (CMS Care Compare)</title>
      <dc:creator>Theta Tech</dc:creator>
      <pubDate>Wed, 04 Nov 2026 01:46:15 +0000</pubDate>
      <link>https://dev.to/thetatech/how-to-use-a-hospital-star-ratings-api-cms-care-compare-5ale</link>
      <guid>https://dev.to/thetatech/how-to-use-a-hospital-star-ratings-api-cms-care-compare-5ale</guid>
      <description>&lt;h2&gt;
  
  
  What are CMS hospital star ratings?
&lt;/h2&gt;

&lt;p&gt;CMS publishes &lt;strong&gt;overall hospital star ratings&lt;/strong&gt; and facility attributes through Care Compare / the Provider Data Catalog. The primary machine-readable source for facility-level general information (including overall rating) is the &lt;strong&gt;Hospital General Information&lt;/strong&gt; dataset on &lt;a href="https://data.cms.gov/provider-data/" rel="noopener noreferrer"&gt;data.cms.gov/provider-data&lt;/a&gt; (dataset id &lt;code&gt;xubh-q36u&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;There is no separate “secret” star-ratings product — the stars are fields on the public Provider Data Catalog tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Official API pattern (high level)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Call the Provider Data Catalog datastore query endpoint for &lt;code&gt;xubh-q36u&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Filter with conditions such as &lt;code&gt;state&lt;/code&gt;, &lt;code&gt;citytown&lt;/code&gt;, &lt;code&gt;hospital_type&lt;/code&gt;, or &lt;code&gt;hospital_ownership&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read &lt;code&gt;hospital_overall_rating&lt;/code&gt; (and related facility fields) from each result row.&lt;/li&gt;
&lt;li&gt;Optionally filter client-side for minimum rating or emergency-services flags when the catalog does not support that operator server-side.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Ready-made JSON options
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apify Actor (free):&lt;/strong&gt; &lt;a href="https://apify.com/thetatech-data/cms-hospital-quality-scraper" rel="noopener noreferrer"&gt;CMS Hospital Quality / Care Compare Scraper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP API:&lt;/strong&gt; &lt;a href="https://zylalabs.com/api-marketplace/health+%26+fitness/cms+healthcare+data+api/14713" rel="noopener noreferrer"&gt;CMS Healthcare Data API on Zyla&lt;/a&gt; — &lt;code&gt;GET /v1/hospital-quality&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Apify input
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"RI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"minOverallRating"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"emergencyServicesOnly"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxItems"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Zyla-style query
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /v1/hospital-quality?state=RI&amp;amp;minOverallRating=3&amp;amp;limit=25
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What you get back
&lt;/h2&gt;

&lt;p&gt;Typical cleaned fields include CCN / facility id, facility name, address, city, state, hospital type, ownership, emergency services flag, and overall star rating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use cases
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Payer network adequacy and quality dashboards&lt;/li&gt;
&lt;li&gt;Journalists comparing hospitals by state&lt;/li&gt;
&lt;li&gt;PE / diligence screening of acute-care facilities&lt;/li&gt;
&lt;li&gt;AI agents that need structured Care Compare JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Related
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Nursing homes have a separate Care Compare provider-info table — see &lt;a href="https://apify.com/thetatech-data/cms-nursing-home-scraper" rel="noopener noreferrer"&gt;CMS Nursing Home Care Compare Scraper&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Physician payments: &lt;a href="https://apify.com/thetatech-data/cms-open-payments-scraper" rel="noopener noreferrer"&gt;CMS Open Payments Scraper&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;Public CMS data only. Ratings methodologies change; always cite the CMS release you used. Not medical or legal advice.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: Theta Tech built the free Apify Actors and the CMS Healthcare Data API linked in this article.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>healthcare</category>
      <category>api</category>
      <category>data</category>
      <category>opendata</category>
    </item>
    <item>
      <title>How to Query the CMS Open Payments API (Without Downloading Multi-GB CSVs)</title>
      <dc:creator>Theta Tech</dc:creator>
      <pubDate>Wed, 04 Nov 2026 01:46:14 +0000</pubDate>
      <link>https://dev.to/thetatech/how-to-query-the-cms-open-payments-api-without-downloading-multi-gb-csvs-4d86</link>
      <guid>https://dev.to/thetatech/how-to-query-the-cms-open-payments-api-without-downloading-multi-gb-csvs-4d86</guid>
      <description>&lt;h2&gt;
  
  
  What is CMS Open Payments?
&lt;/h2&gt;

&lt;p&gt;CMS Open Payments (the Sunshine Act transparency program) publishes payments and transfers of value from drug and device manufacturers to physicians, non-physician practitioners, and teaching hospitals. Data is released as large public files and also exposed through the &lt;strong&gt;official Open Payments datastore query API&lt;/strong&gt; on &lt;a href="https://openpaymentsdata.cms.gov/" rel="noopener noreferrer"&gt;openpaymentsdata.cms.gov&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you only need filtered rows — for example consulting fees in one state, or payments tied to a specific manufacturer — you usually do &lt;strong&gt;not&lt;/strong&gt; need to download the entire yearly CSV.&lt;/p&gt;

&lt;h2&gt;
  
  
  Official API pattern (high level)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Resolve the dataset UUID for the program year and payment type (&lt;code&gt;general&lt;/code&gt;, &lt;code&gt;research&lt;/code&gt;, or &lt;code&gt;ownership&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;POST (or GET) to the datastore query endpoint for that dataset with &lt;code&gt;limit&lt;/code&gt;, &lt;code&gt;offset&lt;/code&gt;, and &lt;code&gt;conditions&lt;/code&gt; (state, NPI, nature of payment, etc.).&lt;/li&gt;
&lt;li&gt;Map the returned rows into the fields your pipeline needs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;CMS documents the metastore and datastore query interfaces on the Open Payments site. Always prefer the federal source of truth for schema changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Faster path: ready-made JSON Actors / APIs
&lt;/h2&gt;

&lt;p&gt;If you want filtered JSON without writing the client yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Apify Actor (free):&lt;/strong&gt; &lt;a href="https://apify.com/thetatech-data/cms-open-payments-scraper" rel="noopener noreferrer"&gt;CMS Open Payments Scraper&lt;/a&gt; — wraps the official API; filter by state, NPI, manufacturer, nature, amount; export JSON/CSV.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;HTTP API:&lt;/strong&gt; &lt;a href="https://zylalabs.com/api-marketplace/health+%26+fitness/cms+healthcare+data+api/14713" rel="noopener noreferrer"&gt;CMS Healthcare Data API on Zyla&lt;/a&gt; — &lt;code&gt;GET /v1/open-payments&lt;/code&gt; with plan key.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example Apify input
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"paymentType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"general"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"year"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"recipientState"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"RI"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"natureOfPayment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Consulting Fee"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxItems"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Zyla-style query
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET /v1/open-payments?recipientState=RI&amp;amp;year=2024&amp;amp;natureOfPayment=Consulting%20Fee&amp;amp;limit=25
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common pitfalls
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unfiltered dumps&lt;/strong&gt; of a full program year are huge. Always pass at least one selective filter (state, NPI, manufacturer, or nature).&lt;/li&gt;
&lt;li&gt;Payment amounts are often stored as text in the source files; normalize to numbers in your client.&lt;/li&gt;
&lt;li&gt;Research and ownership files share many columns with general payments but not all filters apply equally.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Related datasets
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://apify.com/thetatech-data/cms-hospital-quality-scraper" rel="noopener noreferrer"&gt;CMS Hospital Quality / Care Compare Scraper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://apify.com/thetatech-data/cms-medicare-physician-scraper" rel="noopener noreferrer"&gt;CMS Medicare Physician Scraper&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Disclaimer
&lt;/h2&gt;

&lt;p&gt;This article describes public federal open data. It is not legal advice. Review CMS terms and applicable privacy law for your use case.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: Theta Tech built the free Apify Actors and the CMS Healthcare Data API linked in this article.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>healthcare</category>
      <category>api</category>
      <category>opendata</category>
      <category>python</category>
    </item>
  </channel>
</rss>
