{
  "openapi": "3.0.1",
  "info": {
    "title": "NY Regulated Trades Licenses - Asbestos, Mold & Elevator",
    "description": "New York State Department of Labor regulated-trade licences in one schema: asbestos certificates (9 endorsements), mold individual and contractor licences, elevator individual, contractor and temporary-mechanic licences. Search by number, name, trade, type, status or date; profile or aggregate.",
    "version": "0.0",
    "x-build-id": "i6eLsK8vscu3chUqU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~ny-regulated-trades/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-ny-regulated-trades",
        "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/j0401~ny-regulated-trades/runs": {
      "post": {
        "operationId": "runs-sync-j0401-ny-regulated-trades",
        "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/j0401~ny-regulated-trades/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-ny-regulated-trades",
        "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": [
              "",
              "rows",
              "aggregate",
              "profile"
            ],
            "type": "string",
            "description": "rows = credentials (default). aggregate = one row per group with a count. profile = every row for one credential number.",
            "default": ""
          },
          "licenseNumber": {
            "title": "Licence / certificate number",
            "type": "string",
            "description": "Exact number, e.g. \"26-6I8NQ-SHAB\" (asbestos), \"26-63PYD-SHMO\" (mold), \"26-6A7DO-SHEL\" (elevator). mode=profile returns every endorsement on that number."
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Case-insensitive substring. Matches first/last name on the individual files and business/DBA name on the contractor files."
          },
          "trade": {
            "title": "Trade",
            "enum": [
              "",
              "asbestos",
              "mold",
              "elevator"
            ],
            "type": "string",
            "description": "Restrict to one trade. Empty = all three.",
            "default": ""
          },
          "holderType": {
            "title": "Holder type",
            "enum": [
              "",
              "individual",
              "contractor"
            ],
            "type": "string",
            "description": "individual = a named person's credential. contractor = a business licence.",
            "default": ""
          },
          "corpus": {
            "title": "Single corpus",
            "enum": [
              "",
              "asbestos-individual",
              "mold-individual",
              "mold-contractor",
              "elevator-individual",
              "elevator-contractor",
              "elevator-temporary"
            ],
            "type": "string",
            "description": "Restrict to one published file. Empty = all six.",
            "default": ""
          },
          "status": {
            "title": "Status",
            "enum": [
              "",
              "Active",
              "Expired"
            ],
            "type": "string",
            "description": "The published vocabulary on every file is Active / Expired. Expired credentials stay listed in the window files.",
            "default": ""
          },
          "licenseType": {
            "title": "Licence type (exact)",
            "type": "string",
            "description": "Exact published wording, e.g. \"Asbestos Endorsement - Handler\", \"Mold Assessor License (SH128)\", \"Elevator Mechanic License (SH132)\". 21 values across the corpora."
          },
          "licenseTypeContains": {
            "title": "Licence type contains",
            "type": "string",
            "description": "Case-insensitive substring on the licence type, e.g. \"Supervisor\"."
          },
          "city": {
            "title": "City contains",
            "type": "string",
            "description": "Contractor files only (mold and elevator contractors publish an address). Restricting by city narrows the run to those two corpora."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter code. Contractor files only."
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Exact 5-digit ZIP. Contractor files only. Accepts ZIP+4 (\"12345-6789\"); matched on the 5-digit core."
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "issuedTo": {
            "title": "Issued on or before",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "expiresBefore": {
            "title": "Expires on or before",
            "type": "string",
            "description": "YYYY-MM-DD. Renewal-pipeline work."
          },
          "expiresAfter": {
            "title": "Expires on or after",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "groupBy": {
            "title": "Group by (aggregate mode)",
            "enum": [
              "",
              "trade",
              "holderType",
              "corpus",
              "status",
              "licenseType",
              "state",
              "city",
              "issuedYear",
              "expirationYear"
            ],
            "type": "string",
            "description": "Only with mode=aggregate. Empty = licenseType. city/state cover the two contractor files only. Every group is returned; maxResults does not cap groups.",
            "default": ""
          },
          "metric": {
            "title": "Aggregate metric",
            "enum": [
              "",
              "count"
            ],
            "type": "string",
            "description": "Only with mode=aggregate. count is the only metric.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records",
            "type": "integer",
            "description": "Records delivered per run (default 200, maximum 5000). Billed per record delivered. Does not cap aggregate groups: mode=aggregate returns every group of the dimension.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}