{
  "openapi": "3.0.1",
  "info": {
    "title": "Florida Contractor Directory & Leads Scraper (DBPR)",
    "description": "Scrape every licensed Florida contractor in a county from the official DBPR registry — name, license, status, expiration, address — paginated and ready to export.",
    "version": "0.0",
    "x-build-id": "1YsyrfSAbeGepRaVI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~florida-contractor-directory-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-florida-contractor-directory-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/scrapebench~florida-contractor-directory-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-florida-contractor-directory-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/scrapebench~florida-contractor-directory-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-florida-contractor-directory-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "auto",
              "lookup",
              "export"
            ],
            "type": "string",
            "description": "auto (default): licence numbers or names in 'Look up licences' run a lookup, otherwise a county export runs. lookup: find licences by DBPR licence number or business / person name, statewide. export: every licensee of the chosen licence types in the chosen counties, names and numbers ignored.",
            "default": "auto"
          },
          "queries": {
            "title": "Look up licences (numbers or names)",
            "type": "array",
            "description": "DBPR licence numbers ('CGC1514724') or business / person names, one per line. Each name is searched in DBPR's business and person indexes on the Construction Industry and Electrical Contractors boards; each match is enriched from its DBPR detail page (issue date, county) unless 'Add licence details' is off. Leave empty to export by county.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Look up one licence",
            "type": "string",
            "description": "One licence number or name; same as the list above."
          },
          "includeDetails": {
            "title": "Add licence details (lookup)",
            "type": "boolean",
            "description": "Lookup only: fetch each match's DBPR detail page for issue date, county and the full licence type. Slower; same price.",
            "default": true
          },
          "listCountiesOnly": {
            "title": "List counties only (Discovery Mode)",
            "type": "boolean",
            "description": "When true, the actor returns all available Florida counties from the DBPR portal and exits immediately (< 10 seconds, no charge). Use this to discover the exact county name to pass into Scrape Mode.",
            "default": false
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "The Florida county to scrape - full name (e.g. 'Hillsborough') or the DBPR numeric code (e.g. '39'). Common spellings are accepted: 'Miami-Dade County' resolves to DBPR's 'Dade', and 'Saint Lucie' to 'St. Lucie'. If the county is missing or not recognised, the run returns the full list of counties instead of failing, and is not charged."
          },
          "counties": {
            "title": "County (batch)",
            "type": "array",
            "description": "Look up many in ONE run instead of starting a run per lookup. Takes the same values as 'County'. Combined with 'County' if you fill both, and duplicates are removed. Billing is unchanged: you are charged per record returned, not per entry submitted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "board": {
            "title": "Board / license category code",
            "type": "string",
            "description": "DBPR board code to filter by. Default '06' = Construction Industry (the main contractor board covering General, Building, Residential, and specialty contractors). Contact DBPR or run Discovery Mode to find codes for other boards.",
            "default": "06"
          },
          "licenseType": {
            "title": "License type code",
            "type": "string",
            "description": "DBPR license type code within the selected board. Default '0605' = Certified General Contractor (Board 06). Use '0600' for all license types within the board (if supported by the portal).",
            "default": "0605"
          },
          "licenseTypes": {
            "title": "Licence types (export)",
            "type": "array",
            "description": "Several licence types in one export: DBPR codes ('0605' Certified General, '0603' Certified Roofing, '0616' Registered Roofing) or 'roofing' (= 0603 + 0616), 'CCC', 'RC', 'CGC'. Overrides 'License type code' when set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "Keep only these: active (Current, active), inactive (Current, inactive), suspended, or all. Empty = every row DBPR lists, as before.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "One status; same as Statuses."
          },
          "expiresAfter": {
            "title": "Expires on or after",
            "type": "string",
            "description": "Only licences expiring on or after this date (YYYY-MM-DD). With 'Expires on or before' it lists licences due for renewal in a window."
          },
          "expiresBefore": {
            "title": "Expires on or before",
            "type": "string",
            "description": "Only licences expiring on or before this date (YYYY-MM-DD)."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Cap on the number of records returned PER ENTRY, not per run — so a batch cannot silently return only the first 500 rows overall and read as 'the rest don't exist'. A county + license type can have thousands of results; set lower for testing. Default 500.",
            "default": 500
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The DBPR portal is usually reachable directly from Apify's datacenter IPs. Enable a proxy (e.g. residential) only if a run is blocked or served a challenge page.",
            "default": {
              "useApifyProxy": false
            }
          },
          "includeContacts": {
            "title": "Include contact details",
            "type": "boolean",
            "description": "Where the board publishes no phone for a business, add one (with its website and street address when found), looked up by business name. Charged as a separate 'Contact details found' event only on a row that gets a phone; a row without one costs only the row price. Turn off for the licence list alone.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}