{
  "openapi": "3.0.1",
  "info": {
    "title": "CA Cannabis Licenses - DCC Commercial & Cultivation Register",
    "description": "California cannabis license register (DCC, public data, ~20.9k licenses): active / expired / revoked status, storefront (BCC), cultivation (CCL) & manufacturing (MCSB) licenses. Search by license number, business, county, status, license type.",
    "version": "0.0",
    "x-build-id": "6ZlrlnI0Cw7a2I5fC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~ca-cannabis/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-ca-cannabis",
        "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/j0401~ca-cannabis/runs": {
      "post": {
        "operationId": "runs-sync-j0401-ca-cannabis",
        "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/j0401~ca-cannabis/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-ca-cannabis",
        "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": {
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "Exact license number - returns a single license (any era / status, e.g. C10-0000001-LIC or CCL18-0000004). Leave blank to search instead."
          },
          "keyword": {
            "title": "Business keyword",
            "type": "string",
            "description": "Substring match against business legal name + DBA + owner name. E.g. a dispensary brand, grower, or manufacturer."
          },
          "status": {
            "title": "License status",
            "enum": [
              "",
              "Active",
              "Expired",
              "Surrendered",
              "Canceled",
              "Revoked",
              "Limited Operations",
              "Suspended"
            ],
            "type": "string",
            "description": "Filter to a license status. Leave blank for all statuses. Active ~7.6k of the ~20.9k register. Blank is default so an exact license-number lookup is never shadowed."
          },
          "authority": {
            "title": "Authority",
            "enum": [
              "",
              "CCL",
              "BCC",
              "MCSB"
            ],
            "type": "string",
            "description": "CCL = cultivation (13,282), BCC = commercial storefront/delivery (6,037), MCSB = manufacturing/testing (1,558). Mirrored by the typeCategory filter."
          },
          "typeCategory": {
            "title": "License category",
            "enum": [
              "",
              "Cultivation",
              "Commercial",
              "Manufacturer"
            ],
            "type": "string",
            "description": "Cultivation / Commercial / Manufacturer - mirrors authority (BCC=Commercial, CCL=Cultivation, MCSB=Manufacturer)."
          },
          "designation": {
            "title": "Designation",
            "enum": [
              "",
              "Adult-Use",
              "Medicinal",
              "Adult-Use and Medicinal"
            ],
            "type": "string",
            "description": "Adult-Use / Medicinal / both. Blank = all."
          },
          "term": {
            "title": "License term",
            "enum": [
              "",
              "Annual",
              "Provisional",
              "Interim"
            ],
            "type": "string",
            "description": "Annual / Provisional / Interim. Blank = all."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Premise county (substring), e.g. Humboldt or Los Angeles. County is the one location field published for every license (cultivation / manufacturing withhold street + coordinates). Blank = all counties."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Premise city (substring). Blank = all cities."
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Premise ZIP (prefix match). Blank = all."
          },
          "aggregate": {
            "title": "Aggregate instead of records",
            "type": "boolean",
            "description": "When on, returns one summary row per group with a count (full register, client-side). Uses the filters above.",
            "default": false
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "status",
              "authority",
              "typeCategory",
              "designation",
              "term",
              "county"
            ],
            "type": "string",
            "description": "Dimension to group by when aggregate is on: status / authority / typeCategory / designation / term / county.",
            "default": "status"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap records pushed (0 = no cap). Default = the first 250 licenses in the register (page-1 order - the storefront block, not sorted by recency). To scan or aggregate the full register, use aggregate or raise this.",
            "default": 250
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}