{
  "openapi": "3.0.1",
  "info": {
    "title": "Contractor License Search and New License Leads, 5 States",
    "description": "Search, verify and monitor contractor licenses in California, Texas, Washington, Oregon and Virginia from official state open data. One clean schema, weekly new-license lead feed, trade and status filters.",
    "version": "1.0",
    "x-build-id": "V3MXXXdVheIzykYiF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dynamic_jingle~multi-state-contractor-license-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dynamic_jingle-multi-state-contractor-license-search",
        "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/dynamic_jingle~multi-state-contractor-license-search/runs": {
      "post": {
        "operationId": "runs-sync-dynamic_jingle-multi-state-contractor-license-search",
        "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/dynamic_jingle~multi-state-contractor-license-search/run-sync": {
      "post": {
        "operationId": "run-sync-dynamic_jingle-multi-state-contractor-license-search",
        "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",
        "required": [
          "states"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "lookup",
              "newLicenses"
            ],
            "type": "string",
            "description": "What to return. Use \"lookup\" to search, verify or export every license matching your filters, for example all active roofers in California. Use \"newLicenses\" to get only licenses that are new since your last run, for example a weekly feed of newly licensed electricians. Schedule the monitor weekly for a lead list with no duplicates.",
            "default": "lookup"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter codes of the states to search. Supported: CA, TX, WA, OR, VA. Example: [\"CA\", \"WA\"] to search only California and Washington.",
            "items": {
              "type": "string",
              "enum": [
                "CA",
                "TX",
                "WA",
                "OR",
                "VA"
              ],
              "enumTitles": [
                "California",
                "Texas",
                "Washington",
                "Oregon",
                "Virginia"
              ]
            },
            "default": [
              "CA",
              "TX",
              "WA",
              "OR",
              "VA"
            ]
          },
          "tradeKeywords": {
            "title": "Trade or license type keywords",
            "type": "array",
            "description": "Return licenses whose type, class code or trade contains any of these words (case-insensitive). Examples: \"roofing\", \"electrical\", \"plumbing\", \"hvac\", \"air conditioning\", \"general\", \"solar\", or state codes like \"C39\" (CA roofing), \"RGC\" (OR residential general), \"ROC\" (VA roofing). Leave empty for all trades.",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "title": "Business or person name contains",
            "type": "string",
            "description": "Return only licenses whose business name, licensee name or DBA contains this text (case-insensitive). Example: \"ROOFING\" or \"SMITH ELECTRIC\". Lookup mode only."
          },
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "Verify one specific license by its number. Pair it with the state. Examples: \"1000013\" (CA), \"261748\" (OR), \"ECOSTSC758NN\" (WA). Lookup mode only."
          },
          "status": {
            "title": "Status",
            "enum": [
              "any",
              "active",
              "inactive",
              "expired",
              "suspended"
            ],
            "type": "string",
            "description": "Filter by normalized license status. Example: \"active\" for sales lead lists, \"suspended\" to find contractors with bond or insurance problems, \"any\" to return everything.",
            "default": "any"
          },
          "issuedAfter": {
            "title": "Issued on or after",
            "type": "string",
            "description": "Only return licenses issued on or after this date, in YYYY-MM-DD format. Example: \"2026-09-01\" for licenses issued since September 1. Texas does not publish issue dates, so Texas records are skipped when this is set in lookup mode. In monitor mode the first run defaults to the last 7 days."
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results across all states. Use it to control cost. Example: 100 for a quick sample, 0 for no limit.",
            "default": 1000
          },
          "maxResultsPerState": {
            "title": "Max results per state",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of results from each state, so one large state does not use the whole budget. Example: 200. Use 0 for no per-state limit.",
            "default": 0
          },
          "monitorId": {
            "title": "Monitor ID",
            "type": "string",
            "description": "Name for the monitor's memory of licenses already seen. Use a different ID for each saved search you schedule. Example: \"ca-roofers-weekly\" or \"wa-or-electricians\". Only used in newLicenses mode.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}