{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas Business Leads – New Sales Tax Permits & Entity Search",
    "description": "New Texas businesses from the Comptroller's public-domain sales tax permit file: business and store name, store address, county, NAICS, permit issue date, mailing address. Filter by city, county, ZIP, industry. Search by name or taxpayer number. Franchise status optional. $0.80 per 1,000.",
    "version": "0.1",
    "x-build-id": "bsdEes0QyvrqOc5J2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~texas-new-business-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-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/gazidev~texas-new-business-leads/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-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/gazidev~texas-new-business-leads/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "newPermits",
              "search"
            ],
            "type": "string",
            "description": "New permits = businesses and stores whose Texas sales tax permit was issued recently. Search = look through all ~895,000 active permits by name, taxpayer number, city, county or industry (no date limit unless you set dates).",
            "default": "newPermits"
          },
          "issuedWithinDays": {
            "title": "Issued in the last N days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Used in New permits mode. Counted back from the newest permit date in the state file, which is usually 1-3 days old. 7 days is about 3,000 company permits. Ignored when you set the dates below.",
            "default": 7
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Optional first permit issue date (YYYY-MM-DD). Works in both modes."
          },
          "issuedBefore": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Optional last permit issue date (YYYY-MM-DD). Works in both modes."
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Texas counties of the store, e.g. Harris, Dallas, Travis (or the Comptroller's 3-digit code).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Exact city of the store, e.g. HOUSTON, AUSTIN, PLANO. Case does not matter.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes or prefixes",
            "type": "array",
            "description": "ZIP of the store: 78701 for one ZIP, 787 for every ZIP that starts with 787.",
            "items": {
              "type": "string"
            }
          },
          "naicsPrefixes": {
            "title": "Industry (NAICS codes or prefixes)",
            "type": "array",
            "description": "2 to 6 digits of the NAICS code the business reported, e.g. 722 (restaurants and bars), 44 and 45 (retail), 238 (specialty trade contractors), 8121 (salons), 811 (repair shops). The file uses 2017 and some older codes.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains (any of)",
            "type": "array",
            "description": "Business (taxpayer) name or store name contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "taxpayerNumbers": {
            "title": "Texas taxpayer numbers",
            "type": "array",
            "description": "11-digit Comptroller taxpayer numbers to look up. Use with mode Search. Returns every active store of the taxpayer.",
            "items": {
              "type": "string"
            }
          },
          "organizationTypes": {
            "title": "Organization types",
            "type": "array",
            "description": "Keep only these legal forms. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "CL",
                "CI",
                "CT",
                "CF",
                "CN",
                "CM",
                "CP",
                "CU",
                "AP",
                "PL",
                "PF",
                "PB",
                "PV",
                "AR",
                "TR",
                "IS",
                "PI"
              ],
              "enumTitles": [
                "Texas Limited Liability Company",
                "Foreign Limited Liability Company",
                "Texas Profit Corporation",
                "Foreign Profit Corporation",
                "Texas Non-Profit Corporation",
                "Foreign Non-Profit Corporation",
                "Texas Professional Corporation",
                "Foreign Professional Corporation",
                "Texas Professional Association",
                "Texas Limited Partnership",
                "Foreign Limited Partnership",
                "Business General Partnership",
                "Texas Joint Venture",
                "Other Association",
                "Trust",
                "Individual - Sole Owner",
                "Individual General Partnership"
              ]
            }
          },
          "excludeIndividuals": {
            "title": "Leave out individuals",
            "type": "boolean",
            "description": "Leaves out sole owners, estates and partnerships of individuals. Their rows are personal data and often show a home address. Turn this off only if you have a lawful purpose for them.",
            "default": true
          },
          "firstOutletOnly": {
            "title": "First store only",
            "type": "boolean",
            "description": "Only outlet number 1 of each taxpayer. In New permits mode this drops extra locations of businesses that already had a permit.",
            "default": false
          },
          "addFranchiseStatus": {
            "title": "Add franchise tax status",
            "type": "boolean",
            "description": "Adds the Secretary of State file number, charter date and right to transact business from the Comptroller's Active Franchise Taxpayers file. $0.0003 per matched row; rows without a match are free. Only some legal forms are in that file.",
            "default": false
          },
          "onlyNew": {
            "title": "Only permits not returned before",
            "type": "boolean",
            "description": "For scheduled runs: remembers the permits already returned for this exact set of filters (named key-value store texas-permit-seen in your account) and skips them, free of charge.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}