{
  "openapi": "3.0.1",
  "info": {
    "title": "Idaho Contractor License Lookup & List Scraper (DOPL)",
    "description": "Export every active Idaho contractor registration (25,863 on 2026-10-14) or look one up, with mailing address, county, DBA, status and issue/expiry dates from DOPL.",
    "version": "0.0",
    "x-build-id": "BN5BTGHuvJfNQul7f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~idaho-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-idaho-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/scrapebench~idaho-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-idaho-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/scrapebench~idaho-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-idaho-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": {
          "licenseType": {
            "title": "Licence type",
            "type": "string",
            "description": "Which DOPL licences: general_contractor (General Contractor Registration, the default), electrical_contractor, limited_electrical_contractor, plumbing_contractor, plumbing_specialty_contractor, hvac_contractor, hvac_specialty_contractor, hvac_limited_heating_specialty_contractor — or a group: 'electrical', 'plumbing', 'hvac', 'trades' (all seven trade contractor types) or 'all'. DOPL's own type names work too. Contractor-level licences only: no journeymen or apprentices. Empty = General Contractor Registrations in an export, all eight types in a lookup."
          },
          "licenseTypes": {
            "title": "Licence types (batch)",
            "type": "array",
            "description": "Several licence types or groups in ONE run, e.g. electrical_contractor and plumbing_contractor. Combined with 'Licence type' if you fill both. An unrecognised value is dropped with a log line; if nothing you gave is recognised, the run returns a free row saying so instead of downloading anything.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "Licence status (export)",
            "enum": [
              "Active",
              "all",
              "Lapsed",
              "Expired",
              "Canceled",
              "Inactive",
              "Revoked",
              "Suspended",
              "Unlicensed",
              "Pending"
            ],
            "type": "string",
            "description": "Active (default), or 'all' for every status. Lookups always search every status.",
            "default": "Active"
          },
          "statuses": {
            "title": "Licence statuses (batch, export)",
            "type": "array",
            "description": "Several statuses in ONE export, e.g. Lapsed and Expired (a win-back list). When filled, it replaces 'Licence status' (so its Active default does not sneak in).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "county": {
            "title": "County (export)",
            "type": "string",
            "description": "An Idaho county on the licence's mailing address ('Ada', 'Kootenai County'). A value that is not one of Idaho's 44 counties is dropped and logged."
          },
          "counties": {
            "title": "Counties (batch, export)",
            "type": "array",
            "description": "Several Idaho counties in ONE export.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City (export)",
            "type": "string",
            "description": "Mailing-address city, exact match ignoring case and punctuation ('Boise', 'Coeur d'Alene')."
          },
          "cities": {
            "title": "Cities (batch, export)",
            "type": "array",
            "description": "Several cities in ONE export.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "idahoAddressesOnly": {
            "title": "Idaho mailing addresses only (export)",
            "type": "boolean",
            "description": "Out-of-state firms register in Idaho: 5,981 of the 25,863 active General Contractor Registrations (23%, 2026-10-14) have a mailing address outside Idaho, mostly Washington and Utah. Tick to drop them.",
            "default": false
          },
          "query": {
            "title": "License number or name (lookup)",
            "type": "string",
            "description": "A DOPL licence number ('RCE-52165', 'ELE-C-12345', '065933' — case, spaces and dashes are ignored), or at least 3 letters of a business, DBA or licensee name, matched anywhere in it. Leave empty to run an export instead."
          },
          "queries": {
            "title": "License numbers or names (batch, lookup)",
            "type": "array",
            "description": "Several lookups in ONE run, one per line. Combined with the field above if you fill both. The run log says how many licences each one matched.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "EXPORT: cap on licences for the WHOLE run — your spend control (25,863 active General Contractor Registrations on 2026-10-14; set 100000 to take everything that matches). LOOKUP: cap per name or number (default 50)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. DOPL's site answered plain requests in testing; enable a proxy only if a run comes back with a 'blocked' notice.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}