{
  "openapi": "3.0.1",
  "info": {
    "title": "Arizona ROC Contractor License Scraper & Leads",
    "description": "Search Arizona ROC contractor licenses by number, name, city or trade. Export phone, address, status, class, scope, renewal date, personnel, complaints and bonds. Filter by ZIP, residential/commercial scope, expiring licenses and phone.",
    "version": "0.1",
    "x-build-id": "3ObiAHzlWVmJTKhME"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automation-lab~arizona-roc-contractor-license-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automation-lab-arizona-roc-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/automation-lab~arizona-roc-contractor-license-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automation-lab-arizona-roc-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/automation-lab~arizona-roc-contractor-license-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automation-lab-arizona-roc-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",
        "properties": {
          "licenseNumbers": {
            "title": "🔢 ROC license numbers",
            "maxItems": 50,
            "type": "array",
            "description": "Enter Arizona ROC license numbers, one per line. Leading zeros and a ROC prefix are optional: 79944 and ROC 079944 both work.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQueries": {
            "title": "🏢 Company or person names",
            "maxItems": 50,
            "type": "array",
            "description": "Search business names or personnel names. Use first name then last name for people, as required by AZ ROC.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 AZ ROC detail URLs",
            "type": "array",
            "description": "Optional exact contractor-search URLs containing a licenseId parameter.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Mailing-address city searched on AZ ROC, for example Flagstaff. Add more cities in Cities.",
            "default": ""
          },
          "cities": {
            "title": "Cities",
            "maxItems": 25,
            "type": "array",
            "description": "Several mailing-address cities in one run, for example Phoenix, Mesa, Scottsdale. Each city is searched separately and repeats are removed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "classification": {
            "title": "License classification",
            "type": "string",
            "description": "Enter an AZ ROC classification label or its code, for example B-2 General Small Commercial Contractor or B-2.",
            "default": ""
          },
          "classifications": {
            "title": "License classifications",
            "maxItems": 25,
            "type": "array",
            "description": "Several classifications in one run, as codes (R-39, CR-11, B-2) or full AZ ROC labels. Combined with cities, every city is searched for every classification.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "maxItems": 25,
            "type": "array",
            "description": "Keep only contractors whose mailing ZIP starts with one of these: \"85255\" keeps one ZIP, \"852\" keeps every ZIP starting with 852. Works together with a city, classification or name search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "licenseScopes": {
            "title": "License scope",
            "type": "array",
            "description": "Keep only residential, commercial or dual (residential and commercial) licenses, as AZ ROC labels them. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "residential",
                "commercial",
                "dual"
              ],
              "enumTitles": [
                "Residential",
                "Commercial",
                "Dual"
              ]
            },
            "default": []
          },
          "status": {
            "title": "License status",
            "enum": [
              "any",
              "active",
              "inactive"
            ],
            "type": "string",
            "description": "Keep all licenses, active licenses, or explicitly non-active licenses. Missing status never qualifies as inactive.",
            "default": "any"
          },
          "expiringWithinDays": {
            "title": "Renewals: expiring within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only licenses whose renewed-through date falls between today and N days from now: a renewal list for bond and insurance outreach. Applies to the licenses your city, classification or name search returns. Leave empty for any date."
          },
          "onlyWithPhone": {
            "title": "Only contractors with a phone number",
            "type": "boolean",
            "description": "Skip licenses without a valid US phone number. Skipped licenses are not saved and not charged.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum contractors",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many unique contractor license records (up to 1,000 per run).",
            "default": 20
          },
          "maxPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Bound each name, city or classification search to this many pages of 50 licenses.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Direct anonymous access works by default. Enable an Apify Proxy session only if your network is throttled.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}