{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas New Business Leads – New Sales Tax Permits Daily",
    "description": "Every new Texas business the day its sales-tax permit appears — name, owner, address, NAICS industry — enriched with franchise/SOS standing, business age and multi-location operator signals from the Comptroller's registers. ~13.5k new permits/month.",
    "version": "1.0",
    "x-build-id": "3Sfto7zggnqsLmT7L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/deadwood_data_solutions~texas-new-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-deadwood_data_solutions-texas-new-business-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/deadwood_data_solutions~texas-new-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-deadwood_data_solutions-texas-new-business-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/deadwood_data_solutions~texas-new-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-deadwood_data_solutions-texas-new-business-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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Only return permits issued within the last N days (1–365). Use 1–7 for a fresh daily feed, 90–365 to build large aged-lead lists from the archive (~170k permits in the last 12 months).",
            "default": 7
          },
          "naicsPrefixes": {
            "title": "NAICS industry prefixes (empty = all)",
            "type": "array",
            "description": "Filter by NAICS code prefix, applied server-side. Examples: 722 = restaurants & food service, 23 = construction, 44 / 45 = retail, 8121 = salons & barbers, 484 = trucking, 54 = professional services. 2–6 digits each.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities (empty = all of Texas)",
            "type": "array",
            "description": "Only outlets in these Texas cities (case-insensitive exact match, e.g. HOUSTON, SAN ANTONIO, AUSTIN).",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP code prefixes (empty = all)",
            "type": "array",
            "description": "Only outlets whose ZIP starts with one of these prefixes (e.g. 77 for greater Houston, 787 for Austin).",
            "items": {
              "type": "string"
            }
          },
          "orgTypes": {
            "title": "Organization types (empty = all)",
            "type": "array",
            "description": "Filter by legal form. Values: llc, corporation, soleProprietor, partnership, nonprofit, financialInstitution, association, trust, government. Sole proprietors have the OWNER'S PERSONAL NAME as the lead name.",
            "items": {
              "type": "string"
            }
          },
          "includeOutOfStateOwners": {
            "title": "Include businesses with out-of-state owners",
            "type": "boolean",
            "description": "About 4–5% of new permits are Texas outlets owned from another state (chains, remote sellers). Turn off to keep only Texas-headquartered owners.",
            "default": true
          },
          "includeGovernment": {
            "title": "Include government entities",
            "type": "boolean",
            "description": "Cities, school districts and agencies also hold sales-tax permits. Excluded by default — they are not sales leads.",
            "default": false
          },
          "enrichFranchise": {
            "title": "Franchise / SOS register enrichment",
            "type": "boolean",
            "description": "Deterministic taxpayer-number join against the Comptroller's Active Franchise Taxpayers register: franchise standing (right to transact), SOS file number, charter date, SOS status and business age. Matches entity-type leads (LLCs, corporations) — sole proprietors don't file franchise tax.",
            "default": true
          },
          "operatorHistory": {
            "title": "Operator history (multi-location & tenure signals)",
            "type": "boolean",
            "description": "Mines the full permit archive for each taxpayer: count of active outlets, first permit date, operator tenure. Flags isMultiLocation (expansion location of an existing operator) vs isFirstTimeOperator (brand-new entrepreneur).",
            "default": true
          },
          "maxItems": {
            "title": "Maximum records to return",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many normalized leads have been pushed. Leave blank for no limit."
          },
          "onlyNewSinceLastRun": {
            "title": "Only return permits not seen in a previous run",
            "type": "boolean",
            "description": "Recommended for scheduled runs. Uses persisted state to skip permits already returned earlier, so a recurring schedule only charges for genuinely new registrations.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}