{
  "openapi": "3.0.1",
  "info": {
    "title": "State Liquor & Restaurant Licenses Leads (NY SLA + TX TABC)",
    "description": "Extract verified restaurant, bar, tavern, hotel, and liquor store business leads from official state liquor authority registries (New York State Liquor Authority and Texas TABC). Includes DBA names, legal corporate entities, premises addresses, license types, expiration dates, and hospitality B2B le",
    "version": "1.0",
    "x-build-id": "rN6qM6Geos6Rx4N7l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apex-b2b-data~state-liquor-restaurant-licenses-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apex-b2b-data-state-liquor-restaurant-licenses-leads",
        "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/apex-b2b-data~state-liquor-restaurant-licenses-leads/runs": {
      "post": {
        "operationId": "runs-sync-apex-b2b-data-state-liquor-restaurant-licenses-leads",
        "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/apex-b2b-data~state-liquor-restaurant-licenses-leads/run-sync": {
      "post": {
        "operationId": "run-sync-apex-b2b-data-state-liquor-restaurant-licenses-leads",
        "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": {
          "state": {
            "title": "Target State",
            "enum": [
              "NY",
              "TX",
              "ALL"
            ],
            "type": "string",
            "description": "Select state liquor authority registry: 'NY' (New York State Liquor Authority SLA active licenses), 'TX' (Texas Alcoholic Beverage Commission TABC), or 'ALL' for multi-state aggregation.",
            "default": "NY"
          },
          "limit": {
            "title": "Max Records to Extract (limit)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of license lead records to retrieve.",
            "default": 20
          },
          "maxItems": {
            "title": "Max Items (Alias for limit)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Alternative parameter for setting the maximum number of leads to extract.",
            "default": 20
          },
          "licenseType": {
            "title": "Establishment / License Type",
            "enum": [
              "ALL",
              "RESTAURANT",
              "BAR_TAVERN",
              "HOTEL",
              "LIQUOR_STORE",
              "WHOLESALE"
            ],
            "type": "string",
            "description": "Filter by hospitality establishment class: 'ALL' (all licenses), 'RESTAURANT' (dining establishments & eating places), 'BAR_TAVERN' (drinking places, taverns, clubs), 'HOTEL' (hotels, motels, hospitality lodgings), 'LIQUOR_STORE' (retail package stores, bottle shops), or 'WHOLESALE' (wholesalers, breweries, wineries).",
            "default": "ALL"
          },
          "county": {
            "title": "County Name (Optional)",
            "type": "string",
            "description": "Filter by county name (e.g. 'New York', 'Kings', 'Queens', 'Harris', 'Dallas', 'Travis', 'Bexar', 'Erie').",
            "default": ""
          },
          "city": {
            "title": "City / Municipality (Optional)",
            "type": "string",
            "description": "Filter by city name (e.g. 'New York', 'Brooklyn', 'Houston', 'Austin', 'Dallas', 'Buffalo').",
            "default": ""
          },
          "activeOnly": {
            "title": "Active Licenses Only",
            "type": "boolean",
            "description": "Restricts results to currently active/valid licenses.",
            "default": true
          },
          "minLeadScore": {
            "title": "Minimum Hospitality Lead Score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Filter out leads below this score threshold. Higher scores reflect distinct customer-facing DBA brand names, recently issued licenses, and complete physical locations.",
            "default": 0
          },
          "searchQuery": {
            "title": "Search Query (DBA or Business Name)",
            "type": "string",
            "description": "Case-insensitive keyword search across trade name (DBA) or legal entity corporate name.",
            "default": ""
          },
          "socrataAppToken": {
            "title": "Socrata App Token (Optional)",
            "type": "string",
            "description": "Optional X-App-Token header for high-volume, unthrottled queries to data.ny.gov and data.texas.gov.",
            "default": ""
          },
          "includeRawData": {
            "title": "Include Raw Source Record",
            "type": "boolean",
            "description": "Include the raw, unmapped Socrata JSON payload under the 'raw_data' key for auditing or data warehouse ingestion.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}