{
  "openapi": "3.0.1",
  "info": {
    "title": "New Contractor License Leads: WA, NY, CT, CO, DE & MD",
    "description": "Daily feed of newly issued contractor and trade licenses from official state open-data portals (WA, NY, NYC, CT, CO, DE, Montgomery County MD): business name, license type, trade, phone where published, city, state, ZIP. Only-new mode for daily lead lists. $3 per 1,000 licenses.",
    "version": "0.0",
    "x-build-id": "6ResyGQ6Wg97YzbVR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/classier_linear~new-contractor-license-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-classier_linear-new-contractor-license-leads",
        "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/classier_linear~new-contractor-license-leads/runs": {
      "post": {
        "operationId": "runs-sync-classier_linear-new-contractor-license-leads",
        "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/classier_linear~new-contractor-license-leads/run-sync": {
      "post": {
        "operationId": "run-sync-classier_linear-new-contractor-license-leads",
        "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": {
          "sources": {
            "title": "Licensing agencies",
            "type": "array",
            "description": "Which licensing agencies to read. Leave empty for all seven.",
            "items": {
              "type": "string",
              "enum": [
                "wa",
                "ny",
                "nyc",
                "ct",
                "co",
                "de",
                "montgomery-md"
              ],
              "enumTitles": [
                "Washington L&I: construction, electrical and plumbing contractors",
                "New York State DOL: public work contractor registry",
                "New York City DCWP: home improvement contractors",
                "Connecticut DCP: home improvement, new home, major and trade contractors",
                "Colorado DORA: electrical and plumbing contractors and masters",
                "Delaware: master electricians, plumbers and HVACR",
                "Montgomery County, MD: building contractors"
              ]
            }
          },
          "daysBack": {
            "title": "Issued in the last N days",
            "minimum": 1,
            "maximum": 3660,
            "type": "integer",
            "description": "Licenses issued in the last N days, counting today. Ignored when Issued from is set. NYC refreshes about weekly, so use 30 days or more for NYC.",
            "default": 7
          },
          "dateFrom": {
            "title": "Issued from (optional)",
            "type": "string",
            "description": "Start date (YYYY-MM-DD) for an exact window, for example a past month."
          },
          "dateTo": {
            "title": "Issued to (optional)",
            "type": "string",
            "description": "End date (YYYY-MM-DD), inclusive. Defaults to today."
          },
          "types": {
            "title": "License type or trade contains",
            "type": "array",
            "description": "Keep licenses whose license type, trade/specialty or entity type contains one of these, for example Electrical, Plumbing, HVACR, Home Improvement, Roofing, New Home Construction.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep licenses whose name, DBA, license type, trade or principal contains any of these, for example roof, solar, electric, remodel.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop licenses whose name, DBA, license type, trade or principal contains any of these.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Business address states",
            "type": "array",
            "description": "Two-letter state codes of the licensee's address, for example WA, OR. Many licensees are based out of state. To choose the licensing state, use Licensing agencies.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Keep only licensees in these cities (exact city name, case-insensitive), for example Seattle, Tacoma.",
            "items": {
              "type": "string"
            }
          },
          "zipPrefixes": {
            "title": "ZIP code prefixes",
            "type": "array",
            "description": "Keep only licensees whose ZIP starts with one of these, for example 980 or 06830.",
            "items": {
              "type": "string"
            }
          },
          "requirePhone": {
            "title": "Only licenses with a phone number",
            "type": "boolean",
            "description": "Skip licenses without a phone. Phones are published by Washington, New York State, NYC and Montgomery County MD only.",
            "default": false
          },
          "maxItemsPerSource": {
            "title": "Maximum licenses per agency",
            "minimum": 1,
            "type": "integer",
            "description": "Stop each agency after this many licenses. You pay only for licenses exported.",
            "default": 1000
          },
          "onlyNew": {
            "title": "Only new (for scheduled daily runs)",
            "type": "boolean",
            "description": "Export only licenses this task has not exported before. Schedule the Actor daily with this on to get a clean feed and never pay twice for the same license.",
            "default": false
          },
          "stateKey": {
            "title": "Monitoring name",
            "type": "string",
            "description": "Separate only-new memory per list, for example wa-electricians. Letters, digits, - and _ only.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}