{
  "openapi": "3.0.1",
  "info": {
    "title": "New York Liquor Licenses - SLA Registers",
    "description": "[💰$0.05/1K] New York State Liquor Authority registers: active licences, pending applications and the inactive archive on request. Every row carries the licence number, class code and description, licensee and DBA, premises address with county and map coordinates, issue and expiry dates.",
    "version": "0.9",
    "x-build-id": "rcNR19aQeoFBEMY1v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ai-lead-gen-tools~new-york-liquor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ai-lead-gen-tools-new-york-liquor-licenses",
        "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/ai-lead-gen-tools~new-york-liquor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-ai-lead-gen-tools-new-york-liquor-licenses",
        "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/ai-lead-gen-tools~new-york-liquor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-ai-lead-gen-tools-new-york-liquor-licenses",
        "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": [
              "full",
              "new"
            ],
            "type": "string",
            "description": "\"full\" returns every row of the selected datasets. \"new\" remembers every row already returned and only saves rows that are new since the last scheduled run — use it on a daily schedule.",
            "default": "full"
          },
          "datasets": {
            "title": "Datasets",
            "type": "array",
            "description": "Which New York tables to read. \"active\" is the 58 618-row current licence register. \"pending\" is the 2 998-row application queue — it is the only table that publishes an application date and a review status, so it is the earliest signal of a new opening. \"inactive\" is the 64 337-row archive going back to 1981; it is off by default because it triples a full run.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "pending",
                "inactive"
              ],
              "enumTitles": [
                "Active — current licences",
                "Pending — applications under review",
                "Inactive — closed archive since 1981"
              ]
            },
            "default": [
              "active",
              "pending"
            ]
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Filter by normalized business type. Leave empty for everything. Useful for lead lists: \"bar\", \"restaurant\", \"package_store\", \"grocery\", \"manufacturer\", \"wholesaler\", \"club\", \"hotel\", \"theater\", \"specialty_shop\", \"other\".",
            "items": {
              "type": "string",
              "enum": [
                "bar",
                "restaurant",
                "package_store",
                "grocery",
                "manufacturer",
                "wholesaler",
                "club",
                "hotel",
                "theater",
                "specialty_shop",
                "other"
              ]
            }
          },
          "licenseTypes": {
            "title": "Licence types",
            "type": "array",
            "description": "Keep only these licence classes, matched case-insensitively as a substring of either the class code or the class description. Example: \"0340\" or \"Restaurant\" keeps restaurants, \"Grocery Store\" keeps grocery stores, \"Farm\" keeps farm wineries, breweries and distilleries. Leave empty for every class.",
            "items": {
              "type": "string"
            }
          },
          "includeRiders": {
            "title": "Include additional-bar rows",
            "type": "boolean",
            "description": "New York lists additional bars as their own rows: 5 132 of the 58 618 active rows carry a class such as \"Additional Bar\" or \"Additional bar- ball park, race track, etc\". Each one extends a parent licence, which is published in the `addOnLicenseNumber` field. Turn this off to keep one row per primary licence.",
            "default": true
          },
          "includeOutOfState": {
            "title": "Include out-of-state licensees",
            "type": "boolean",
            "description": "New York licenses 1 708 active holders whose premises are outside the state — wineries, brewers, distillers and shippers headquartered elsewhere. Turn this off for New York premises only.",
            "default": true
          },
          "includeExpired": {
            "title": "Include expired licences",
            "type": "boolean",
            "description": "The actor re-reads the register between refreshes, so a licence can be past its expiry date while still listed. Turn this off to keep only rows that expire today or later.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on the number of records saved to the dataset. Each saved record is charged. 0 means no cap — the default two datasets are roughly 61 600 rows.",
            "default": 0
          },
          "includeRaw": {
            "title": "Include raw source row",
            "type": "boolean",
            "description": "Attach the untouched dataset row under the `raw` field, together with the page number and the dataset label. Useful for auditing, roughly doubles the dataset size.",
            "default": false
          },
          "pageSize": {
            "title": "Page size",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Rows requested per dataset page. Lower it when the registry throttles the run; raise it to finish faster. data.ny.gov served 50 000 rows per request when measured, but through the read-through gateway smaller pages are safer.",
            "default": 2000
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 10,
            "maximum": 300,
            "type": "integer",
            "description": "Per-page timeout before a retry is attempted.",
            "default": 60
          },
          "runBudgetSecs": {
            "title": "Run budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "How long this run may take before it stops and returns what it has. Leave it empty (recommended) and the run uses the whole timeout you set for it. Stopping early is not a failure: the run summary reports it and you get the records found so far."
          },
          "gatewayUrl": {
            "title": "Read-through gateway (override)",
            "type": "string",
            "description": "Optional. data.ny.gov answers HTTP 403 to some datacenter IP ranges. The actor then retries each page through a public read-through gateway, which is set by default. Point this at your own gateway to use a different one, or clear it to disable the fallback and fail fast instead.",
            "default": "https://r.jina.ai/"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}