{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup and Leads",
    "description": "Verify US contractor licenses and find licensed contractors by trade and area. Get a clear status verdict, board classifications, dates, published bonds and insurance, source freshness and scheduled change monitoring.",
    "version": "0.1",
    "x-build-id": "vRIlvlUupj3cra7NO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-contractor-license-lookup",
        "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/zaiq~contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-contractor-license-lookup",
        "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/zaiq~contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-contractor-license-lookup",
        "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": [
              "leads",
              "verify"
            ],
            "type": "string",
            "description": "Find licenses by trade and area, or verify exact license numbers and business-name candidates.",
            "default": "leads"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Supported sources: California CSLB, Washington L&I, Oregon CCB, Connecticut contractor credentials, Colorado electrical/plumbing, New York mold contractors, Virginia current A/B/C. Empty defaults to Washington.",
            "items": {
              "type": "string",
              "enum": [
                "CA",
                "WA",
                "OR",
                "CT",
                "CO",
                "NY",
                "VA"
              ],
              "enumTitles": [
                "California",
                "Washington",
                "Oregon",
                "Connecticut",
                "Colorado (electrical / plumbing)",
                "New York (mold contractors)",
                "Virginia (current A/B/C)"
              ]
            },
            "default": [
              "WA"
            ]
          },
          "licenseNumbers": {
            "title": "License numbers",
            "type": "array",
            "description": "Verify mode. Use STATE:number, such as CA:123456. With one state selected, its prefix is optional. Keep leading zeros and board prefixes. Up to 500 inputs.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "businessNames": {
            "title": "Business names",
            "type": "array",
            "description": "Verify mode. Board-record name matches only, with no external enrichment. Prefix with STATE: to choose a state. A name match is a candidate, not proof of identity.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "nameMatch": {
            "title": "Business name matching",
            "enum": [
              "contains",
              "exact"
            ],
            "type": "string",
            "description": "Contains returns all matching board records up to the result limit. Exact matches the full name ignoring case.",
            "default": "contains"
          },
          "classifications": {
            "title": "Board classification codes",
            "type": "array",
            "description": "Leads mode. Original state codes, optionally prefixed by state, for example CA:C-39 or VA:ELE. Separate values are alternatives; trades and area filters must also match.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Leads mode. Exact city in the published business/mailing address, ignoring case. Leave empty for all cities. This is an address filter, not a service-area radius."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Leads mode. Published county, supported in California and Oregon. Other states return a free unsupported-filter note."
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Leads mode. Five-digit US ZIP or ZIP+4 from the published address. Leave empty for all ZIP codes."
          },
          "status": {
            "title": "License status",
            "enum": [
              "active",
              "all",
              "expired",
              "suspended",
              "revoked",
              "inactive",
              "cancelled",
              "unknown",
              "pending"
            ],
            "type": "string",
            "description": "Leads filter. Verify mode returns the actual status regardless of this setting. Monitoring also returns changes to previously watched licenses when their status leaves this filter. Active-only sources cannot report revoked or expired licenses.",
            "default": "active"
          },
          "newlyLicensedDays": {
            "title": "First licensed in the last N days",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Leads mode. Uses a published original issue date, from today back through N days. Zero disables it. Washington has no separately identified original issue date and returns a free unsupported-filter note.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum delivered license records",
            "minimum": 1,
            "maximum": 250000,
            "type": "integer",
            "description": "Total across selected states, in their input order. A capped scan is marked incomplete. Increase this to retrieve all matching records; maximum 250,000. Unchanged monitored records do not consume this limit.",
            "default": 10
          },
          "includeInsurance": {
            "title": "Join Washington bond and liability insurance records",
            "type": "boolean",
            "description": "Fetch the separate Washington public bond and insurance feeds. Other states retain fields already in their primary record. On-file policies are not a guarantee of coverage; dates and limitations are included.",
            "default": true
          },
          "monitorStore": {
            "title": "Monitoring key-value store name",
            "type": "string",
            "description": "Optional named store for scheduled comparisons. First run returns the baseline; later runs charge only new or changed records. Use the same input filters and one run at a time. Missing active-only records produce a free unknown-status note, never a guessed revocation."
          },
          "trades": {
            "title": "Normalized trades",
            "type": "array",
            "description": "Leads mode. Match any selected trade based only on published classifications; empty means all. Oregon uses broad endorsements; Colorado and New York have restricted trade coverage.",
            "items": {
              "type": "string",
              "enum": [
                "general-building",
                "general-engineering",
                "home-improvement",
                "residential-remodeling",
                "electrical",
                "plumbing",
                "hvac",
                "roofing",
                "landscaping",
                "concrete",
                "masonry",
                "painting",
                "drywall",
                "flooring",
                "solar",
                "pools",
                "fire-protection",
                "excavation",
                "insulation",
                "windows-doors",
                "demolition",
                "remediation",
                "specialty"
              ],
              "enumTitles": [
                "General Building",
                "General Engineering",
                "Home Improvement",
                "Residential Remodeling",
                "Electrical",
                "Plumbing",
                "Hvac",
                "Roofing",
                "Landscaping",
                "Concrete",
                "Masonry",
                "Painting",
                "Drywall",
                "Flooring",
                "Solar",
                "Pools",
                "Fire Protection",
                "Excavation",
                "Insulation",
                "Windows Doors",
                "Demolition",
                "Remediation",
                "Specialty"
              ]
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}