{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup: WA, OR, TX & NY Status & Insurance",
    "description": "Verify contractor licenses or list them by city, trade, new or expiring, in Washington, Oregon, Texas and New York, from each state's official open data. Status, expiration, first-issued date, bond and insurance on file, New York compliance flags.",
    "version": "0.1",
    "x-build-id": "7ueMZu3aMFd7WPAb2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yzy001~contractor-license-check/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yzy001-contractor-license-check",
        "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/yzy001~contractor-license-check/runs": {
      "post": {
        "operationId": "runs-sync-yzy001-contractor-license-check",
        "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/yzy001~contractor-license-check/run-sync": {
      "post": {
        "operationId": "run-sync-yzy001-contractor-license-check",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which states to read. Each comes from that state's official open-data portal.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "TX",
                "NY"
              ],
              "enumTitles": [
                "Washington (L&I)",
                "Oregon (CCB)",
                "Texas (TDLR)",
                "New York (public work registry)"
              ]
            },
            "default": [
              "WA",
              "OR",
              "TX",
              "NY"
            ]
          },
          "licenseNumbers": {
            "title": "License numbers to verify",
            "type": "array",
            "description": "Optional. License or registration numbers as the state prints them, optionally with the state first, for example WA:ECOSTSC758NN, TX:36159, OR:1441. A number without a state is looked up in every selected state. Expired and suspended licenses are returned too. Up to 500 numbers and names together.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "businessNames": {
            "title": "Business names to look up",
            "type": "array",
            "description": "Optional. Every license whose business name contains this text (3 characters or more).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Trades",
            "type": "array",
            "description": "Keep these categories. General contractors, specialty contractors (roofing, painting, flooring and so on), electrical, plumbing, HVAC, elevator, other. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL",
                "SPECIALTY",
                "ELECTRICAL",
                "PLUMBING",
                "HVAC",
                "ELEVATOR",
                "OTHER"
              ],
              "enumTitles": [
                "General contractor",
                "Specialty contractor",
                "Electrical",
                "Plumbing",
                "HVAC",
                "Elevator",
                "Other (developers, NY public work registry)"
              ]
            },
            "default": []
          },
          "statuses": {
            "title": "Statuses",
            "type": "array",
            "description": "Keep these license statuses when listing. Lookups always return every status.",
            "items": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "EXPIRED",
                "SUSPENDED",
                "INACTIVE",
                "SUPERSEDED",
                "REVOKED",
                "OTHER"
              ]
            },
            "default": [
              "ACTIVE"
            ]
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Optional. Keep licenses whose business address is in one of these cities (exact name, any case). The city name is matched in every selected state.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "Optional. Keep licenses whose business ZIP starts with one of these, for example 981 or 97209.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "firstIssuedWithinDays": {
            "title": "Newly licensed within N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Only licenses first issued in the last N days (1-365), newest first. Washington and Oregon only: Texas and New York do not publish a first-issued date."
          },
          "expiringWithinDays": {
            "title": "Expiring within N days",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Optional. Only licenses that expire in the next N days (1-365), soonest first."
          },
          "includeIndividualLicenses": {
            "title": "Include individual trade licenses",
            "type": "boolean",
            "description": "Texas journeyman, apprentice and technician licenses, and Oregon home inspector and locksmith certifications. Off = contractor licenses only.",
            "default": false
          },
          "includeBondInsurance": {
            "title": "Add Washington bond and insurance",
            "type": "boolean",
            "description": "Join Washington's separate bond and insurance datasets (current policies only). Oregon's bond and insurance are always included.",
            "default": true
          },
          "allowPartial": {
            "title": "Allow partial results",
            "type": "boolean",
            "description": "On by default: if one state's portal cannot be read, the others are still returned and the status message names it. Turn off to make any failed state fail the run.",
            "default": true
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper bound on rows returned. Listing more than 5,000 needs at least one filter.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}