{
  "openapi": "3.0.1",
  "info": {
    "title": "CQC Care Homes & Health Services Directory (England)",
    "description": "Every care home, home care agency, GP, dentist, and clinic regulated by CQC in England, with overall and key question ratings, care home beds, services, provider details, and coordinates. Filter by rating, service type, region, or beds.",
    "version": "0.1",
    "x-build-id": "NFwXxqJtcpbQmcfVu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tapedawn~cqc-care-directory/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tapedawn-cqc-care-directory",
        "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/tapedawn~cqc-care-directory/runs": {
      "post": {
        "operationId": "runs-sync-tapedawn-cqc-care-directory",
        "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/tapedawn~cqc-care-directory/run-sync": {
      "post": {
        "operationId": "run-sync-tapedawn-cqc-care-directory",
        "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": {
          "maxItems": {
            "title": "Maximum locations",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many locations have been saved.",
            "default": 1000
          },
          "locationIds": {
            "title": "CQC location IDs",
            "type": "array",
            "description": "Look up specific locations, for example 1-10000302982.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Keep locations whose name contains this text."
          },
          "providerContains": {
            "title": "Provider or brand contains",
            "type": "string",
            "description": "Keep locations whose provider or brand name contains this text, for example 'Barchester' or 'Bupa'."
          },
          "careHomesOnly": {
            "title": "Care homes only",
            "type": "boolean",
            "description": "Keep only care homes (with or without nursing).",
            "default": false
          },
          "minBeds": {
            "title": "Minimum care home beds",
            "type": "integer",
            "description": "Keep care homes with at least this many beds."
          },
          "ratings": {
            "title": "Overall ratings",
            "type": "array",
            "description": "Keep locations with these latest overall ratings.",
            "items": {
              "type": "string",
              "enum": [
                "Outstanding",
                "Good",
                "Requires improvement",
                "Inadequate",
                "Not rated"
              ]
            }
          },
          "sectors": {
            "title": "Sectors",
            "type": "array",
            "description": "Keep locations of these CQC sector types.",
            "items": {
              "type": "string",
              "enum": [
                "Social Care Org",
                "Primary Medical Services",
                "Primary Dental Care",
                "Independent Healthcare Org",
                "NHS Healthcare Organisation",
                "Independent Ambulance"
              ]
            }
          },
          "serviceTypes": {
            "title": "Service types",
            "type": "array",
            "description": "Keep locations offering any of these CQC service types, for example 'Care home service with nursing', 'Domiciliary care service', 'Dental service', 'Doctors consultation service'.",
            "items": {
              "type": "string"
            }
          },
          "serviceUserBands": {
            "title": "Service user bands",
            "type": "array",
            "description": "Keep locations serving any of these groups, for example Dementia, Older People, Children 0-18 years, Mental Health.",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "title": "Regions",
            "type": "array",
            "description": "Keep locations in these English regions.",
            "items": {
              "type": "string",
              "enum": [
                "London",
                "South East",
                "South West",
                "East of England",
                "East Midlands",
                "West Midlands",
                "North East",
                "North West",
                "Yorkshire and The Humber"
              ]
            }
          },
          "localAuthorities": {
            "title": "Local authorities",
            "type": "array",
            "description": "Keep locations in these local authorities, for example Leeds, Kent, or Wirral.",
            "items": {
              "type": "string"
            }
          },
          "postcodePrefixes": {
            "title": "Postcode prefixes",
            "type": "array",
            "description": "Keep locations whose postcode starts with any of these, for example M, LS1, or SW1A.",
            "items": {
              "type": "string"
            }
          },
          "includeDormant": {
            "title": "Include dormant locations",
            "type": "boolean",
            "description": "Also return locations CQC marks as dormant.",
            "default": false
          },
          "includeKeyQuestionRatings": {
            "title": "Add key question ratings",
            "type": "boolean",
            "description": "Add the latest Safe, Effective, Caring, Responsive, and Well-led ratings for each location. Adds about 30 MB of download and 30 seconds.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}