{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas Business Leads Scraper - Companies by Industry (NAICS)",
    "description": "Scrape Texas businesses from the official Comptroller Active Sales Tax Permit Holders open data: company & DBA name, address, NAICS industry, entity type, county, permit & first-sale dates. Filter by industry, city/county & new-business date; monitor only-new. Keyless, no browser.",
    "version": "0.1",
    "x-build-id": "6RiiiRVFJ54LZOjux"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~texas-business-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-texas-business-leads-scraper",
        "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/scrapesage~texas-business-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-texas-business-leads-scraper",
        "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/scrapesage~texas-business-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-texas-business-leads-scraper",
        "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": {
          "industrySectors": {
            "title": "Industry sectors (NAICS)",
            "type": "array",
            "description": "Filter by broad NAICS industry sector(s). Pick one or more friendly sector names — they map to the underlying 2-digit NAICS codes. Leave empty for all industries. For finer targeting use NAICS codes / prefixes below.",
            "items": {
              "type": "string",
              "enum": [
                "Agriculture, Forestry, Fishing & Hunting",
                "Mining, Quarrying, & Oil & Gas Extraction",
                "Utilities",
                "Construction",
                "Manufacturing",
                "Wholesale Trade",
                "Retail Trade",
                "Transportation & Warehousing",
                "Information",
                "Finance & Insurance",
                "Real Estate & Rental & Leasing",
                "Professional, Scientific & Technical Services",
                "Management of Companies & Enterprises",
                "Administrative & Support & Waste Management",
                "Educational Services",
                "Health Care & Social Assistance",
                "Arts, Entertainment & Recreation",
                "Accommodation & Food Services",
                "Other Services (except Public Administration)",
                "Public Administration"
              ]
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (exact 6-digit)",
            "type": "array",
            "description": "Exact 6-digit NAICS industry codes to include, e.g. `722511` (full-service restaurants), `236115` (single-family home construction), `541110` (law offices). One per row.",
            "items": {
              "type": "string"
            }
          },
          "naicsPrefixes": {
            "title": "NAICS code prefixes (2–5 digit)",
            "type": "array",
            "description": "Industry code prefixes for sub-sector targeting, e.g. `722` (food services & drinking places), `2382` (building equipment contractors), `5413` (architectural / engineering). Matches any NAICS starting with the prefix. One per row.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter to one or more Texas cities (business / outlet location), e.g. `Houston`, `Austin`, `Dallas`. Case-insensitive. Leave empty for the whole state.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Filter by Texas county name(s), e.g. `Harris`, `Travis`, `Bexar` (or the Comptroller numeric county code). One per row.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by ZIP code or ZIP prefix, e.g. `7704` matches all `7704x` ZIPs. One per row.",
            "items": {
              "type": "string"
            }
          },
          "organizationTypes": {
            "title": "Entity / organization types",
            "type": "array",
            "description": "Filter by legal entity type. `llc`, `corporation`, `nonprofit`, `soleProprietor`, `partnership`, `professional`, `association`, `government`, `financial`, `trust`.",
            "items": {
              "type": "string",
              "enum": [
                "llc",
                "corporation",
                "nonprofit",
                "soleProprietor",
                "partnership",
                "professional",
                "association",
                "government",
                "financial",
                "trust"
              ]
            }
          },
          "businessNameQuery": {
            "title": "Business name contains",
            "type": "string",
            "description": "Only return businesses whose legal name or DBA / outlet name contains this text (case-insensitive), e.g. `coffee`, `dental`, `roofing`."
          },
          "newBusinessWithinDays": {
            "title": "New businesses within N days",
            "minimum": 1,
            "type": "integer",
            "description": "Only return businesses whose sales-tax permit was issued in the last N days — the high-intent new-business signal. E.g. `30` for businesses permitted this month. Leave empty to ignore."
          },
          "permitIssuedAfter": {
            "title": "Permit issued after",
            "type": "string",
            "description": "Only businesses with a permit issue date on/after this date (YYYY-MM-DD)."
          },
          "permitIssuedBefore": {
            "title": "Permit issued before",
            "type": "string",
            "description": "Only businesses with a permit issue date on/before this date (YYYY-MM-DD)."
          },
          "firstSalesAfter": {
            "title": "First sales date after",
            "type": "string",
            "description": "Only businesses whose first taxable-sales date is on/after this date (YYYY-MM-DD)."
          },
          "firstSalesBefore": {
            "title": "First sales date before",
            "type": "string",
            "description": "Only businesses whose first taxable-sales date is on/before this date (YYYY-MM-DD)."
          },
          "insideCityLimitsOnly": {
            "title": "Inside city limits only",
            "type": "boolean",
            "description": "Only return outlets located inside an incorporated city's limits.",
            "default": false
          },
          "outOfStateOwnersOnly": {
            "title": "Out-of-state owners only",
            "type": "boolean",
            "description": "Only return businesses whose legal taxpayer (owner) mailing state is outside Texas — out-of-state companies operating in TX.",
            "default": false
          },
          "taxpayerNumbers": {
            "title": "Taxpayer numbers (lookup)",
            "type": "array",
            "description": "Look up specific businesses by their 11-digit Texas taxpayer number. One per row.",
            "items": {
              "type": "string"
            }
          },
          "dedupeByTaxpayer": {
            "title": "One record per business (dedupe by taxpayer)",
            "type": "boolean",
            "description": "By default each record is one outlet / location (a business with several stores returns several rows). Enable this to keep only one record per taxpayer (company).",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "newestFirstSale",
              "name",
              "none"
            ],
            "type": "string",
            "description": "Result ordering. `newest` = most recently permitted businesses first (best for fresh new-business leads).",
            "default": "newest"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of business records to return.",
            "default": 1000
          },
          "monitorMode": {
            "title": "Monitor mode (only new)",
            "type": "boolean",
            "description": "Remember businesses seen in previous runs (per monitor key) and emit ONLY newly-permitted businesses on each run. Ideal on a schedule to receive a fresh new-business feed. Works alongside Apify Schedules.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the monitor state so different saved tasks keep separate memory. Use one key per saved search.",
            "default": "default"
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional Socrata application token to raise the public API rate limit. Not required for typical runs."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy. The Texas open-data API needs no proxy; leave disabled for the cheapest runs.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}