{
  "openapi": "3.0.1",
  "info": {
    "title": "Arizona Contractor Leads - ROC Licenses with Phone & Address",
    "description": "$3 per 1,000 licences, no start fee. Every current Arizona ROC contractor licence from the registrar's own daily list, with phone, street address, class, qualifying party, personnel, issue and expiry dates, bonds and complaints. Filter by trade, city, ZIP, new licences or expiry.",
    "version": "0.1",
    "x-build-id": "rtN1EG7nCdF4MqmcS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~arizona-roc-contractor-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-arizona-roc-contractor-leads-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/scrapersdelight~arizona-roc-contractor-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-arizona-roc-contractor-leads-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/scrapersdelight~arizona-roc-contractor-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-arizona-roc-contractor-leads-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": {
          "classifications": {
            "title": "Classifications or trades",
            "type": "array",
            "description": "ROC classification codes (CR-37, KB-2, B, R-62, C-11...) or trade words matched inside ROC's class names (\"plumbing\" catches C-37, CR-37, R-37 and the solar plumbing classes; \"roofing\" catches C-42, CR-42, R-42). A full label such as \"CR-37 Plumbing\" works too. Dual classes have their own codes: CR-37 is dual plumbing, so add it next to C-37 if you want both. Leave empty for every class.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City of the licensee's address of record, as ROC writes it (case does not matter): Phoenix, Tucson, Mesa, Scottsdale, Chandler, Gilbert, Glendale, Peoria... Licensees based outside Arizona keep their own city. Leave empty for every city.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes or ZIP prefixes",
            "type": "array",
            "description": "Five-digit ZIPs or prefixes: \"85255\" is one ZIP, \"852\" is every ZIP starting 852 (the Phoenix East Valley). Leave empty for every ZIP.",
            "items": {
              "type": "string"
            }
          },
          "licenseScopes": {
            "title": "Licence scope",
            "type": "array",
            "description": "Keep only Commercial, Residential or Dual licences (ROC's class type). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "Commercial",
                "Residential",
                "Dual"
              ]
            }
          },
          "issuedWithinDays": {
            "title": "New licences: issued in the last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only licences first issued in the last N days: newly licensed contractors, the buyers of bonds, insurance, supplies and software. ROC's new-licence list held 4,084 licences issued 2026-03-02 to 2026-09-28, about 20 a day. Leave empty for any issue date."
          },
          "expiringWithinDays": {
            "title": "Renewal window: licence expires in the next N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep only licences that expire between today and N days from now: the renewal list for bond, insurance and continuing-education sellers. Leave empty for any expiry date."
          },
          "licenseNumbers": {
            "title": "Licence numbers",
            "type": "array",
            "description": "ROC licence numbers, with or without the ROC prefix or leading zeros: \"ROC 349004\", \"349004\". A number ROC does not know is listed in the run summary and never charged.",
            "items": {
              "type": "string"
            }
          },
          "searchNames": {
            "title": "Business or person names",
            "type": "array",
            "description": "Business names, DBA names or people (first name then last name, as ROC asks), searched in ROC's own contractor search. Every licence of every matching business is returned. ROC's search stops at about 1,000 businesses per name; the run summary says when a name hit that limit.",
            "items": {
              "type": "string"
            }
          },
          "includeInactiveLicenses": {
            "title": "Include inactive licences in name searches",
            "type": "boolean",
            "description": "Name searches return only Active licences unless this is on. Licence-number lookups always return the licence you asked for, whatever its status.",
            "default": false
          },
          "onlyWithPhone": {
            "title": "Only contractors with a phone number",
            "type": "boolean",
            "description": "Skip licences with no valid phone number. Skipped licences are not delivered and not charged.",
            "default": false
          },
          "includeDetails": {
            "title": "Include entity type, bonds and complaints",
            "type": "boolean",
            "description": "Adds entity type, status-change date, account status, every bond (surety, number, amount, status), complaint counts and complaint records, and ROC's description of the classification. No extra charge.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum licences",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many licences, newest licence first. 0 = every match.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Both ROC sites answer direct connections, which is the default. A proxy set here is used only if a direct request fails.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}