{
  "openapi": "3.0.1",
  "info": {
    "title": "Cannabis License Changes: Closed, New, Opened, Lapsed",
    "description": "State cannabis licence events as dated signals across 21 states: licences closed, surrendered, revoked, nonrenewed or gone from the list, plus licences issued and operations commenced. Official state files, each labelled with how often the state updates it. Pay per signal.",
    "version": "1.1",
    "x-build-id": "3DKQZg4VsTpIqcQrz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mdcurt~cannabis-license-change-signals/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mdcurt-cannabis-license-change-signals",
        "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/mdcurt~cannabis-license-change-signals/runs": {
      "post": {
        "operationId": "runs-sync-mdcurt-cannabis-license-change-signals",
        "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/mdcurt~cannabis-license-change-signals/run-sync": {
      "post": {
        "operationId": "run-sync-mdcurt-cannabis-license-change-signals",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "States to read, by postal code. Leave empty for all 21. Files differ in how often the state updates them (daily for CA, NY, CT; weekly for MA, VT, WA; monthly for CO, ME, MI, NV, OR; yearly for MD; irregular for the rest) — every signal carries that as sourceCadence and the date of the copy read as sourceUpdated.",
            "items": {
              "type": "string",
              "enum": [
                "AZ",
                "CA",
                "CO",
                "CT",
                "DE",
                "IL",
                "KY",
                "MA",
                "MD",
                "ME",
                "MI",
                "MO",
                "MT",
                "NJ",
                "NV",
                "NY",
                "OR",
                "PA",
                "SD",
                "VT",
                "WA"
              ],
              "enumTitles": [
                "Arizona (dormant 2021 list)",
                "California",
                "Colorado",
                "Connecticut",
                "Delaware (dispensaries)",
                "Illinois (dispensaries)",
                "Kentucky",
                "Massachusetts",
                "Maryland (yearly)",
                "Maine (adult use)",
                "Michigan (nonrenewal reports)",
                "Missouri (dispensaries)",
                "Montana",
                "New Jersey",
                "Nevada",
                "New York",
                "Oregon",
                "Pennsylvania (dispensaries)",
                "South Dakota",
                "Vermont",
                "Washington (retail)"
              ]
            },
            "default": []
          },
          "sinceDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Window for the events the state dates itself: licences closed (Oregon inactive dates, California expirations, Michigan nonrenewals), licences issued, operations commenced, expiration dates passed. Counted back from the date of the state's file, so a file posted monthly still yields its newest month. 7 for a weekly check, 30 for a monthly one. Max 365. Changes found against a baseline are always reported whatever the window.",
            "default": 30
          },
          "kinds": {
            "title": "Kinds",
            "type": "array",
            "description": "Keep only these kinds. Leave empty for all. license-closed needs no baseline (the state prints the closure). license-removed, status-changed, stage-changed and license-added need a baseline store.",
            "items": {
              "type": "string",
              "enum": [
                "license-closed",
                "license-removed",
                "status-changed",
                "license-issued",
                "operations-commenced",
                "expiration-lapsed",
                "stage-changed",
                "license-added"
              ]
            },
            "default": []
          },
          "licenseTypes": {
            "title": "Licence types",
            "type": "array",
            "description": "Keep only these licence categories. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "cultivator",
                "manufacturer",
                "retailer",
                "testing-lab",
                "transporter",
                "delivery",
                "other"
              ]
            },
            "default": []
          },
          "closuresOnly": {
            "title": "Closures only",
            "type": "boolean",
            "description": "Keep only signals that say a licence ended: closed by the state, gone from the list, or moved into a closed status (surrendered, revoked, cancelled, expired, inactive, nonrenewed). For liquidators, equipment resellers and brokers.",
            "default": false
          },
          "stateStore": {
            "title": "Baseline store (for closures and status changes)",
            "type": "string",
            "description": "Optional. Pick one of your key-value stores — create an empty NAMED one once (unnamed stores are deleted after your plan's retention period, which would silently reset the baseline). Each run compares every state's file with the snapshot saved there by the previous run, reports licences that disappeared, changed status or stage, or are new, then saves the new snapshot. The first run only saves the baseline. Without a store you get the events the states date themselves."
          },
          "maxSignals": {
            "title": "Max signals",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper bound on signals pushed (and charged). Highest materiality first, then newest.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "The state files answer from datacenter IPs; the default Apify datacenter proxy is enough.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}