{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Lookup: Multi-State Official Data",
    "description": "Search, verify and monitor contractor and trade licenses from official state open data: WA, TX, CT, CO, OR, DE. Status, expiry, trade, address, business phone, OR bonds and insurance. New-license and expiring-soon lists. $2 per 1,000 records.",
    "version": "0.1",
    "x-build-id": "T6uQho3ZSu5V7CNsT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-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/transparent_meteorite~contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-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/transparent_meteorite~contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-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": [
              "search",
              "verify",
              "new_licenses"
            ],
            "type": "string",
            "description": "search: find licenses by trade, location, name or number. verify: one output row per item in the verify list, with found / not found. new_licenses: licenses issued or registered in the last N days (states that publish an issue date).",
            "default": "search"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which state datasets to query. Empty = all 6 states. Oregon has two sources (CCB construction contractors and BCD electrical, plumbing, boiler and elevator licenses).",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "TX",
                "CT",
                "CO",
                "OR",
                "DE"
              ],
              "enumTitles": [
                "Washington",
                "Texas",
                "Connecticut",
                "Colorado",
                "Oregon",
                "Delaware"
              ]
            }
          },
          "trade": {
            "title": "Trade",
            "enum": [
              "general",
              "home_improvement",
              "electrical",
              "plumbing",
              "hvac",
              "roofing",
              "painting",
              "concrete_masonry",
              "carpentry_drywall",
              "flooring_tile",
              "landscaping",
              "handyman",
              "siding_gutters",
              "fencing",
              "excavation_demolition",
              "fire_protection",
              "elevator",
              "well_pump",
              "solar",
              "sign",
              "asbestos_lead",
              "pool_spa",
              "glass_glazing",
              "sheet_metal",
              "boiler",
              "appliance",
              "insulation",
              "other"
            ],
            "type": "string",
            "description": "Normalized trade. States whose license types cannot express this trade are skipped (listed in the OUTPUT summary). Leave empty for all trades."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Exact city name as published (case-insensitive), for example Seattle or Austin."
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "ZIP or ZIP prefix, for example 98101 or 981."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "County name without the word County, for example Harris. Only Texas and Oregon publish county; other states are skipped when this is set."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum license records to return across all states (split fairly across states first, then topped up). Ignored in verify mode, which returns one row per input.",
            "default": 100
          },
          "businessName": {
            "title": "Business name keywords",
            "type": "array",
            "description": "One keyword per line. A record matches if any keyword matches; within a keyword every word must appear in the business or DBA name. Example: smith roofing.",
            "items": {
              "type": "string"
            }
          },
          "personName": {
            "title": "Person name keywords",
            "type": "array",
            "description": "One per line. Matches licensee or principal / responsible person names (word order does not matter). Example: john smith.",
            "items": {
              "type": "string"
            }
          },
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "Exact license number, for example 4WALLWD781M5 (WA), HIC.0702746 (CT), 100836 (CO)."
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Keep only licenses whose status is active AND whose expiration date has not passed.",
            "default": true
          },
          "contractorsOnly": {
            "title": "Contractor licenses only",
            "type": "boolean",
            "description": "Keep only business / contractor-level licenses and drop individual journeyman, apprentice and technician licenses.",
            "default": false
          },
          "daysBack": {
            "title": "Days back (new_licenses mode)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "new_licenses mode: licenses issued in the last N days.",
            "default": 30
          },
          "expiringWithinDays": {
            "title": "Expiring-soon window (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "isExpiringSoon is true when the license expires within this many days.",
            "default": 60
          },
          "onlyExpiringSoon": {
            "title": "Only licenses expiring soon",
            "type": "boolean",
            "description": "Keep only licenses that expire within the window above. Useful for renewal, bonding and insurance outreach.",
            "default": false
          },
          "verifyList": {
            "title": "Verify list",
            "type": "array",
            "description": "verify mode: one license number or business name per line (max 1000). Prefix with a state to narrow it, for example TX:100733 or WA:4WALLWD781M5.",
            "items": {
              "type": "string"
            }
          },
          "verifyBy": {
            "title": "Match verify items by",
            "enum": [
              "auto",
              "licenseNumber",
              "name"
            ],
            "type": "string",
            "description": "Auto treats items with digits and no spaces as license numbers, everything else as names (exact name first, then contains).",
            "default": "auto"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}