{
  "openapi": "3.0.1",
  "info": {
    "title": "Chicago Business License Search (City of Chicago open data)",
    "description": "Search City of Chicago business licences (BACP): new licences, restaurants, taverns, liquor, tobacco, auto repair, childcare and more, by licence type, activity, ward, community area, ZIP or date. Businesses only; no personal names.",
    "version": "0.1",
    "x-build-id": "ymQpMxd73TZnIcICT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pennant~chicago-business-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pennant-chicago-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/pennant~chicago-business-licenses/runs": {
      "post": {
        "operationId": "runs-sync-pennant-chicago-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/pennant~chicago-business-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-pennant-chicago-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": {
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "cancelledOrRevoked",
              "all"
            ],
            "type": "string",
            "description": "Active = status AAI (issued) and expiration date today or later (Chicago time). 'All records' includes expired terms; one result per licence number either way.",
            "default": "active"
          },
          "licenseDescriptions": {
            "title": "Licence types",
            "type": "array",
            "description": "Exact licence type names, case-insensitive, e.g. Retail Food Establishment, Tavern, Package Goods, Tobacco, Motor Vehicle Services License, Children's Services Facility License, Limited Business License. Empty = all.",
            "items": {
              "type": "string"
            }
          },
          "licenseCodes": {
            "title": "Licence codes",
            "type": "array",
            "description": "Numeric licence type codes, e.g. 1010 (Limited Business License), 1006 (Retail Food Establishment).",
            "items": {
              "type": "string"
            }
          },
          "businessActivityContains": {
            "title": "Business activity contains",
            "type": "string",
            "description": "Case-insensitive text in the business activity, e.g. hair, tattoo, liquor, repair (at least 3 characters)."
          },
          "applicationTypes": {
            "title": "Application types",
            "type": "array",
            "description": "ISSUE (new licence), RENEW, C_LOC (moved), C_CAPA, C_EXPA, C_SBA. Use ISSUE with an issue-date range for a new-licence feed.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "5-digit ZIPs of the licensed address.",
            "items": {
              "type": "string"
            }
          },
          "wards": {
            "title": "Wards",
            "type": "array",
            "description": "Chicago wards 1 to 50.",
            "items": {
              "type": "string"
            }
          },
          "communityAreas": {
            "title": "Community areas",
            "type": "array",
            "description": "Chicago community area names, case-insensitive, e.g. Lake View, Logan Square, Near North Side, Loop, Lower West Side.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Case-insensitive substring of the legal or DBA name (at least 2 characters). Only matches names that are returned."
          },
          "licenseNumbers": {
            "title": "Licence numbers",
            "type": "array",
            "description": "Public licence numbers, e.g. 1694769.",
            "items": {
              "type": "string"
            }
          },
          "accountNumbers": {
            "title": "Account numbers",
            "type": "array",
            "description": "BACP account numbers (all licences of one business account).",
            "items": {
              "type": "string"
            }
          },
          "issuedFrom": {
            "title": "Issued on or after",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive (date the licence record was issued)."
          },
          "issuedTo": {
            "title": "Issued on or before",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive."
          },
          "expiresFrom": {
            "title": "Expires on or after",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive. Use with expiresTo for upcoming renewals."
          },
          "expiresTo": {
            "title": "Expires on or before",
            "type": "string",
            "description": "YYYY-MM-DD, inclusive."
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "newest",
              "oldest",
              "expiringSoon",
              "name",
              "licenseNumber"
            ],
            "type": "string",
            "description": "Result order. Date sorts skip records without that date.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Hard cap on results (each result is one billable event).",
            "default": 100
          },
          "includeStreetAddress": {
            "title": "Include street address",
            "type": "boolean",
            "description": "If on, the street line of the licensed address is returned for business-named rows. Never returned for rows whose legal name is hidden.",
            "default": false
          },
          "includeCoordinates": {
            "title": "Include map coordinates",
            "type": "boolean",
            "description": "If on, the source's latitude/longitude is returned for business-named rows (same rule as street).",
            "default": false
          },
          "requestDelayMs": {
            "title": "Delay between pages (ms)",
            "minimum": 1000,
            "type": "integer",
            "description": "Politeness delay between API pages (robots.txt Crawl-delay: 1).",
            "default": 1100
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries on timeouts, HTTP 408/429/5xx with exponential backoff and Retry-After.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}