CMS Nursing Home Compare Scraper avatar

CMS Nursing Home Compare Scraper

Pricing

from $0.01 / 1,000 nursing home facility saveds

Go to Apify Store
CMS Nursing Home Compare Scraper

CMS Nursing Home Compare Scraper

πŸ₯ Export CMS Care Compare nursing home facilities with ratings, ownership, bed counts, penalties, chains, and contact data.

Pricing

from $0.01 / 1,000 nursing home facility saveds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Export CMS Care Compare nursing home facility records from the official CMS Provider Data API.

What does CMS Nursing Home Compare Scraper do?

This actor downloads nursing home facility data from CMS dataset 4pq5-n9py. It returns one normalized row per facility. It includes CMS certification numbers, provider names, addresses, phone numbers, ownership type, certified beds, average residents, chain details, ratings, inspection fields, penalties, latitude, longitude, and source metadata.

Who is it for?

  • Healthcare market researchers building facility universes.
  • Senior-care lead generation teams looking for operators by geography.
  • Compliance teams monitoring CMS ratings and penalty indicators.
  • Real estate and healthcare investors mapping bed supply.
  • Data analysts who need repeatable CMS exports in a dataset or API.

Why use this actor?

CMS publishes the source data, but analysts still need repeatable filtering, typed output, and Apify-ready exports. This actor gives you a clean dataset without opening spreadsheets manually. It is API-first and does not use a browser. It can run nationwide or with focused filters.

Data source

The actor uses the CMS Provider Data / Care Compare API. The source dataset id is 4pq5-n9py. The source is public and requires no login. Every output item includes sourceDatasetId, sourceUrl, and fetchedAt.

What data can you extract?

Field groupExamples
IdentifiersCCN, provider name, legal business name
Locationaddress, city, state, ZIP, county, phone, coordinates
Ownershipownership type, provider type, chain name, chain id
Capacitycertified beds, residents per day
Ratingsoverall, inspection, staffing, quality-measure ratings
Compliancedeficiencies, infection-control citations, fines, payment denials
Metadataprocessing date, source URL, fetched timestamp

How much does it cost to scrape CMS nursing home data?

The actor uses pay-per-event pricing. You pay a small start fee and a per-facility event for saved records. Use low maxResults values for exploratory runs. Use larger values for scheduled analytics exports.

Input options

You can filter by state, CCN, provider name, city, ZIP, ownership type, special-focus status, rating range, and certified-bed range. All filters are optional. If you leave filters empty, the actor scans CMS records until it reaches maxResults.

Example input

{
"states": ["CA"],
"minOverallRating": 4,
"maxResults": 100,
"includeRaw": false
}

Example output

{
"ccn": "055010",
"providerName": "EXAMPLE NURSING CENTER",
"city": "LOS ANGELES",
"state": "CA",
"ownershipType": "For profit - Corporation",
"certifiedBeds": 99,
"overallRating": 4,
"sourceDatasetId": "4pq5-n9py",
"fetchedAt": "2026-06-25T00:00:00.000Z"
}

How to scrape nursing homes by state

  1. Open the actor input.
  2. Add one or more two-letter states to states.
  3. Set maxResults to the number of facilities you need.
  4. Run the actor.
  5. Export the dataset as JSON, CSV, Excel, XML, or via API.

How to monitor ratings

Run the actor on a schedule with your state or CCN list. Store each dataset in your BI tool. Compare overallRating, healthInspectionRating, staffingRating, and penalty fields over time.

How to build lead lists

Filter by state, city, ZIP, ownership type, certified beds, or chain name from the output. Use phone, address, owner type, and capacity fields to prioritize outreach. Combine the results with your CRM or enrichment workflow.

Tips for better results

  • Use states when you only need a regional export.
  • Use ccns for exact facility monitoring.
  • Use providerNames for brand or operator searches.
  • Use includeRaw when you want all CMS source columns.
  • Keep maxResults low while testing.

Integrations

Send the dataset to Google Sheets, BigQuery, Snowflake, S3, Make, Zapier, or your own API. The Apify dataset API lets you fetch results programmatically after each run. Scheduled runs can power dashboards and compliance checks.

API usage with Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/cms-nursing-home-compare-scraper').call({
states: ['NY'],
maxResults: 250
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length);

API usage with Python

from apify_client import ApifyClient
client = ApifyClient('MY-APIFY-TOKEN')
run = client.actor('automation-lab/cms-nursing-home-compare-scraper').call(run_input={
'states': ['TX'],
'maxResults': 250,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(len(items))

API usage with cURL

curl -X POST 'https://api.apify.com/v2/acts/automation-lab~cms-nursing-home-compare-scraper/runs?token=MY-APIFY-TOKEN' \
-H 'Content-Type: application/json' \
-d '{"states":["FL"],"maxResults":100}'

MCP usage

Use Apify MCP with Claude Desktop or Claude Code to run the actor from a prompt. MCP URL:

https://mcp.apify.com/?tools=automation-lab/cms-nursing-home-compare-scraper

Add it in Claude Code:

$claude mcp add apify-cms-nursing-homes https://mcp.apify.com/?tools=automation-lab/cms-nursing-home-compare-scraper

Claude Desktop JSON config:

{
"mcpServers": {
"apify-cms-nursing-homes": {
"url": "https://mcp.apify.com/?tools=automation-lab/cms-nursing-home-compare-scraper"
}
}
}

Example prompts:

  • "Run the CMS Nursing Home Compare Scraper for California with 100 results."
  • "Find Texas nursing homes with at least 4 overall stars."
  • "Export raw CMS nursing home rows for these CCNs."

Output schema notes

The default dataset contains normalized fields for common workflows. When includeRaw is true, each item also includes the full CMS source row. This helps when CMS adds or renames columns.

Limitations

The actor reflects what CMS publishes in the source dataset. It does not verify facility websites. It does not call individual facility pages. It does not enrich owners beyond CMS fields. Very narrow filters may require scanning more CMS rows before matches are found.

Legality and compliance

This actor uses a public CMS data API. Review CMS data-use guidance and your own compliance obligations before using results for regulated workflows. Do not use the data for unlawful discrimination, harassment, or misleading outreach.

Troubleshooting

If you get fewer records than expected, raise maxResults or broaden filters. If providerNames misses a facility, try a shorter keyword or exact CCN. If you need every original CMS column, enable includeRaw.

FAQ

Can I export all nursing homes?

Yes. Leave filters empty and set a high maxResults value.

Does this actor use residential proxies?

No. It uses the public CMS API directly.

Can I filter by owner type?

Yes. Use ownershipTypes with text such as For profit, Non profit, Government, Corporation, or Partnership.

Can I monitor specific facilities?

Yes. Put exact CMS certification numbers in ccns and schedule the actor.

Can I get raw CMS fields?

Yes. Set includeRaw to true.

Changelog

  • 0.1.0 Initial version with CMS API extraction, filters, normalized output, and optional raw rows.

Field reference

The actor currently normalizes these fields:

  • ccn
  • providerName
  • legalBusinessName
  • providerType
  • address
  • city
  • state
  • zipCode
  • county
  • phone
  • ownershipType
  • certifiedBeds
  • averageResidentsPerDay
  • chainName
  • chainId
  • chainFacilityCount
  • specialFocusStatus
  • overallRating
  • healthInspectionRating
  • staffingRating
  • qualityMeasureRating
  • longStayQualityRating
  • shortStayQualityRating
  • healthDeficienciesCycle1
  • totalWeightedHealthSurveyScore
  • infectionControlCitations
  • numberOfFines
  • totalFinesUsd
  • paymentDenials
  • latitude
  • longitude
  • firstApprovedDate
  • processingDate
  • sourceDatasetId
  • sourceUrl
  • fetchedAt
  • raw