{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Search USA - Contractor Leads (9 States)",
    "description": "Contractor license search across official data: California CSLB, WA L&I, Oregon CCB & BCD, Texas TDLR, NY registry, NYC DOB, NY elevator/mold, Montgomery Co. MD, Nashville, Cleveland, Boulder. Business phone, address, license type. $1.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "6aRub10mwzaN4Od3l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/loomwise~us-contractor-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-loomwise-us-contractor-licenses",
        "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/loomwise~us-contractor-licenses/runs": {
      "post": {
        "operationId": "runs-sync-loomwise-us-contractor-licenses",
        "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/loomwise~us-contractor-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-loomwise-us-contractor-licenses",
        "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": {
          "sources": {
            "title": "States / sources",
            "type": "array",
            "description": "Leave empty for all sources. You can also type a state code such as NY to get every New York source.",
            "items": {
              "type": "string",
              "enum": [
                "CA_CSLB",
                "WA",
                "OR_CCB",
                "OR_BCD",
                "TX",
                "NY",
                "NYC_DOB",
                "NY_DOL_TRADES",
                "MD_MONTGOMERY",
                "TN_NASHVILLE",
                "OH_CLEVELAND",
                "CO_BOULDER",
                "WA_SEATTLE_TREE"
              ],
              "enumTitles": [
                "California (CSLB, all licensed contractor businesses)",
                "Washington (L&I construction, electrical, plumbing)",
                "Oregon (Construction Contractors Board)",
                "Oregon (electrical, plumbing, HVAC/R, solar - BCD)",
                "Texas (TDLR HVAC, electrical, sign, elevator)",
                "New York (NYS DOL contractor registry)",
                "New York City (DOB general contractors, electrical firms, master plumbers, riggers)",
                "New York (NYS DOL elevator & mold remediation contractors)",
                "Maryland - Montgomery County (new home builders)",
                "Tennessee - Nashville (registered professional contractors)",
                "Ohio - Cleveland (active contractor registrations)",
                "Colorado - Boulder (licensed contractors)",
                "Washington - Seattle (tree service providers)"
              ]
            }
          },
          "withinDays": {
            "title": "Newly licensed within last N days (0 = all active)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "0 returns the full active roster. Above 0 returns only new licenses from sources that publish an issue date (WA, Oregon CCB, NY registry, NY DOL trades, Montgomery County MD); the others are skipped.",
            "default": 0
          },
          "dateFrom": {
            "title": "Licensed from (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional exact start date for new licenses."
          },
          "dateTo": {
            "title": "Licensed to (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional exact end date."
          },
          "tradeKeywords": {
            "title": "Trade / license type contains",
            "type": "array",
            "description": "e.g. electric, plumb, hvac, solar, general. Matches license type and specialty.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Business name contains",
            "type": "array",
            "description": "e.g. roofing, solar, pool.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP prefixes",
            "type": "array",
            "description": "e.g. 981 (Seattle), 972 (Portland), 787 (Austin).",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Exact city names, e.g. Spokane, Bend, Houston.",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Drop expired or inactive licenses.",
            "default": true
          },
          "includeContactDetails": {
            "title": "Include business address and phone",
            "type": "boolean",
            "description": "Business address and phone as published by the licensing agency.",
            "default": true
          },
          "maxResultsPerSource": {
            "title": "Max results per source",
            "minimum": 1,
            "maximum": 300000,
            "type": "integer",
            "description": "Cap per state source.",
            "default": 200
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Overall cap. You pay per result.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}