{
  "openapi": "3.0.1",
  "info": {
    "title": "US Business Licenses - 12 Local Registers",
    "description": "Business and occupational licences from twelve local registers — Chicago, Texas permits, Philadelphia, DC, Delaware, New Orleans, Cincinnati, Mesa, Norfolk, Berkeley, NYC DCWP and California counties. One schema; filter by name, licence, type, status, city or ZIP; monitor new licences.",
    "version": "0.0",
    "x-build-id": "9biTXgCkAdVNgxXe6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~us-business-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-us-business-licenses",
        "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~us-business-licenses/runs": {
      "post": {
        "operationId": "runs-sync-j0401-us-business-licenses",
        "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~us-business-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-us-business-licenses",
        "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": {
          "jurisdiction": {
            "title": "Jurisdiction",
            "enum": [
              "chicago",
              "tx",
              "philly",
              "dc",
              "de",
              "nola",
              "cincinnati",
              "mesa",
              "norfolk",
              "berkeley",
              "nyc",
              "ca-county"
            ],
            "type": "string",
            "description": "chicago (default) / tx = Texas sales-tax permits / philly / dc / de / nola / cincinnati / mesa / norfolk / berkeley / nyc = NYC DCWP (choose a corpus with sub) / ca-county = Sacramento/Sonoma (choose with sub).",
            "default": "chicago"
          },
          "sub": {
            "title": "Sub-register",
            "enum": [
              "",
              "licenses",
              "applications",
              "inspections",
              "violations",
              "complaints",
              "sac-fbn",
              "sac-bl",
              "sonoma"
            ],
            "type": "string",
            "description": "nyc: licenses (default) / applications / inspections / violations / complaints. ca-county: sac-fbn (default) / sac-bl / sonoma. Must be blank for every other jurisdiction.",
            "default": ""
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate",
              "monitor"
            ],
            "type": "string",
            "description": "rows = matching records. aggregate = one count row per group. monitor = only records issued after your last run (per-user watermark).",
            "default": "rows"
          },
          "name": {
            "title": "Business or owner name",
            "type": "string",
            "description": "Substring match on the business name (owner name on Norfolk / ca-county where available)."
          },
          "licenseNumber": {
            "title": "Licence number",
            "type": "string",
            "description": "Exact licence / record number. Not available for NYC, ca-county or Norfolk (no such id in those feeds)."
          },
          "licenseType": {
            "title": "Licence type",
            "type": "string",
            "description": "The local licence label (substring). tx, norfolk and berkeley publish no licence type and reject it; for ca-county only sac-bl supports it (the licence activity)."
          },
          "status": {
            "title": "Status",
            "type": "string",
            "description": "The register's own status word (exact), e.g. AAI, Active, Expired, Filed. tx, de, nola, cincinnati, norfolk and berkeley publish no status and reject this filter - see the README."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Substring match. Available for chicago, tx, de, nola, cincinnati. Not for nyc/ca-county."
          },
          "zip": {
            "title": "ZIP",
            "type": "string",
            "description": "Exact ZIP (NYC: the licence address ZIP; ca-county: prefix match). DC, Mesa and Norfolk publish no ZIP and reject this filter."
          },
          "owner": {
            "title": "Owner name",
            "type": "string",
            "description": "Owner / principal name (Norfolk, Philadelphia, DC, New Orleans; ca-county sac-fbn and sonoma). Not available for NYC or ca-county sac-bl."
          },
          "issuedFrom": {
            "title": "Issued from",
            "type": "string",
            "description": "ISO date. Only records issued on or after this date. Chicago uses date_issued; NYC supports it on the licenses corpus only. mode=monitor sets it from your watermark."
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "licenseType",
              "status",
              "city",
              "zip",
              "licenseCategory"
            ],
            "type": "string",
            "description": "mode=aggregate only (blank = licenseType). licenseCategory exists on NYC and ca-county/sac-bl only; other registers reject it.",
            "default": ""
          },
          "sinceLastRun": {
            "title": "Since my last run",
            "type": "boolean",
            "description": "Owner runs only: read and advance the monitor watermark. User runs in monitor mode always do.",
            "default": false
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on records delivered (0 = default 50; up to 5,000 per run). In aggregate mode it caps the number of group rows. Each delivered record is metered individually.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}