{
  "openapi": "3.0.1",
  "info": {
    "title": "CQC Care Services Scraper",
    "description": "Get ratings, registered managers and inspection reports for any CQC-registered care service in England: care homes, homecare, GPs, dentists, hospitals. Filter by type, area and rating, or schedule it to catch new reports and rating changes.",
    "version": "1.0",
    "x-build-id": "7W7oADy7ajm9uE4yZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alkausari_mujahid~care-quality-commission-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alkausari_mujahid-care-quality-commission-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/alkausari_mujahid~care-quality-commission-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alkausari_mujahid-care-quality-commission-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/alkausari_mujahid~care-quality-commission-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alkausari_mujahid-care-quality-commission-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": {
          "serviceTypes": {
            "title": "Service types",
            "type": "array",
            "description": "Only these kinds of service. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Residential homes",
                "Nursing homes",
                "Homecare agencies",
                "Supported living",
                "Supported housing",
                "Shared lives",
                "Dentist",
                "Doctors/GPs",
                "Hospital",
                "Hospitals - Mental health/capacity",
                "Hospice",
                "Home hospice care",
                "Clinic",
                "Urgent care centres",
                "Mobile doctors",
                "Phone/online advice",
                "Ambulances",
                "Diagnosis/screening",
                "Community services - Healthcare",
                "Community services - Mental Health",
                "Community services - Learning disabilities",
                "Community services - Substance abuse",
                "Community services - Nursing",
                "Community health service",
                "Rehabilitation (illness/injury)",
                "Rehabilitation (substance abuse)",
                "Long-term conditions",
                "Prison healthcare",
                "Blood and transplant service",
                "Education disability services",
                "Hyperbaric chamber services"
              ],
              "enumTitles": [
                "Care homes (residential)",
                "Care homes (nursing)",
                "Homecare agencies",
                "Supported living",
                "Supported housing",
                "Shared lives",
                "Dentists",
                "GP practices",
                "Hospitals",
                "Mental health hospitals",
                "Hospices",
                "Home hospice care",
                "Clinics",
                "Urgent care centres",
                "Mobile doctors",
                "Phone or online advice",
                "Ambulance services",
                "Diagnosis and screening",
                "Community healthcare",
                "Community mental health",
                "Community learning disability services",
                "Community substance misuse services",
                "Community nursing",
                "Community health service",
                "Rehabilitation (illness or injury)",
                "Rehabilitation (substance misuse)",
                "Long-term conditions",
                "Prison healthcare",
                "Blood and transplant services",
                "Education disability services",
                "Hyperbaric chamber services"
              ]
            }
          },
          "areas": {
            "title": "Areas",
            "type": "array",
            "description": "Only services in these places: a town (Bristol), a local authority (Leeds), a region (South West), a postcode district (BS1), a postcode area (BS) or a full postcode. Leave empty for all of England.",
            "items": {
              "type": "string"
            }
          },
          "ratings": {
            "title": "Overall ratings",
            "type": "array",
            "description": "Only services with these overall ratings, from CQC's latest ratings file. Services CQC doesn't rate (such as dentists) count as \"Not rated\".",
            "items": {
              "type": "string",
              "enum": [
                "outstanding",
                "good",
                "requires-improvement",
                "inadequate",
                "not-rated"
              ],
              "enumTitles": [
                "Outstanding",
                "Good",
                "Requires improvement",
                "Inadequate",
                "Not rated"
              ]
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Only services whose name or provider name contains this, for example a care group like \"Barchester\"."
          },
          "services": {
            "title": "Specific services",
            "type": "array",
            "description": "CQC location IDs (1-10557588274) or cqc.org.uk location links. When set, the filters above are ignored.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum services",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many services, most recently inspected first. 0 = every matching service.",
            "default": 100
          },
          "detail": {
            "title": "How much detail",
            "enum": [
              "ratings",
              "summary",
              "full"
            ],
            "type": "string",
            "description": "Every row has the service's details, current ratings and who runs it. Add the latest inspection's summary, or the full report text.",
            "default": "ratings"
          },
          "includeHistory": {
            "title": "Include inspection history",
            "type": "boolean",
            "description": "Add every past inspection or assessment: date, type, summary and report link.",
            "default": false
          },
          "onlyChanges": {
            "title": "Only services that changed since the last run",
            "type": "boolean",
            "description": "For scheduled runs: return a service only when it has a new report or its ratings changed. The first run returns every service as a starting point.",
            "default": false
          },
          "memoryName": {
            "title": "Memory name",
            "type": "string",
            "description": "Monitoring remembers each service in a key-value store of this name in your account. Leave empty for one per saved task. Use a new name to start over."
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many CQC pages to read at the same time. CQC's pages can be slow; more parallel requests make big runs faster.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed for CQC's public pages. Use it only if your runs get blocked.",
            "default": {
              "useApifyProxy": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}