{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Leads — New & Expiring Licenses (FL, TX)",
    "description": "Contractor license data from official state files (Florida DBPR, Texas TDLR): name, business, trade, status, address, phone, issue and expiration dates. Find newly licensed contractors, expiring licenses, or verify a list.",
    "version": "0.1",
    "x-build-id": "qDIDnDqoa2EkCUhXj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/griffie~contractor-license-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-griffie-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/griffie~contractor-license-leads/runs": {
      "post": {
        "operationId": "runs-sync-griffie-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/griffie~contractor-license-leads/run-sync": {
      "post": {
        "operationId": "run-sync-griffie-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": {
          "mode": {
            "title": "What do you want?",
            "enum": [
              "search",
              "newlyIssued",
              "newSinceLastRun",
              "expiring",
              "verify"
            ],
            "type": "string",
            "description": "<b>search</b>: every license matching the filters.<br><b>newlyIssued</b>: licenses first issued in the last N days (Florida publishes issue dates; Texas does not).<br><b>newSinceLastRun</b>: licenses that were not in the file on your previous run with the same filters (Florida and Texas). The first run saves a baseline.<br><b>expiring</b>: licenses that expire within N days, soonest first.<br><b>verify</b>: look up a list of license numbers or names.",
            "default": "search"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Florida (DBPR) and Texas (TDLR). Leave empty for both.",
            "items": {
              "type": "string",
              "enum": [
                "FL",
                "TX"
              ],
              "enumTitles": [
                "Florida (DBPR)",
                "Texas (TDLR)"
              ]
            }
          },
          "tradeCategories": {
            "title": "Trades",
            "type": "array",
            "description": "Normalized trade buckets that work across states, e.g. roofing, hvac, electrical, plumbing, pool, solar. Leave empty for all trades.",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "building",
                "residential",
                "engineering",
                "roofing",
                "hvac",
                "refrigeration",
                "mechanical",
                "electrical",
                "lowVoltage",
                "alarm",
                "plumbing",
                "pool",
                "solar",
                "sheetMetal",
                "underground",
                "pollutantStorage",
                "fireProtection",
                "elevator",
                "sign",
                "wellDrilling",
                "landscaping",
                "treeService",
                "painting",
                "concrete",
                "masonry",
                "flooring",
                "tile",
                "drywall",
                "insulation",
                "framing",
                "cabinetry",
                "glazing",
                "fencing",
                "demolition",
                "earthwork",
                "paving",
                "welding",
                "steel",
                "asbestos",
                "hazmat",
                "appliance",
                "specialty",
                "other"
              ],
              "enumTitles": [
                "General contractor",
                "Building contractor",
                "Residential contractor / remodeling",
                "General engineering (CA A)",
                "Roofing",
                "HVAC / air conditioning",
                "Refrigeration",
                "Mechanical",
                "Electrical",
                "Low voltage / security",
                "Alarm systems (FL)",
                "Plumbing",
                "Pool & spa",
                "Solar",
                "Sheet metal",
                "Underground utility / pipeline",
                "Pollutant storage tanks (FL)",
                "Fire protection",
                "Elevator",
                "Sign",
                "Well drilling",
                "Landscaping",
                "Tree service",
                "Painting",
                "Concrete",
                "Masonry",
                "Flooring",
                "Tile",
                "Drywall",
                "Insulation",
                "Framing / carpentry",
                "Cabinets / millwork",
                "Glass & glazing",
                "Fencing",
                "Demolition / building moving",
                "Earthwork",
                "Paving / parking",
                "Welding",
                "Steel / ornamental metal",
                "Asbestos",
                "Hazardous substance removal",
                "Appliance installation (TX)",
                "Specialty / limited specialty",
                "Other"
              ]
            }
          },
          "licenseTypeCodes": {
            "title": "License type codes",
            "type": "array",
            "description": "Exact official codes, e.g. CGC, CCC, CAC, EC (Florida); \"A/C Contractor\", \"Master Electrician\" (Texas). Matches if a license has any listed code OR any selected trade.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "County names, e.g. Miami-Dade, Hillsborough, Harris, Travis. \"County\" and punctuation are ignored.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names from the license address, e.g. Tampa, Houston, Austin.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes or prefixes",
            "type": "array",
            "description": "5-digit ZIP codes or prefixes (\"331\" matches 33101–33199).",
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "License status",
            "type": "array",
            "description": "active = current and active; inactive = current but inactive (FL); suspended; probation (FL); expired (past expiration date); other. Leave empty for all statuses. Ignored in verify mode.",
            "items": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "suspended",
                "probation",
                "expired",
                "other"
              ],
              "enumTitles": [
                "Active",
                "Inactive",
                "Suspended",
                "Probation (FL)",
                "Expired",
                "Other"
              ]
            },
            "default": [
              "active"
            ]
          },
          "keyword": {
            "title": "Name contains",
            "type": "string",
            "description": "Only licenses whose person or business name contains this text, e.g. \"solar\" or \"roofing\"."
          },
          "onlyWithPhone": {
            "title": "Only rows with a phone number",
            "type": "boolean",
            "description": "Texas publishes business phone numbers; Florida does not, so this drops Florida rows.",
            "default": false
          },
          "issuedWithinDays": {
            "title": "Issued within the last N days",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Florida only. Default 30 in newlyIssued mode."
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Florida only. Absolute date (YYYY-MM-DD) or relative (\"2 weeks\")."
          },
          "issuedBefore": {
            "title": "Issued on or before",
            "type": "string",
            "description": "Florida only."
          },
          "expiringWithinDays": {
            "title": "Expires within N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Licenses whose expiration date is between today and today + N days. Default 60 in expiring mode; works as a filter in any mode."
          },
          "expiredWithinDays": {
            "title": "Also include licenses expired in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Expiring mode: also return licenses that expired up to N days ago.",
            "default": 0
          },
          "includeTradespeople": {
            "title": "Texas: include individual tradesperson licenses",
            "type": "boolean",
            "description": "Adds Texas master/journeyman electricians, A/C technicians and other individual licenses. Off = contractor-level licenses only.",
            "default": false
          },
          "licenseNumbers": {
            "title": "License numbers (verify mode)",
            "type": "array",
            "description": "e.g. CGC1520000, CBC006261, 17043. Leading zeros and spaces are ignored.",
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Names (verify mode)",
            "type": "array",
            "description": "Person or business names to look up (3+ characters). Matches anywhere in the name.",
            "items": {
              "type": "string"
            }
          },
          "monitorKey": {
            "title": "Monitor key (newSinceLastRun)",
            "type": "string",
            "description": "Optional name for the saved snapshot. By default it is derived from your filters, so each saved task keeps its own baseline."
          },
          "baselineIssuedWithinDays": {
            "title": "First run: also return licenses issued in the last N days",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "newSinceLastRun only. The first run saves a baseline; for Florida it also returns licenses issued in this window so you get a useful first list. Set 0 to return nothing on the first run.",
            "default": 30
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many license rows. You pay per row saved.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Used when a state's server blocks the direct download (Florida DBPR blocks many cloud IPs). Apify Proxy (datacenter) is enough.",
            "default": {
              "useApifyProxy": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}