{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas Liquor Licenses - TABC AIMS Register",
    "description": "[💰$0.05/1K] Every Texas liquor licence in the TABC AIMS register with the trade name and the holder. Each row carries the licence number, its two-letter type, the tier, the status, the premises address, the county, the mailing address, both dates and the subordinate permits.",
    "version": "0.7",
    "x-build-id": "HBGWvbaA4cdZwfphM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ai-lead-gen-tools~texas-liquor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ai-lead-gen-tools-texas-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~texas-liquor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-ai-lead-gen-tools-texas-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~texas-liquor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-ai-lead-gen-tools-texas-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 the entire register. \"new\" remembers every licence already returned and only saves licences that are new since the last scheduled run — use it on a daily schedule.",
            "default": "full"
          },
          "datasets": {
            "title": "What to read",
            "type": "array",
            "description": "\"license\" is the 128 650-row TABC licence register. \"pending\" is the 849-row table of original new applications TABC has received but not yet issued — useful for prospecting businesses that are about to open. Keep both for the default 80 115 records.",
            "items": {
              "type": "string",
              "enum": [
                "license",
                "pending"
              ]
            },
            "default": [
              "license",
              "pending"
            ]
          },
          "includeInactive": {
            "title": "Include inactive licences",
            "type": "boolean",
            "description": "The register keeps licences after they stop being valid: 49 384 of the 128 650 rows are expired, surrendered, cancelled or suspended. Leave this off to read only the 79 266 Active licences. Turn it on for the full 128 650-row history.",
            "default": false
          },
          "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 type codes",
            "type": "array",
            "description": "Keep only these licence type codes, matched case-insensitively as a substring of the source value. TABC publishes licence types as two-letter codes, and a row can carry several, e.g. \"MB,LH\". Examples: \"MB\" keeps mixed beverage (bars and restaurants), \"BG\" beer on-premise, \"BQ\" beer off-premise, \"P\" package store, \"N\" private club. Leave empty for every type.",
            "items": {
              "type": "string"
            }
          },
          "includeSubordinates": {
            "title": "Include subordinate permits",
            "type": "boolean",
            "description": "TABC records subordinate permits (Brew Pub, Brewer's Self-Distribution, Local Cartage, Food and Beverage Certificate, Late Hours Certificate, Local Distributor's Permit, Water Park) as flags on the primary licence row. Turn this off to keep only rows with no subordinate permit.",
            "default": true
          },
          "includeOutOfState": {
            "title": "Include out-of-state licensees",
            "type": "boolean",
            "description": "Texas licenses holders whose premises address is outside the state — wineries, brewers, distillers and shippers headquartered elsewhere, plus importers. Turn this off for Texas premises only.",
            "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 scope is roughly 80 100 rows.",
            "default": 0
          },
          "includeRaw": {
            "title": "Include raw source row",
            "type": "boolean",
            "description": "Attach the untouched dataset row under the `raw` field. 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.texas.gov serves the 128 650-row licence table without a page ceiling, so the default finishes it in 16 pages.",
            "default": 5000
          },
          "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.texas.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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}