{
  "openapi": "3.0.1",
  "info": {
    "title": "CMS Home Health Agencies Scraper (USA)",
    "description": "Search Medicare-certified US home health agencies and extract CCN, name, address, phone, ownership, services offered (nursing, PT, OT, speech, aide) and quality-of-care star rating. Filter by state, city, zip, ownership, services or rating. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "mk1f9osg6JcaHPXLz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~cms-home-health-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-cms-home-health-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/scrapers_lat~cms-home-health-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-cms-home-health-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/scrapers_lat~cms-home-health-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-cms-home-health-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": {
          "agencyNames": {
            "title": "Agency Names",
            "type": "array",
            "description": "Agency names or keywords to search, one per line (for example 'VNA', 'home health', 'Amedisys'). Each term runs its own search. Leave empty to sweep all agencies that match the filters below.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Two-letter US state codes to restrict results (for example CA, TX, FL).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. City names to restrict results (for example 'Houston', 'Miami').",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP Codes",
            "type": "array",
            "description": "Optional. ZIP codes to restrict results.",
            "items": {
              "type": "string"
            }
          },
          "ownershipType": {
            "title": "Ownership Type",
            "enum": [
              "",
              "PROPRIETARY",
              "VOLUNTARY NON-PROFIT",
              "GOVERNMENT"
            ],
            "type": "string",
            "description": "Optional. Restrict by ownership category.",
            "default": ""
          },
          "requireNursing": {
            "title": "Offers Skilled Nursing",
            "type": "boolean",
            "description": "Only agencies that offer skilled nursing care.",
            "default": false
          },
          "requirePhysicalTherapy": {
            "title": "Offers Physical Therapy",
            "type": "boolean",
            "description": "Only agencies that offer physical therapy.",
            "default": false
          },
          "requireOccupationalTherapy": {
            "title": "Offers Occupational Therapy",
            "type": "boolean",
            "description": "Only agencies that offer occupational therapy.",
            "default": false
          },
          "requireSpeechPathology": {
            "title": "Offers Speech Pathology",
            "type": "boolean",
            "description": "Only agencies that offer speech pathology.",
            "default": false
          },
          "requireMedicalSocial": {
            "title": "Offers Medical Social Services",
            "type": "boolean",
            "description": "Only agencies that offer medical social services.",
            "default": false
          },
          "requireHomeHealthAide": {
            "title": "Offers Home Health Aide",
            "type": "boolean",
            "description": "Only agencies that offer home health aide services.",
            "default": false
          },
          "minStarRating": {
            "title": "Minimum Star Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Optional. Only agencies with at least this quality-of-patient-care star rating (1 to 5)."
          },
          "maxStarRating": {
            "title": "Maximum Star Rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Optional. Only agencies with at most this quality-of-patient-care star rating (1 to 5)."
          },
          "maxAgencies": {
            "title": "Max Agencies To Scrape",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of agencies to collect across all searches."
          },
          "withAiSummary": {
            "title": "AI: agency summary",
            "type": "boolean",
            "description": "Paid add-on. Concise summary of the agency, its ownership and services. Charged only on usable AI output. Requires a paid Apify plan.",
            "default": false
          },
          "withAiQualitySummary": {
            "title": "AI: quality summary",
            "type": "boolean",
            "description": "Paid add-on. Plain-English summary of the agency's care quality from its star rating and quality measures. Charged only on usable AI output. Requires a paid Apify plan.",
            "default": false
          },
          "withAiRisk": {
            "title": "AI: quality risk flags",
            "type": "boolean",
            "description": "Paid add-on. Surface quality red flags for low performers (low star rating, worse-than-expected measures). Charged only on usable AI output. Requires a paid Apify plan.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}