{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup",
    "description": "Look up contractor licenses from state boards, or list licensed contractors by trade and city. Covers California, Texas, Washington, Oregon, and Louisiana. Get license number, status, expiration, classifications, owners, address, and phone, read from each board's own register. No API key.",
    "version": "0.1",
    "x-build-id": "7as5euaJnqWOUb4Bd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mambalabs~contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mambalabs-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/mambalabs~contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-mambalabs-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/mambalabs~contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-mambalabs-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": [
              "list",
              "lookup"
            ],
            "type": "string",
            "description": "List needs States and Trades. Lookup needs Lookups.",
            "default": "list"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two letter state codes: CA, TX, WA, OR, LA. In lookup mode, used for lines that name no state.",
            "items": {
              "type": "string"
            }
          },
          "trades": {
            "title": "Trades",
            "type": "array",
            "description": "List mode. Trade words such as plumbing, electrical, hvac, roofing, general, solar, landscaping, painting, concrete, pool, or a classification name the board uses. Each trade is searched in every state.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "List mode. Keep contractors in these cities. Each city is searched separately.",
            "items": {
              "type": "string"
            }
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "List mode. Keep contractors in this county (California, Texas, and Oregon record county; Washington and Louisiana do not)."
          },
          "business_name": {
            "title": "Business name filter",
            "type": "string",
            "description": "List mode: keep only names that contain this text. Lookup mode: one more business name to look up."
          },
          "lookups": {
            "title": "Lookups",
            "type": "array",
            "description": "Lookup mode. One per line: a state code, a pipe, then a license number or a business name, for example WA | 04CONCL862CR or LA | Acadian Builders. A value with digits and no spaces is read as a license number.",
            "items": {
              "type": "string"
            }
          },
          "license_number": {
            "title": "License number",
            "type": "string",
            "description": "Lookup mode. One more license number, searched in the States above."
          },
          "active_only": {
            "title": "Active licenses only",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Keep only licenses the board lists as active or clear and not expired.",
            "default": "true"
          },
          "include_owners": {
            "title": "Include owners",
            "enum": [
              "true",
              "false"
            ],
            "type": "string",
            "description": "Washington: read the current principals of each license (one more request per 100 licenses). Other states return the owners or qualifiers the board lists anyway.",
            "default": "true"
          },
          "max_results": {
            "title": "Max results per search",
            "type": "string",
            "description": "Stop each search after this many license rows, up to 5000. Default 100 in list mode and 10 in lookup mode."
          },
          "max_charge_usd": {
            "title": "Max charge per run (USD)",
            "type": "string",
            "description": "Stop before a row would push this run past this amount. Empty: no limit beyond the one you set in Apify."
          },
          "proxy_mode": {
            "title": "Proxy",
            "enum": [
              "auto",
              "residential"
            ],
            "type": "string",
            "description": "Auto sends requests through the Apify proxy pool and moves a request to residential addresses only when a board refuses it. This is a reliability choice; under pay per event the proxy is not billed to you.",
            "default": "auto"
          },
          "source_tag": {
            "title": "Source tag",
            "type": "string",
            "description": "Internal attribution tag for published tasks. Leave empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}