{
  "openapi": "3.0.1",
  "info": {
    "title": "New York Cannabis Licenses - OCM Register & Equity",
    "description": "New York's OCM cannabis licence register (3,002 locations): licence type and status, entity and DBA, county and region, whether the business is actually operating, the authorised activities, and the equity category.",
    "version": "0.0",
    "x-build-id": "etiB7cSI2fZCYkNnf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~ny-ocm-cannabis/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-ny-ocm-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~ny-ocm-cannabis/runs": {
      "post": {
        "operationId": "runs-sync-j0401-ny-ocm-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~ny-ocm-cannabis/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-ny-ocm-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = records matching your filters (default). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "Exact licence number, e.g. 'OCM-RETL-26-000530'. Blank = any. 12% of rows are in-process applications with no number yet.",
            "default": ""
          },
          "licenseType": {
            "title": "License type",
            "type": "string",
            "description": "Substring, e.g. 'Retail Dispensary', 'Microbusiness', 'Processor', 'Cultivator', 'Distributor'. Blank = any.",
            "default": ""
          },
          "licenseStatus": {
            "title": "License status",
            "type": "string",
            "description": "Exact status: 'Active' (2,478), 'In-Process' (356), 'Inactive' (84), 'Amendment Under Review' (78), 'PCA Under Review' (6). Blank = any.",
            "default": ""
          },
          "operationalStatus": {
            "title": "Operational status",
            "type": "string",
            "description": "Exact operational status: 'Active' (1,950) or 'Non-Operational' (964). A licence can be Active while not yet operating. Blank = any.",
            "default": ""
          },
          "region": {
            "title": "Region",
            "type": "string",
            "description": "Region substring, e.g. 'Mid-Hudson', 'Western NY', 'Long Island', 'Brooklyn'. The source mixes the ten economic regions with the NYC boroughs and spells 'Capital' two ways; a substring finds all of them. Blank = any.",
            "default": ""
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County substring, e.g. 'Kings', 'Queens', 'Suffolk'. Blank = any.",
            "default": ""
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City substring. Only 45% of licences publish a location. Blank = any.",
            "default": ""
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "ZIP, matched as a prefix. Only 45% of licences publish a location. Blank = any.",
            "default": ""
          },
          "entityName": {
            "title": "Entity name",
            "type": "string",
            "description": "Licence holder's legal entity name substring. Blank = any.",
            "default": ""
          },
          "dba": {
            "title": "DBA",
            "type": "string",
            "description": "Trading name substring. Populated on 26% of licences. Blank = any.",
            "default": ""
          },
          "businessPurpose": {
            "title": "Business purpose",
            "type": "string",
            "description": "Substring of the authorised purpose, e.g. 'Adult-Use Retail Sales', 'Adult-Use Cultivation', 'Medical Sales'. Blank = any.",
            "default": ""
          },
          "seeCategory": {
            "title": "Equity category",
            "type": "string",
            "description": "Social and economic equity category substring, e.g. 'Women-Owned Business', 'Minority-Owned Business', 'Service-Disabled Veteran-Owned Business'. Populated on 1,130 licences. Blank = any.",
            "default": ""
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Earliest issue date (YYYY-MM-DD). Blank = any.",
            "default": ""
          },
          "issuedTo": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Latest issue date (YYYY-MM-DD), inclusive. Blank = any.",
            "default": ""
          },
          "expiringBefore": {
            "title": "Expiring on or before",
            "type": "string",
            "description": "Expiration cutoff, inclusive (YYYY-MM-DD) - pair with issuedFrom for a renewal window. Blank = any.",
            "default": ""
          },
          "cultivationIndoor": {
            "title": "Indoor cultivation authorised",
            "enum": [
              "",
              "1",
              "0"
            ],
            "type": "string",
            "description": "Authorised for indoor cultivation. '1' = only those; '0' = only those without it recorded; blank = any.",
            "default": ""
          },
          "cultivationOutdoor": {
            "title": "Outdoor cultivation authorised",
            "enum": [
              "",
              "1",
              "0"
            ],
            "type": "string",
            "description": "Authorised for outdoor cultivation. Blank = any.",
            "default": ""
          },
          "processingExtraction": {
            "title": "Extraction authorised",
            "enum": [
              "",
              "1",
              "0"
            ],
            "type": "string",
            "description": "Authorised for processing by extraction. Blank = any.",
            "default": ""
          },
          "retailSalesWithDelivery": {
            "title": "Retail with delivery",
            "enum": [
              "",
              "1",
              "0"
            ],
            "type": "string",
            "description": "Authorised for retail sales with delivery. Blank = any.",
            "default": ""
          },
          "retailDriveThru": {
            "title": "Drive-through retail",
            "enum": [
              "",
              "1",
              "0"
            ],
            "type": "string",
            "description": "Authorised for drive-through retail (88 licences). Blank = any.",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "type": "integer",
            "description": "Maximum records to return in rows mode (1-10000). Default 50.",
            "default": 50
          },
          "groupBy": {
            "title": "Group by",
            "enum": [
              "licenseType",
              "licenseStatus",
              "operationalStatus",
              "region",
              "county",
              "businessPurpose"
            ],
            "type": "string",
            "description": "aggregate mode only: the dimension to count by.",
            "default": "licenseType"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}