{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC Business License Scraper",
    "description": "Search New York City's official business license registry - find active and historical licensed businesses by name, category, borough, license status, or phone number. Sourced live from NYC Open Data (Department of Consumer and Worker Protection).",
    "version": "1.0",
    "x-build-id": "hlXxzHpt2DFdrDP7N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~nyc-business-license-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-nyc-business-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/crawlerbros~nyc-business-license-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-nyc-business-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/crawlerbros~nyc-business-license-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-nyc-business-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byLicenseNumbers",
              "byPhoneNumbers",
              "byBusinessUniqueIds"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (business name)",
            "type": "string",
            "description": "Free-text match against the business's legal name or DBA (\"doing business as\") trade name. Leave empty with mode=search to browse using only the filters below.",
            "default": "pizza"
          },
          "licenseNumbers": {
            "title": "License numbers (mode=byLicenseNumbers)",
            "type": "array",
            "description": "Exact NYC license numbers, e.g. `0002902-DCA` (older format) or `2124913-DCWP` (newer format, issued after the agency was renamed DCA -> DCWP in 2020).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "phoneNumbers": {
            "title": "Phone numbers (mode=byPhoneNumbers)",
            "type": "array",
            "description": "US phone numbers, any format (e.g. `(718) 237-1166` or `7182371166`).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "businessUniqueIds": {
            "title": "Business Unique IDs (mode=byBusinessUniqueIds)",
            "type": "array",
            "description": "Exact NYC \"Business Unique ID\" values, e.g. `BA-1216876-2022`. One business entity can hold several licenses (different categories, renewals, etc.) that all share the same Business Unique ID — this mode returns every license on file for the given ID(s).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Business category",
            "enum": [
              "Bingo Game Operator",
              "Booting Company",
              "Car Wash",
              "Commercial Lessor - Bingo",
              "Construction Labor Provider",
              "Dealer In Products For The Disabled",
              "Debt Collection Agency",
              "Electronic Cigarette Dealer",
              "Electronic & Home Appliance Service Dealer",
              "Electronics Store",
              "Employment Agency",
              "Games of Chance - Bell Jar",
              "Games of Chance - Las Vegas / Casino Nights",
              "Games of Chance - Raffle with Net Proceeds Over $30,000",
              "Games of Chance - Raffle with Net Proceeds Under $30,000",
              "Garage & Parking Lot",
              "General Vendor",
              "General Vendor Distributor",
              "Home Improvement Contractor",
              "Horse Drawn Cab Driver",
              "Horse Drawn Cab Owner",
              "Hotel",
              "Industrial Laundry",
              "Industrial Laundry Delivery",
              "Laundries",
              "Locksmith",
              "Locksmith Apprentice",
              "Newsstand",
              "Pawnbroker",
              "Pedicab Business",
              "Pedicab Driver",
              "Process Server Individual",
              "Process Serving Agency",
              "Scale Dealer/Repairer",
              "Scrap Metal Processor",
              "Secondhand Dealer - Auto",
              "Secondhand Dealer - General",
              "Sightseeing Bus",
              "Sightseeing Guide",
              "Specialized Vending License - MFV",
              "Stoop Line Stand",
              "Storage Warehouse",
              "Third Party Food Delivery Service",
              "Ticket Seller Business",
              "Ticket Seller Individual",
              "Tobacco Retail Dealer",
              "Tow Truck Company",
              "Tow Truck Driver"
            ],
            "type": "string",
            "description": "Restrict results to a specific licensed business category."
          },
          "borough": {
            "title": "Borough",
            "enum": [
              "Manhattan",
              "Brooklyn",
              "Queens",
              "Bronx",
              "Staten Island",
              "Outside NYC"
            ],
            "type": "string",
            "description": "Restrict results to businesses located in this NYC borough."
          },
          "licenseStatus": {
            "title": "License status",
            "enum": [
              "Active",
              "Ready for Renewal",
              "Expired",
              "Out of Business",
              "Suspended",
              "Failed to Renew",
              "Close",
              "Revoked",
              "TOL",
              "Voided",
              "Surrendered"
            ],
            "type": "string",
            "description": "Restrict results to licenses in this status."
          },
          "licenseType": {
            "title": "License type",
            "enum": [
              "Individual",
              "Premises"
            ],
            "type": "string",
            "description": "Restrict results to individual license holders or business premises."
          },
          "zipCode": {
            "title": "ZIP code",
            "type": "string",
            "description": "Restrict results to this 5-digit NYC ZIP code."
          },
          "addressType": {
            "title": "Address type",
            "enum": [
              "Complete Address",
              "Cross Street (Intersection)",
              "Place (Landmark)",
              "P.O. Box"
            ],
            "type": "string",
            "description": "Restrict results to how the business address is recorded on file. Most licensed premises use a complete street address; a small share are recorded only as a cross street, a landmark/place name, or a P.O. Box."
          },
          "councilDistrict": {
            "title": "City Council district",
            "enum": [
              "01",
              "02",
              "03",
              "04",
              "05",
              "06",
              "07",
              "08",
              "09",
              "10",
              "11",
              "12",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19",
              "20",
              "21",
              "22",
              "23",
              "24",
              "25",
              "26",
              "27",
              "28",
              "29",
              "30",
              "31",
              "32",
              "33",
              "34",
              "35",
              "36",
              "37",
              "38",
              "39",
              "40",
              "41",
              "42",
              "43",
              "44",
              "45",
              "46",
              "47",
              "48",
              "49",
              "50",
              "51"
            ],
            "type": "string",
            "description": "Restrict results to this NYC City Council district (1-51)."
          },
          "communityBoard": {
            "title": "Community Board",
            "enum": [
              "101",
              "102",
              "103",
              "104",
              "105",
              "106",
              "107",
              "108",
              "109",
              "110",
              "111",
              "112",
              "164",
              "201",
              "202",
              "203",
              "204",
              "205",
              "206",
              "207",
              "208",
              "209",
              "210",
              "211",
              "212",
              "226",
              "227",
              "228",
              "301",
              "302",
              "303",
              "304",
              "305",
              "306",
              "307",
              "308",
              "309",
              "310",
              "311",
              "312",
              "313",
              "314",
              "315",
              "316",
              "317",
              "318",
              "355",
              "401",
              "402",
              "403",
              "404",
              "405",
              "406",
              "407",
              "408",
              "409",
              "410",
              "411",
              "412",
              "413",
              "414",
              "480",
              "481",
              "483",
              "501",
              "502",
              "503"
            ],
            "type": "string",
            "description": "Restrict results to this NYC Community District Board code."
          },
          "createdAfter": {
            "title": "License issued on/after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses first issued on or after this date."
          },
          "createdBefore": {
            "title": "License issued on/before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses first issued on or before this date."
          },
          "expiresAfter": {
            "title": "License expires on/after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses expiring on or after this date. Combine with License status = Active to find licenses that are currently valid and not expiring soon."
          },
          "expiresBefore": {
            "title": "License expires on/before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses expiring on or before this date. Useful for finding licenses that are expired or expiring soon (e.g. for renewal outreach)."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "nameAsc",
              "nameDesc",
              "newest",
              "oldest",
              "expiringSoon",
              "expiringLatest"
            ],
            "type": "string",
            "description": "Order of results (mode=search).",
            "default": "relevance"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}