{
  "openapi": "3.0.1",
  "info": {
    "title": "New Jersey Contractor License Lookup & Export (DCA)",
    "description": "Look up any New Jersey DCA contractor licence by number or name, or export home improvement, electrical, master plumber and master HVACR licences statewide, with street address and owner for home improvement contractors.",
    "version": "0.0",
    "x-build-id": "Z5X2asixcbjnRNaSi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapebench~new-jersey-contractor-license-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapebench-new-jersey-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~new-jersey-contractor-license-lookup/runs": {
      "post": {
        "operationId": "runs-sync-scrapebench-new-jersey-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~new-jersey-contractor-license-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-scrapebench-new-jersey-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": {
          "query": {
            "title": "License number or name",
            "type": "string",
            "description": "A full DCA licence number ('13VH13621300'), a business name or part of one ('Vista Fencing' — matched anywhere in the name), or a person's name written FIRST then LAST for master plumbers and HVACR contractors ('John Smith'). Leave empty to run an export instead."
          },
          "queries": {
            "title": "License numbers or names (batch)",
            "type": "array",
            "description": "Several lookups in ONE run, one per line. Combined with the field above if you fill both.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trade": {
            "title": "Trade (export)",
            "enum": [
              "home_improvement",
              "electrical",
              "plumbing",
              "hvacr"
            ],
            "type": "string",
            "description": "home_improvement (Home Improvement Contractor registrations, 13VH), electrical (Electrical Business Permits, 34EB), plumbing (Master Plumber licences, 36BI) or hvacr (Master HVACR licences, 19HC). Leave empty for all four."
          },
          "trades": {
            "title": "Trades (batch, export)",
            "type": "array",
            "description": "Several trades in ONE export, e.g. electrical and plumbing.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "status": {
            "title": "License status (export)",
            "type": "string",
            "description": "Active by default. DCA also lists Expired, Closed, Suspended, Revoked and others; type 'all' to export every status."
          },
          "statuses": {
            "title": "License statuses (batch, export)",
            "type": "array",
            "description": "Several statuses in ONE export, e.g. Active and Expired.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City (export)",
            "type": "string",
            "description": "Address city, exact match ignoring case and punctuation, e.g. 'Newark'. DCA lists the licensee's own address, not where they work."
          },
          "cities": {
            "title": "Cities (batch, export)",
            "type": "array",
            "description": "Several cities in ONE export. Up to 3 cities are searched one by one; with more, the actor lists the whole trade and keeps your cities (about 7 minutes for every trade).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "newJerseyAddressesOnly": {
            "title": "New Jersey addresses only (export)",
            "type": "boolean",
            "description": "Out-of-state firms register too. Tick to drop licensees whose address is outside New Jersey.",
            "default": false
          },
          "includeDetails": {
            "title": "Add address, owner and dates",
            "type": "boolean",
            "description": "Fetch each licence's DCA detail page: street address, ZIP, owner name and DBA (home improvement and electrical businesses) and issue/expiry dates (all trades). Adds time, not cost. enrichment_status says per row whether it landed.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "EXPORT: cap on licences for the WHOLE run — your spend control (set 100000 to take everything that matches). LOOKUP: cap per name or number (default 50)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: DCA answers Apify's own IPs directly and fastest. Set a proxy only if a run reports the source refused it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}