{
  "openapi": "3.0.1",
  "info": {
    "title": "GovData Labs — Multi-State Contractor License Verifier",
    "description": "GovData Labs verifies contractor license status, insurance, and bonds from official Washington, Oregon, New York, and Texas open data.",
    "version": "1.0",
    "x-build-id": "SUqi1Z5fseGE1jhBz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/govdatalabs~govdata-labs-contractor-license-verifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-govdatalabs-govdata-labs-contractor-license-verifier",
        "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/govdatalabs~govdata-labs-contractor-license-verifier/runs": {
      "post": {
        "operationId": "runs-sync-govdatalabs-govdata-labs-contractor-license-verifier",
        "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/govdatalabs~govdata-labs-contractor-license-verifier/run-sync": {
      "post": {
        "operationId": "run-sync-govdatalabs-govdata-labs-contractor-license-verifier",
        "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": {
          "licenseNumbers": {
            "title": "License numbers",
            "type": "array",
            "description": "License numbers to verify. Prefix a state code to search one state, for example WA:ECOSTSC758NN. Unprefixed numbers are searched in every state selected below.",
            "items": {
              "type": "string"
            }
          },
          "businessNames": {
            "title": "Business names",
            "type": "array",
            "description": "Business names to match. The same STATE:name prefix works. Matching is fuzzy after stripping legal suffixes such as LLC and Inc.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "Advanced lookups",
            "type": "array",
            "description": "Optional rows of { state, licenseNumber, businessName }. A row with both a number and a name is looked up by number."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "States to search when a value has no state prefix.",
            "items": {
              "type": "string",
              "enum": [
                "WA",
                "OR",
                "NY",
                "TX"
              ],
              "enumTitles": [
                "Washington",
                "Oregon",
                "New York",
                "Texas"
              ]
            },
            "default": [
              "WA",
              "OR",
              "NY",
              "TX"
            ]
          },
          "nameMatchThreshold": {
            "title": "Name match threshold",
            "minimum": 0.5,
            "maximum": 1,
            "type": "number",
            "description": "Minimum fuzzy-match score from 0.5 to 1. Exact license-number hits are always confidence 1.",
            "default": 0.84
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on output rows. Each row is billed as license-result. Default 100.",
            "default": 100
          },
          "onlyChangesSinceLastRun": {
            "title": "Only changes since last run",
            "type": "boolean",
            "description": "Compare this run with the snapshot in the named key-value store. The first run stores a baseline and bills only license-result. Later runs emit new or changed rows and also bill change-detected.",
            "default": false
          },
          "snapshotStoreName": {
            "title": "Snapshot store name",
            "type": "string",
            "description": "Named key-value store that holds the last license snapshot.",
            "default": "contractor-license-snapshots"
          },
          "includeAllTexasLicenseTypes": {
            "title": "Include all Texas license types",
            "type": "boolean",
            "description": "Texas TDLR publishes every profession in one dataset. Name search defaults to construction trades (electrical, air conditioning, elevator, appliance, water well). Turn this on to search barber, cosmetology, and the rest too. A lookup by license number always returns every profession that uses that number.",
            "default": false
          },
          "texasLicenseTypes": {
            "title": "Texas license types",
            "type": "array",
            "description": "Optional override for the Texas name-search allow list. Leave empty to use the built-in construction list.",
            "items": {
              "type": "string"
            }
          },
          "nameSearchLimit": {
            "title": "Name-search candidate cap",
            "minimum": 5,
            "maximum": 100,
            "type": "integer",
            "description": "How many SoQL candidates to rank per name query before fuzzy matching.",
            "default": 40
          },
          "requestSpacingMs": {
            "title": "Request spacing (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Minimum delay between requests to the same open-data host. Default 200. Lower it only with a Socrata app token.",
            "default": 200
          },
          "socrataAppToken": {
            "title": "Socrata app token",
            "type": "string",
            "description": "Optional Socrata app token. Anonymous access works for light runs. You can also set the SOCRATA_APP_TOKEN environment variable."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}