{
  "openapi": "3.0.1",
  "info": {
    "title": "License Verification & Expiry Monitor: Bulk US License Lookup",
    "description": "Re-verify a whole roster of contractors, nurses, agents or providers against official state registries, then get only what changed: expired, suspended, revoked, lapsed bond, about to renew. Official open data, no API key, no portal scraping.",
    "version": "0.1",
    "x-build-id": "0zKbogEESWWCZDm2H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fayoussef~license-roster-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fayoussef-license-roster-monitor",
        "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/fayoussef~license-roster-monitor/runs": {
      "post": {
        "operationId": "runs-sync-fayoussef-license-roster-monitor",
        "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/fayoussef~license-roster-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-fayoussef-license-roster-monitor",
        "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": [
          "roster"
        ],
        "properties": {
          "roster": {
            "title": "Licensees to check",
            "type": "array",
            "description": "One licensee per line. Write the state code, then the license number, then optionally the name you have on file: WA | ECOSTSC758NN | Eco Star C G Construction LLC. The name is what lets the Actor tell you when a license number belongs to somebody else. A line with no state code is looked up in every registry selected below, which works but costs more requests. You can also search by name instead of by number.",
            "default": [
              "WA | ECOSTSC758NN | Eco Star C G Construction LLC",
              "WA | 1AQUAAM831PC",
              "OR | 240438",
              "TX | 3365",
              "CO | 711991",
              "DE | RS-0037350",
              "US | 1467560003"
            ],
            "items": {
              "type": "string"
            }
          },
          "registries": {
            "title": "Registries to search",
            "type": "array",
            "description": "Which official registries to look in. Leave all of them on and each line is matched wherever its state code points. Every one of these is a government open-data source and needs no account or key.",
            "items": {
              "type": "string",
              "enum": [
                "wa-contractor",
                "or-ccb",
                "tx-tdlr",
                "co-professional",
                "co-real-estate",
                "de-professional",
                "npi"
              ],
              "enumTitles": [
                "Washington: L&I contractor licenses",
                "Oregon: CCB construction contractors (with bond and insurance)",
                "Texas: TDLR licenses, all programs",
                "Colorado: DORA professional and occupational licenses",
                "Colorado: licensed real estate professionals",
                "Delaware: professional and occupational licensing",
                "Nationwide: NPPES healthcare provider registry (NPI)"
              ]
            },
            "default": [
              "wa-contractor",
              "or-ccb",
              "tx-tdlr",
              "co-professional",
              "co-real-estate",
              "de-professional",
              "npi"
            ]
          },
          "searchBy": {
            "title": "Match each line by",
            "enum": [
              "auto",
              "licenseNumber",
              "name"
            ],
            "type": "string",
            "description": "Leave this on automatic unless your roster is unusual. Automatic treats a mostly numeric line as a license number and anything else as a name, then scores the match either way, so a wrong guess costs one extra lookup and never a wrong answer.",
            "default": "auto"
          },
          "expiringWithinDays": {
            "title": "Warn this many days before expiry",
            "minimum": 0,
            "maximum": 730,
            "type": "integer",
            "description": "How much notice you want on a license that is still valid but about to lapse. Set it to the length of your renewal process: 60 days is enough to chase a contractor twice.",
            "default": 60
          },
          "alertsOnly": {
            "title": "Only return licensees that need attention",
            "type": "boolean",
            "description": "Leave this off to get your whole roster back with a verdict on each line, which is what an audit file needs. Turn it on to get only the expired, lapsing, revoked, suspended and not-found lines, which is what a weekly review needs.",
            "default": false
          },
          "onlyChangesSinceLastRun": {
            "title": "Only return what changed since the last run",
            "type": "boolean",
            "description": "The point of running this on a schedule. Turn it on and a quiet month produces an empty dataset instead of the same roster again. The first run always returns everything, because nothing has changed yet.",
            "default": false
          },
          "trackChanges": {
            "title": "Remember this roster between runs",
            "type": "boolean",
            "description": "Keeps a small fingerprint of each licensee's status and expiry so the next run can tell you what moved. Turn it off for a one-off check that should leave nothing behind.",
            "default": true
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "The name of the history this run compares against. Use a different name per roster, for example \"electricians\" and \"nurses\", and each keeps its own baseline. Changing this name starts a fresh history, so the next run reports everything as new.",
            "default": "default"
          },
          "maxRosterEntries": {
            "title": "Maximum licensees per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "A safety cap on how much of the roster one run will check. Lines beyond it are skipped and the run says so.",
            "default": 500
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Optional. Post the licensees that need attention to a Slack channel. Nothing is sent when nothing needs attention, so a quiet channel means a clean roster."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Optional. Post the same digest to a Discord channel."
          },
          "telegramChatId": {
            "title": "Telegram chat ID",
            "type": "string",
            "description": "Optional. The chat to send the digest to. Fill this in together with the bot token below."
          },
          "telegramBotToken": {
            "title": "Telegram bot token",
            "type": "string",
            "description": "Optional. Your own bot's token, used only to deliver the digest to the chat above."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Optional. Receive the alerts as JSON, for Zapier, Make, n8n or your own endpoint."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}