{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Scraper: State License Lookup & Leads",
    "description": "Contractor licenses from state registers: California CSLB, Texas TDLR, Washington L&I, Oregon CCB, Connecticut, Colorado, New York. Look up license numbers or get new contractor leads by trade: status, classification, owner, phone, address, insurance, bond. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "RnztgsknFsjzvx2Xl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~contractor-license-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-contractor-license-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/steadyscrape~contractor-license-scraper/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-contractor-license-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/steadyscrape~contractor-license-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-contractor-license-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",
        "required": [
          "states"
        ],
        "properties": {
          "states": {
            "title": "States",
            "minItems": 1,
            "type": "array",
            "description": "The state registers to read, each one's newest licenses first where the state dates them. California is one 56 MB file read whole (about a minute); Texas publishes no issue date, so it is read in its own order.",
            "items": {
              "type": "string",
              "enum": [
                "CA",
                "TX",
                "WA",
                "OR",
                "CT",
                "CO",
                "NY"
              ],
              "enumTitles": [
                "California (CSLB, every license)",
                "Texas (TDLR: A/C, electrical, elevator, appliance, water well)",
                "Washington (L&I, every contractor)",
                "Oregon (CCB, active licenses)",
                "Connecticut (DCP: home improvement and trades)",
                "Colorado (DORA: electricians and plumbers)",
                "New York (DOL Contractor Registry)"
              ]
            },
            "default": [
              "CA",
              "TX",
              "WA",
              "OR",
              "CT",
              "CO",
              "NY"
            ]
          },
          "trades": {
            "title": "Trades (optional)",
            "type": "array",
            "description": "Only licenses with a classification of one of these trades, read from each state's own classification names (California's C-10 Electrical, Washington's ROOFING specialty, Connecticut's HIC home improvement). Empty: every trade.",
            "items": {
              "type": "string",
              "enum": [
                "general",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "solar",
                "painting",
                "landscaping",
                "tree_service",
                "concrete_masonry",
                "flooring_tile",
                "carpentry_drywall",
                "pool_spa",
                "fire_protection",
                "elevator",
                "demolition",
                "low_voltage_security",
                "earthwork_paving",
                "glazing",
                "asbestos_lead",
                "well_drilling",
                "fencing",
                "siding_gutters",
                "metal_welding"
              ],
              "enumTitles": [
                "General contractor (building, engineering, home improvement)",
                "Electrical",
                "Plumbing",
                "HVAC and refrigeration",
                "Roofing",
                "Solar",
                "Painting",
                "Landscaping and irrigation",
                "Tree service",
                "Concrete and masonry",
                "Flooring and tile",
                "Carpentry, drywall and insulation",
                "Pool and spa",
                "Fire protection",
                "Elevator and conveyor",
                "Demolition",
                "Low voltage, locks and security",
                "Earthwork and paving",
                "Glass and glazing",
                "Asbestos and lead abatement",
                "Well drilling and pumps",
                "Fencing",
                "Siding and gutters",
                "Metal, steel and welding"
              ]
            },
            "default": []
          },
          "classification": {
            "title": "Classification (optional)",
            "type": "string",
            "description": "A classification as the state writes it: a code matched exactly (\"C-10\", \"B\", \"HIC\", \"EC\", \"CGC1\") or words of its name (\"solar\", \"tree service\"). Empty: every classification.",
            "default": ""
          },
          "licenseNumbers": {
            "title": "License numbers (optional)",
            "maxItems": 100,
            "type": "array",
            "description": "Look up these licenses only, numbered as the state numbers them: \"1000013\" in California, \"TIPTOTR742QC\" in Washington, \"HIC.0644210\" in Connecticut. Each number is looked for in every state chosen and short numbers repeat across states, so choose the states they belong to. Set License status to \"Any status\" to get expired or suspended ones too. Up to 100. Empty: every license.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "License status",
            "enum": [
              "active",
              "any"
            ],
            "type": "string",
            "description": "Active: only licenses the state counts in force today (not expired, suspended or revoked). Any: every license the register lists, inactive ones included.",
            "default": "active"
          },
          "issuedWithinDays": {
            "title": "Issued in the last N days (optional)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Only licenses first issued from this many days ago up to today: new businesses. 0: any issue day. Ignored when \"Issued since\" is set.",
            "default": 0
          },
          "issuedFrom": {
            "title": "Issued since (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Only licenses first issued on or after this day, YYYY-MM-DD. Empty: use \"Issued in the last N days\"."
          },
          "cities": {
            "title": "Cities (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Only licenses whose business address is in one of these cities, e.g. \"Seattle\", \"Portland\". Empty: every city.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Only licenses in one of these counties, e.g. \"Los Angeles\", \"Travis\". California, Texas and Oregon publish a county; the other states are not read when this is set (a free row says so).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Only licenses whose business ZIP code starts with one of these: a whole ZIP (\"98101\") or its start (\"981\"). Empty: every ZIP code.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyWithPhone": {
            "title": "Only licenses with a phone",
            "type": "boolean",
            "description": "Only licenses whose state lists a business phone. Connecticut and Colorado publish no phone and are not read when this is on.",
            "default": false
          },
          "maxResultsPerState": {
            "title": "Max licenses per state",
            "minimum": 0,
            "type": "integer",
            "description": "Stops reading a state after this many licenses. 0: no limit.",
            "default": 100
          },
          "maxResults": {
            "title": "Max licenses in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stops the run after this many licenses across every state. 0: no limit. Each license is one charged result; free status rows are not charged.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}