{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas Contractor License Lookup & Leads (TDLR)",
    "description": "Texas TDLR contractor license lookup and leads from the official open-data file: HVAC (A/C), electrical, elevator, sign and appliance contractors with phone, address, status and expiry. Filter by trade, city, ZIP or county.",
    "version": "0.1",
    "x-build-id": "XuIf6YvF44mJT5aYD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/quarrylane-data~texas-tdlr-contractor-license-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-quarrylane-data-texas-tdlr-contractor-license-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/quarrylane-data~texas-tdlr-contractor-license-leads/runs": {
      "post": {
        "operationId": "runs-sync-quarrylane-data-texas-tdlr-contractor-license-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/quarrylane-data~texas-tdlr-contractor-license-leads/run-sync": {
      "post": {
        "operationId": "run-sync-quarrylane-data-texas-tdlr-contractor-license-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": {
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Optional trade filter. Official TDLR contractor types in this file are A/C (HVAC), electrical, elevator, electrical sign and appliance-installation contractors — not general building or roofing licences (those are issued locally or by other boards). Leave empty to return all TDLR contractor types.",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "home-improvement",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "solar",
                "pool",
                "elevator",
                "fire-protection",
                "demolition",
                "excavation",
                "concrete-masonry",
                "carpentry",
                "painting",
                "flooring",
                "landscaping",
                "sign",
                "asbestos-lead",
                "specialty"
              ],
              "enumTitles": [
                "General / building contractor",
                "Home improvement / handyman",
                "Electrical",
                "Plumbing",
                "HVAC / mechanical / A-C",
                "Roofing & gutters",
                "Solar",
                "Pool & spa",
                "Elevator / conveyor",
                "Fire protection / sprinklers",
                "Demolition",
                "Excavation / underground utility",
                "Concrete, masonry & paving",
                "Carpentry, framing & drywall",
                "Painting",
                "Flooring & tile",
                "Landscaping, tree & irrigation",
                "Signs",
                "Asbestos, lead & pollutant storage",
                "Specialty contractor (other)"
              ]
            }
          },
          "licenseTypeKeywords": {
            "title": "Licence type keywords",
            "type": "array",
            "description": "Extra free-text match on TDLR licence type, e.g. 'electrical', 'elevator', 'A/C', 'appliance', 'sign'. Combined with Trades using OR.",
            "items": {
              "type": "string"
            }
          },
          "businessNameContains": {
            "title": "Business name contains",
            "type": "string",
            "description": "Case-insensitive match on business or owner name (useful for verifying one company)."
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Exact city names as they appear in the TDLR file, e.g. 'Houston', 'Dallas', 'Austin', 'San Antonio'.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Texas county names as published by TDLR, e.g. 'HARRIS', 'DALLAS', 'TRAVIS' (case-insensitive).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes or prefixes",
            "type": "array",
            "description": "5-digit ZIPs or prefixes, e.g. '78701' or '787' (Austin area).",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licences only",
            "type": "boolean",
            "description": "Skip expired licences (TDLR publishes an expiration date, not a separate status flag).",
            "default": true
          },
          "requirePhone": {
            "title": "Only licences with a phone number",
            "type": "boolean",
            "description": "Keep only records with a published business telephone number.",
            "default": false
          },
          "onlyNew": {
            "title": "Monitor mode: only licences not delivered before",
            "type": "boolean",
            "description": "Remembers every licence delivered (and, on the first run, every other current match) under the monitor key. Later scheduled runs return and charge only new records. The official TDLR file has no issue date, so this is the way to watch for newly listed contractors.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Label for this saved monitor (plain text, not a password or API key). When \"Only new\" monitor mode is on, the Actor remembers which records it has already delivered under this name and returns only new ones next time. Use a different name per filter set or client, for example \"client-a-weekly\". Older inputs that use monitorKey still work.",
            "default": "default"
          },
          "enrichWebsiteContacts": {
            "title": "Enrich contacts from the business website",
            "type": "boolean",
            "description": "When a record already includes the firm's own website, fetch the homepage plus likely /contact and /about pages (lightweight HTTP only, robots.txt respected, short timeouts). Adds websiteEmails, websitePhones and websiteSocials. Charges an extra $0.02 contact-enriched event only when an email or phone is found. The official TDLR file does not publish websites, so this is a no-op unless a website is present; domains are never guessed.",
            "default": false
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of licences to return (Free Apify plan: 15 per run). The default is a cheap, auto-test-safe sample.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}