{
  "openapi": "3.0.1",
  "info": {
    "title": "US Professional License Scraper - Licensed Pro Leads",
    "description": "Scrape US professional & occupational licenses from official state boards (CO, CT, DE, TX): name, profession, license number, status, issue & expiration dates, location. Every regulated profession — nurses, contractors, real estate, CPAs & more. Filters + monitoring, no browser.",
    "version": "0.1",
    "x-build-id": "ANvGvoqIQFKgDG11d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~us-professional-license-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-us-professional-license-scraper",
        "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/scrapesage~us-professional-license-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-us-professional-license-scraper",
        "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/scrapesage~us-professional-license-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-us-professional-license-scraper",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "Which state licensing datasets to query. Each is an official state open-data portal: <b>CT</b> (2.6M credentials, full street address), <b>CO</b> (1.6M), <b>TX</b> (962K TDLR trades), <b>DE</b> (350K, incl. disciplinary flag). Leave empty for all four.",
            "items": {
              "type": "string",
              "enum": [
                "CO",
                "CT",
                "DE",
                "TX"
              ],
              "enumTitles": [
                "Colorado (DORA)",
                "Connecticut (DCP)",
                "Delaware (DPR)",
                "Texas (TDLR)"
              ]
            },
            "default": [
              "CO",
              "CT",
              "DE",
              "TX"
            ]
          },
          "professionKeywords": {
            "title": "Profession / license keywords",
            "type": "array",
            "description": "Filter by profession — keywords matched (case-insensitive, any match) against each state's profession / license-type field. e.g. <code>nurse</code>, <code>electric</code>, <code>real estate</code>, <code>cosmetolog</code>, <code>physician</code>, <code>pharmac</code>, <code>engineer</code>, <code>dentist</code>, <code>veterinar</code>, <code>counselor</code>, <code>cpa</code>. Leave empty for ALL professions. <i>(Colorado uses license-type codes — common professions are mapped automatically; you can also pass a raw CO code like <code>RN</code> or <code>DEN</code>.)</i>",
            "items": {
              "type": "string"
            }
          },
          "statusActiveOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Only return licenses with an active/current status (for TX, which has no status field, this keeps licenses whose expiration date has not passed). Turn off to include expired, lapsed, and historical records.",
            "default": true
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by licensee city (case-insensitive, exact city name), e.g. <code>Denver</code>, <code>Hartford</code>. Applies to CO, CT and DE (Texas has no city field).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by ZIP — full ZIP (<code>80202</code>) or a prefix (<code>802</code> matches all 802xx). Applies to CO, CT and DE.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties (Texas)",
            "type": "array",
            "description": "Filter by county — applies to Texas TDLR (business county), e.g. <code>Harris</code>, <code>Travis</code>, <code>Dallas</code>.",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Name contains",
            "type": "string",
            "description": "Only return licensees whose name (person or business) contains this text (case-insensitive)."
          },
          "issuedAfter": {
            "title": "Issued on/after (optional)",
            "type": "string",
            "description": "Only licenses first issued on or after this date, <code>YYYY-MM-DD</code> — great for fresh leads (newly licensed professionals). Applies to CO, CT and DE (Texas has no issue date and is skipped when this is set)."
          },
          "expiringBefore": {
            "title": "Expiring before (optional)",
            "type": "string",
            "description": "Only licenses expiring before this date, <code>YYYY-MM-DD</code> — perfect for renewal-timing outreach (insurance, CE providers, associations)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of license records to return in this run (across all selected states).",
            "default": 1000
          },
          "maxResultsPerState": {
            "title": "Max results per state (optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Cap how many records are pulled from each state before the global limit and sorting are applied. Leave blank to use the same value as Max results."
          },
          "sortNewestFirst": {
            "title": "Newest licenses first",
            "type": "boolean",
            "description": "Return the most recently issued licenses first (best for fresh leads). Texas has no issue date, so its records are returned in license-number order.",
            "default": true
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip duplicate license records within this run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new licenses",
            "type": "boolean",
            "description": "Remember which licenses were already returned (in a named key-value store) and emit ONLY licenses that are new since the last run — each tagged <code>monitorEvent: \"new\"</code>. A renewal (new expiration date) also surfaces as new. State portals refresh regularly; run on a Schedule to capture newly-licensed professionals as fresh leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what's new).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state/profession) so different monitors don't share state.",
            "default": "default"
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional Socrata app token for higher rate limits on very large runs. Not required — leave blank for normal use. Get one free at any state open-data portal."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. State open data is fetched directly and needs no proxy — leave this off for the fastest runs. Enable Apify Proxy only if your network requires 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}