{
  "openapi": "3.0.1",
  "info": {
    "title": "Cannabis License Radar: New York New-Licensee Alerts & Leads",
    "description": "Pick New York cannabis license types, county or region, and get every new licensee as a deduped lead row (entity, license type, county, issue date) from the state OCM feed. Covers cultivators, processors and distributors, which have no storefront or menu. $19 cohort report of recent issuance.",
    "version": "0.0",
    "x-build-id": "Af0cuKdJ1FIjkCC9Q"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yungstentech~cannabis-license-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yungstentech-cannabis-license-radar",
        "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/yungstentech~cannabis-license-radar/runs": {
      "post": {
        "operationId": "runs-sync-yungstentech-cannabis-license-radar",
        "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/yungstentech~cannabis-license-radar/run-sync": {
      "post": {
        "operationId": "run-sync-yungstentech-cannabis-license-radar",
        "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": [
              "watch",
              "unwatch",
              "list-events",
              "report"
            ],
            "type": "string",
            "description": "What this run does. watch (the default): establish (first run) or advance a standing filter-watch and deliver newly-issued licensees; billed as a monthly filter-watch fee plus one charge per alert. unwatch: forget a saved filter's memory, free. list-events: replay this filter's change-event history, free. report: a one-off cohort report of newly-issued licensees for the types, county or region you name over a period, billed once per report. This Actor's Pricing section carries the current figure for every event.",
            "default": "watch"
          },
          "licenseTypes": {
            "title": "License types",
            "maxItems": 10,
            "type": "array",
            "description": "Which NY OCM license type codes the run covers. Leave it empty to cover every type; a watch also needs a county or region when this is empty. OCMRO (Registered Organization) is listed here, but a watch run that includes it stops on a validation error before any fetch or charge, because every RO record is a pending application with no issued date. Use OCMRO in report mode. Up to 10 types.",
            "items": {
              "type": "string",
              "enum": [
                "OCMRETL",
                "OCMMICR",
                "OCMCAURD22",
                "OCMPROC",
                "OCMCULT",
                "OCMDIST",
                "OCMPT3B",
                "OCMDIST2",
                "OCMPROC2",
                "OCMXROD",
                "OCMPT3F",
                "OCMCAURD22_PCA",
                "OCMRETL_PCA",
                "OCMRO"
              ],
              "enumTitles": [
                "Adult-Use Retail Dispensary",
                "Adult-Use Microbusiness",
                "Adult-Use Conditional Retail Dispensary",
                "Adult-Use Processor",
                "Adult-Use Cultivator",
                "Adult-Use Distributor",
                "Adult-Use Processor Type Three-Branding",
                "Adult-Use Distributor (variant)",
                "Adult-Use Processor (variant)",
                "Adult-Use RO Dispensary",
                "Adult-Use Processor Type Three-Flower",
                "Adult-Use Conditional Retail Dispensary (PCA)",
                "Adult-Use Retail Dispensary (PCA)",
                "Registered Organization (report mode only)"
              ]
            }
          },
          "county": {
            "title": "County (optional)",
            "type": "string",
            "description": "A single NY county to watch, matched case-insensitively (for example Kings, Ulster, New York). At least one of licenseTypes, county or region is required for a watch; report may be broad."
          },
          "region": {
            "title": "Region (optional)",
            "type": "string",
            "description": "A single NY OCM region to watch, matched case-insensitively (for example Manhattan, Finger Lakes). Usually used instead of county; setting both requires a license to match both."
          },
          "statusFilter": {
            "title": "License statuses (optional)",
            "type": "array",
            "description": "Optional license_status values to restrict the filter. Matched exactly, including case, unlike county and region, so use the feed's own spelling: Active. Empty means all statuses. Part of the filter definition, so changing it re-baselines the saved filter.",
            "items": {
              "type": "string"
            }
          },
          "maxAlertsPerRun": {
            "title": "Max alerts per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on the number of new-licensee alerts delivered and charged in a single run. Any overflow is not added to the seen-set and redelivers on the next run, and a truncation marker names how many were withheld. Bounds a catch-up run.",
            "default": 50
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Optional https URL. A watch run that delivered at least one new-licensee alert POSTs those alerts to it. A run with nothing new sends no POST, and report, unwatch, list-events and dry runs never POST, so do not use it as a heartbeat. Best-effort alerting only: the dataset is the durable record. If you need to verify the caller, put a secret token in the URL yourself."
          },
          "filterName": {
            "title": "Filter name",
            "type": "string",
            "description": "Names this filter within your account so its deduplication memory persists across scheduled runs. Lowercased and restricted to letters, digits and hyphens (1 to 40 characters). Changing what the filter covers under the same name, whether you widen it or narrow it, re-baselines it: the memory is reseeded from the current licensees and no back-catalog is charged.",
            "default": "default"
          },
          "period": {
            "title": "Report period (report mode)",
            "type": "string",
            "description": "Required in report mode, ignored in every other mode. The issued-date window for the cohort report, as YYYY-MM (a single month) or YYYY-MM..YYYY-MM (an inclusive range), for example 2026-04..2026-06. A report run with no period stops before it fetches or charges anything."
          },
          "dryRun": {
            "title": "Dry run (preview, no charge)",
            "type": "boolean",
            "description": "When true, charge nothing and touch no filter memory. A watch run previews up to 5 of the alerts it would deliver. A report run returns the report with up to 5 licensees in it. Use it to sanity check your filter before scheduling.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}