{
  "openapi": "3.0.1",
  "info": {
    "title": "CMS Nursing Home Ratings Scraper",
    "description": "Search CMS Care Compare nursing-home records by location, ratings, ownership, beds, staffing, quality measures, and special-focus status. Returns one current Medicare-certified facility per result. For US nursing-home research, not assisted living or patient data. $0.005/result + $0.00005/run.",
    "version": "1.0",
    "x-build-id": "dXcRmv7wet0jQ3Yce"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/muhammadafzal~cms-nursing-home-ratings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-muhammadafzal-cms-nursing-home-ratings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/muhammadafzal~cms-nursing-home-ratings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-muhammadafzal-cms-nursing-home-ratings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/muhammadafzal~cms-nursing-home-ratings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-muhammadafzal-cms-nursing-home-ratings-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter US state or territory code to include, for example 'CA'. Leave blank to search nationally. This is a CMS facility state code, not a full state name."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City or town text to match in CMS facility records, for example 'Los Angeles'. Matching is case-insensitive and may return nearby CMS city spellings. Leave blank for every city in the selected state."
          },
          "providerNameQuery": {
            "title": "Provider name contains",
            "type": "string",
            "description": "Text contained in the nursing-home provider name, for example 'Manor'. Matching is case-insensitive. This is not a CMS Certification Number; use the CCN field for an exact facility identifier."
          },
          "ccn": {
            "title": "CMS Certification Number (CCN)",
            "type": "string",
            "description": "Exact six-digit CMS Certification Number to retrieve, for example '055123'. Use a CCN when you already know the facility identifier. This is not an NPI or a provider name."
          },
          "minOverallRating": {
            "title": "Minimum overall rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum CMS overall Five-Star Rating from 1 through 5, for example 4. Records without an overall rating are excluded when this filter is used. This is not a review-site score."
          },
          "minHealthInspectionRating": {
            "title": "Minimum health inspection rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum CMS health-inspection Five-Star Rating from 1 through 5. Use this to prioritize inspection performance separately from the overall rating. Leave blank to include all facilities."
          },
          "minStaffingRating": {
            "title": "Minimum staffing rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum CMS staffing Five-Star Rating from 1 through 5. This is the CMS staffing component, not a headcount. Leave blank to include all staffing ratings."
          },
          "minQualityMeasureRating": {
            "title": "Minimum quality-measure rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Minimum CMS quality-measure Five-Star Rating from 1 through 5. It is distinct from health-inspection and staffing ratings. Leave blank to include all quality-measure ratings."
          },
          "ownershipTypes": {
            "title": "Ownership types",
            "type": "array",
            "description": "CMS ownership types to include, such as 'For profit - Corporation', 'Non profit - Corporation', or 'Government - County'. Leave empty for every ownership type. Values must match CMS labels exactly.",
            "items": {
              "type": "string"
            }
          },
          "minCertifiedBeds": {
            "title": "Minimum certified beds",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of CMS-certified beds, for example 100. Leave blank to include facilities of every size. This uses certified beds, not average daily residents."
          },
          "maxCertifiedBeds": {
            "title": "Maximum certified beds",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of CMS-certified beds, for example 200. Leave blank to include facilities of every size. This uses certified beds, not average daily residents."
          },
          "specialFocusStatus": {
            "title": "Special Focus status",
            "type": "array",
            "description": "CMS Special Focus Program status values to include. Leave empty for all facilities. This filter expects the current CMS label exactly and is not a general keyword search.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum matching nursing-home records to return, from 1 to 10,000. Results are ordered by overall rating, highest first. Start with 50 to inspect the data before larger searches.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}