{
  "openapi": "3.0.1",
  "info": {
    "title": "Arizona Contractor License Lookup & Export",
    "description": "Every AZ ROC-licensed contractor in Arizona, refreshed from the board's daily file. Export a whole classification (roofing, electrical, plumbing, HVAC, pools) or verify a list of names or licence numbers. Status, expiry date, address. No phone: the ROC does not publish it. Measured coverage",
    "version": "1.0",
    "x-build-id": "fzjiOhqfd4cqsfx4p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wellbuilt_zythem~arizona-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wellbuilt_zythem-arizona-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/wellbuilt_zythem~arizona-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-wellbuilt_zythem-arizona-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/wellbuilt_zythem~arizona-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-wellbuilt_zythem-arizona-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": [
              "lookup",
              "export"
            ],
            "type": "string",
            "description": "Lookup verifies a list of names or licence numbers. Export downloads a whole state and trade. Full detail reads the CSLB licence page for each California licence number you pass: bond, workers' compensation carrier and policy, classifications, entity type and today's status. It is the only mode that answers for a licence that is expired, inactive, cancelled or not in the register at all, because the bulk California file publishes active licences only.",
            "default": "lookup"
          },
          "queries": {
            "title": "Names or licence numbers to look up",
            "type": "array",
            "description": "One per line. A licence number matches exactly; a name matches any Arizona licensee or business containing it.",
            "items": {
              "type": "string"
            }
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "Leave empty for every trade the Arizona board licenses.",
            "items": {
              "type": "string",
              "enum": [
                "construction-contractor",
                "electrical-contractor",
                "plumbing-contractor",
                "hvac-contractor",
                "roofing-contractor",
                "pool-spa-contractor",
                "elevator-contractor",
                "alarm-system-contractor",
                "home-improvement-contractor",
                "specialty-contractor",
                "painting-contractor",
                "concrete-contractor",
                "landscaping-contractor",
                "excavation-contractor",
                "carpentry-contractor"
              ],
              "enumTitles": [
                "General building and engineering (A, B, KA, KB)",
                "Electrical (CR-11, C-11, R-11)",
                "Plumbing, solar liquid systems included",
                "Air conditioning, refrigeration and heating",
                "Roofing (CR-42, C-42, R-42)",
                "Swimming pools, spas and pool service",
                "Elevators (CR-12, C-12, R-12)",
                "Low voltage communication systems (CR-67, C-67, R-67)",
                "Minor home improvements, remodeling and repairs",
                "As restricted by the Registrar (CR-5, KE, KO)",
                "Painting and wall covering (CR-34, C-34, R-34)",
                "Concrete (CR-9, C-9, R-9)",
                "Hardscaping and irrigation systems (CR-21, C-21, R-21)",
                "Excavating, grading and oil surfacing (CR-2, R-2, A-5)",
                "Carpentry and finish carpentry (CR-7, CR-60 and friends)"
              ]
            },
            "default": []
          },
          "onlyActive": {
            "title": "Only active licences",
            "type": "boolean",
            "description": "Drop expired, suspended and out-of-business licences.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only rows with a phone number",
            "type": "boolean",
            "description": "For calling lists.",
            "default": false
          },
          "onlyExpiringSoon": {
            "title": "Only licences expiring within 60 days",
            "type": "boolean",
            "description": "The renewal window. Who sells bonds, insurance or continuing education wants exactly these.",
            "default": false
          },
          "expiringWithinDays": {
            "title": "Expiring within N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Keep only licences that expire in the next N days (1 to 365). The renewal list: whoever sells bonds, insurance or continuing education calls these first. Leave empty for no window. Overrides the fixed 60-day \"expiring soon\" switch when set."
          },
          "issuedWithinDays": {
            "title": "Issued within N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Keep only licences first issued in the last N days (1 to 365): newly licensed contractors, which is a new business needing suppliers, software, a truck and insurance. Uses the board's issue date; boards that do not publish one return nothing here rather than a guess."
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 0,
            "type": "integer",
            "description": "0 for no limit.",
            "default": 0
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}