{
  "openapi": "3.0.1",
  "info": {
    "title": "US Contractor License Lookup & List Scraper (State Boards)",
    "description": "Verify contractor licenses or export whole-state contractor lists across 36 US jurisdictions in one run - enumerated verdicts, the board cited on every row.",
    "version": "0.0",
    "x-build-id": "SY2i3DkruxX862ym3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~us-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-us-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~us-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-us-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~us-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-us-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": [
              "verify",
              "export"
            ],
            "type": "string",
            "description": "lookup / verify: mode 'verify' - give company names or licence numbers and get one verdict per contractor per state (active, expired, revoked, suspended, inactive, not_found...).\nexport: mode 'export' - download every licensed contractor in each state you pick, or a slice of it via 'stateFilters'.\nEach state is answered by that state's own scrapebench actor, run under your account.",
            "default": "verify"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "2-letter codes. Verify covers AL, AR, AZ, CA, CO, CT, DC, DE, FL, IA, ID, LA, MA, MD, MI, MN, MS, NC, ND, NE, NJ, NM, NV, NY, OH, OR, PA, RI, SC, TN, TX, VA, WA, WV. Export covers AL, AR, AZ, CA, CO, CT, DC, DE, FL, IA, ID, IL, LA, MD, MN, MS, ND, NE, NJ, NM, NV, NY, OH, OR, PA, RI, SC, TN, TX, UT, VA, WA, WV. In verify mode every name and number is checked in every state listed. A state outside the list returns 'unverifiable_state_not_covered' - the check was NOT performed, which is not a finding that anybody is unlicensed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "state": {
            "title": "State (single, 2-letter code)",
            "type": "string",
            "description": "Single-state form of 'states', e.g. 'TX'. Kept for saved tasks and agents; both may be set."
          },
          "companies": {
            "title": "Company names (verify)",
            "type": "array",
            "description": "Business or licensee names to verify. Matching is EXACT on the full name once case, punctuation and company suffixes (LLC, Inc, Corp) are ignored - 'ABC Roofing' will NOT match 'ABC Roofing & Siding', by design. A name matching more than one licence returns 'check_failed' rather than a guess. Use licence numbers whenever you have them.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "licenseNumbers": {
            "title": "License numbers (verify)",
            "type": "array",
            "description": "Licence numbers to verify - the most reliable input. Punctuation and leading zeros are ignored. DE, IA, MS, OH and VA cannot be searched by number (their boards only take names) and return 'check_failed' asking for the name.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "company": {
            "title": "Company name (single)",
            "type": "string",
            "description": "Single-value form of 'companies'."
          },
          "licenseNumber": {
            "title": "License number (single)",
            "type": "string",
            "description": "Single-value form of 'licenseNumbers'."
          },
          "stateFilters": {
            "title": "Export filters per state",
            "type": "object",
            "description": "Export mode only. Keyed by state code; each value is passed verbatim as that state's actor input, so use that actor's own field names (linked in the README), e.g. {\"TX\": {\"county\": \"Travis\"}, \"CA\": {\"licenseClass\": \"C-10\", \"county\": \"Sacramento\"}}. A state with no entry exports with no filter.",
            "default": {}
          },
          "maxResults": {
            "title": "Max rows per state (export)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Export mode only: the most rows delivered per state. Billing is per row delivered, so this is also your spend limit per state.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}