{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas New Business Leads (Sales Tax Permits)",
    "description": "Newly issued Texas sales tax permits from the Texas Comptroller's official open data. Filter by city, ZIP, industry and date to find new businesses. Records include business name, address, NAICS code and permit date. Ready for accountants, sales teams and market research.",
    "version": "0.1",
    "x-build-id": "Kyj1jvfEqun7ZdRVY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ledgerstar~texas-sales-tax-permits/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ledgerstar-texas-sales-tax-permits",
        "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/ledgerstar~texas-sales-tax-permits/runs": {
      "post": {
        "operationId": "runs-sync-ledgerstar-texas-sales-tax-permits",
        "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/ledgerstar~texas-sales-tax-permits/run-sync": {
      "post": {
        "operationId": "run-sync-ledgerstar-texas-sales-tax-permits",
        "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": {
          "daysBack": {
            "title": "Permits issued in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Look back this many days from today. Ignored when 'Issued on or after' is set.",
            "default": 30
          },
          "issuedSince": {
            "title": "Issued on or after (optional)",
            "type": "string",
            "description": "Exact start date (YYYY-MM-DD). Overrides 'last N days'."
          },
          "newSince": {
            "title": "Alert mode: only permits new since (optional)",
            "type": "string",
            "description": "Turns on alert mode: only return permits issued on or after this date. Use an exact date (YYYY-MM-DD) or the word lastRun to return only permits issued since the previous successful run. Leave empty to turn alert mode off and use the settings above instead."
          },
          "cities": {
            "title": "Cities (optional)",
            "type": "array",
            "description": "Only businesses located in these Texas cities, e.g. Austin, Round Rock. Case-insensitive, exact city name.",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP codes or ZIP prefixes (optional)",
            "type": "array",
            "description": "e.g. 78701 for one ZIP, or 787 for all of central Austin.",
            "items": {
              "type": "string"
            }
          },
          "naicsPrefixes": {
            "title": "Industry (NAICS code prefixes, optional)",
            "type": "array",
            "description": "e.g. 722 = restaurants & bars, 44 / 45 = retail, 8121 = personal care. Leave empty for all industries.",
            "items": {
              "type": "string"
            }
          },
          "includeSoleProprietors": {
            "title": "Include sole proprietors",
            "type": "boolean",
            "description": "Off by default: only registered entities (LLC, Inc., LP, …) are returned. When on, sole proprietors are included as business locations only — their personal name and taxpayer number are never returned.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Stop after this many results. You are charged per result.",
            "default": 20
          },
          "maxRowsScanned": {
            "title": "Maximum source rows to scan",
            "minimum": 100,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety limit on how many raw rows are read while filtering (1,000 rows per request, one request per second).",
            "default": 20000
          },
          "alertLookbackDays": {
            "title": "Alert mode: lookback safety window in days",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Only used with the word lastRun above. Also checks this many days before your last run for permits the source posted late. You are never charged twice for the same permit, so a larger number is always safe.",
            "default": 7
          },
          "appToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional free app token from the Texas Open Data Portal. Gives higher rate limits for very large pulls. Not needed for normal use."
          },
          "alertStateKey": {
            "title": "Alert mode: stable state name (optional)",
            "pattern": "^[a-z0-9-]{1,30}$",
            "type": "string",
            "description": "Only used with alert mode (the field above). Give this a fixed name such as austin nightly so this schedule always uses the same saved last run date, even if you change other filters. Letters, numbers and hyphens only, up to 30 characters. Leave empty to have one chosen automatically based on your filters."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}