{
  "openapi": "3.0.1",
  "info": {
    "title": "UK Care Services Register Scraper (CQC)",
    "description": "Scrape the official CQC register of every regulated care service in England - care homes, homecare agencies, GP practices, dentists, hospitals, hospices, ambulances and more. Search by type, region, local authority, specialism, or keyword and fetch CQC ratings.",
    "version": "1.0",
    "x-build-id": "eBY6TxspfIzvxJdFe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~uk-care-services-register-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-uk-care-services-register-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/crawlerbros~uk-care-services-register-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-uk-care-services-register-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/crawlerbros~uk-care-services-register-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-uk-care-services-register-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byLocationIds"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "keyword": {
            "title": "Keyword (name search)",
            "type": "string",
            "description": "Case-insensitive substring match against the service's registered name or \"also known as\" name (mode=search). Leave blank to skip.",
            "default": ""
          },
          "providerName": {
            "title": "Provider / operator name",
            "type": "string",
            "description": "Case-insensitive substring match against the registered provider/operator company name, e.g. `Bupa`, `Barchester` (mode=search). Leave blank to skip.",
            "default": ""
          },
          "serviceType": {
            "title": "Service type",
            "enum": [
              "",
              "Ambulances",
              "Blood and transplant service",
              "Clinic",
              "Community health service",
              "Community services - Healthcare",
              "Community services - Learning disabilities",
              "Community services - Mental Health",
              "Community services - Nursing",
              "Community services - Substance abuse",
              "Dentist",
              "Diagnosis/screening",
              "Doctors/GPs",
              "Education disability services",
              "Home hospice care",
              "Homecare agencies",
              "Hospice",
              "Hospital",
              "Hospitals - Mental health/capacity",
              "Hyperbaric chamber services",
              "Long-term conditions",
              "Mobile doctors",
              "Nursing homes",
              "Phone/online advice",
              "Prison healthcare",
              "Rehabilitation (illness/injury)",
              "Rehabilitation (substance abuse)",
              "Residential homes",
              "Shared lives",
              "Supported housing",
              "Supported living",
              "Urgent care centres"
            ],
            "type": "string",
            "description": "Restrict to one CQC-defined service type. Leave as \"any\" to include every regulated service type (mode=search).",
            "default": ""
          },
          "region": {
            "title": "Region",
            "enum": [
              "",
              "East",
              "East Midlands",
              "London",
              "North East",
              "North West",
              "South East",
              "South West",
              "Wales",
              "West Midlands",
              "Yorkshire & Humberside"
            ],
            "type": "string",
            "description": "Restrict to one of CQC's English regions (plus Wales, for the small number of cross-border providers CQC also lists). Leave as \"any\" to include all (mode=search).",
            "default": ""
          },
          "localAuthority": {
            "title": "Local authority",
            "enum": [
              "",
              "Barking and Dagenham",
              "Barnet",
              "Barnsley",
              "Bath and North East Somerset",
              "Bedford",
              "Bexley",
              "Birmingham",
              "Blackburn with Darwen",
              "Blackpool",
              "Bolton",
              "Bournemouth, Christchurch and Poole",
              "Bracknell Forest",
              "Bradford",
              "Brent",
              "Brighton and Hove",
              "Bristol, City of",
              "Bromley",
              "Buckinghamshire",
              "Bury",
              "Calderdale",
              "Cambridgeshire",
              "Camden",
              "Cardiff",
              "Central Bedfordshire",
              "Cheshire East",
              "Cheshire West and Chester",
              "City of London",
              "Cornwall",
              "County Durham",
              "Coventry",
              "Croydon",
              "Cumberland",
              "Darlington",
              "Derby",
              "Derbyshire",
              "Devon",
              "Doncaster",
              "Dorset",
              "Dudley",
              "Ealing",
              "East Riding of Yorkshire",
              "East Sussex",
              "Enfield",
              "Essex",
              "Flintshire",
              "Gateshead",
              "Gloucestershire",
              "Greenwich",
              "Hackney",
              "Halton",
              "Hammersmith and Fulham",
              "Hampshire",
              "Haringey",
              "Harrow",
              "Hartlepool",
              "Havering",
              "Herefordshire, County of",
              "Hertfordshire",
              "Hillingdon",
              "Hounslow",
              "Isle of Wight",
              "Isles of Scilly",
              "Islington",
              "Kensington and Chelsea",
              "Kent",
              "Kingston upon Hull, City of",
              "Kingston upon Thames",
              "Kirklees",
              "Knowsley",
              "Lambeth",
              "Lancashire",
              "Leeds",
              "Leicester",
              "Leicestershire",
              "Lewisham",
              "Lincolnshire",
              "Liverpool",
              "Luton",
              "Manchester",
              "Medway",
              "Merton",
              "Middlesbrough",
              "Milton Keynes",
              "Newcastle upon Tyne",
              "Newham",
              "Norfolk",
              "North East Lincolnshire",
              "North Lincolnshire",
              "North Northamptonshire",
              "North Somerset",
              "North Tyneside",
              "North Yorkshire",
              "Northumberland",
              "Nottingham",
              "Nottinghamshire",
              "Oldham",
              "Oxfordshire",
              "Peterborough",
              "Plymouth",
              "Portsmouth",
              "Reading",
              "Redbridge",
              "Redcar and Cleveland",
              "Richmond upon Thames",
              "Rochdale",
              "Rotherham",
              "Rutland",
              "Salford",
              "Sandwell",
              "Sefton",
              "Sheffield",
              "Shropshire",
              "Slough",
              "Solihull",
              "Somerset",
              "South Gloucestershire",
              "South Tyneside",
              "Southampton",
              "Southend-on-Sea",
              "Southwark",
              "St. Helens",
              "Staffordshire",
              "Stockport",
              "Stockton-on-Tees",
              "Stoke-on-Trent",
              "Suffolk",
              "Sunderland",
              "Surrey",
              "Sutton",
              "Swindon",
              "Tameside",
              "Telford and Wrekin",
              "Thurrock",
              "Torbay",
              "Tower Hamlets",
              "Trafford",
              "Unspecified",
              "Wakefield",
              "Walsall",
              "Waltham Forest",
              "Wandsworth",
              "Warrington",
              "Warwickshire",
              "West Berkshire",
              "West Northamptonshire",
              "West Sussex",
              "Westminster",
              "Westmorland and Furness",
              "Wigan",
              "Wiltshire",
              "Windsor and Maidenhead",
              "Wirral",
              "Wokingham",
              "Wolverhampton",
              "Worcestershire",
              "York"
            ],
            "type": "string",
            "description": "Restrict to a single local authority area (mode=search).",
            "default": ""
          },
          "specialism": {
            "title": "Specialism / care need",
            "enum": [
              "",
              "Caring for adults over 65 yrs",
              "Caring for adults under 65 yrs",
              "Caring for children (0 - 18yrs)",
              "Caring for people whose rights are restricted under the Mental Health Act",
              "Dementia",
              "Eating disorders",
              "Learning disabilities",
              "Mental health conditions",
              "Physical disabilities",
              "Sensory impairments",
              "Services for everyone",
              "Substance misuse problems"
            ],
            "type": "string",
            "description": "Restrict to services that CQC lists as supporting this specific care need, e.g. Dementia (mode=search).",
            "default": ""
          },
          "postcodeArea": {
            "title": "Postcode / postcode prefix",
            "type": "string",
            "description": "Match services whose postcode starts with this value, e.g. `NE31`, `SW1`, `B93` (mode=search). Leave blank to skip.",
            "default": ""
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "name",
              "latestInspectionDateDesc",
              "regionAsc"
            ],
            "type": "string",
            "description": "Order of results (mode=search).",
            "default": "name"
          },
          "includeRatings": {
            "title": "Include official CQC ratings",
            "type": "boolean",
            "description": "Fetch each matched service's CQC inspection page to add its Overall/Safe/Effective/Caring/Responsive/Well-led ratings (mode=search). Adds one extra request per result, capped at 60 per run for reliability. Note: dentists and a few other service types are not given a CQC rating and will simply have no rating fields. Always included for mode=byLocationIds.",
            "default": false
          },
          "overallRatingFilter": {
            "title": "Filter by CQC overall rating",
            "enum": [
              "",
              "Outstanding",
              "Good",
              "Requires improvement",
              "Inadequate",
              "notRated"
            ],
            "type": "string",
            "description": "Only keep services whose CQC overall rating equals this value. Automatically enables rating enrichment (mode=search). `notRated` matches services CQC doesn't give a location-level rating (e.g. dentists, or multi-service locations rated per-service under CQC's newer assessment approach). Leave as \"any\" to skip this filter.",
            "default": ""
          },
          "lastPublishedFilter": {
            "title": "Last published (recency)",
            "enum": [
              "",
              "week",
              "month"
            ],
            "type": "string",
            "description": "Restrict to services whose latest CQC inspection check was published recently (mode=search), matching CQC's own \"Last published\" site filter.",
            "default": ""
          },
          "hasWebsiteOnly": {
            "title": "Only services with a website",
            "type": "boolean",
            "description": "Exclude services with no website recorded in the CQC directory (mode=search).",
            "default": false
          },
          "hasPhoneOnly": {
            "title": "Only services with a phone number",
            "type": "boolean",
            "description": "Exclude services with no phone number recorded in the CQC directory (mode=search).",
            "default": false
          },
          "locationIds": {
            "title": "CQC Location IDs (mode=byLocationIds)",
            "type": "array",
            "description": "Exact CQC Location IDs (e.g. `1-10557588274`) or full `cqc.org.uk/location/...` URLs to fetch, each enriched with inspection ratings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}