# MerchantCircle Business Directory Scraper (`crawlergang/merchantcircle-scraper`) Actor

Scrape local business listings from MerchantCircle.com - 100K+ US businesses with contact info, ratings, categories, and addresses. Browse by city/state or search by keyword.

- **URL**: https://apify.com/crawlergang/merchantcircle-scraper.md
- **Developed by:** [Crawler Gang](https://apify.com/crawlergang) (community)
- **Categories:** Automation, Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 11 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## NYC Business Licenses Scraper

Search and extract business license records from [NYC Open Data](https://data.cityofnewyork.us/resource/w7w3-xahh.json) — the official NYC Department of Consumer Affairs (DCA) database of 500K+ business licenses across all five boroughs. Completely free, no API key or authentication required.

### Data Source

This actor uses the [NYC Open Data Socrata SODA API](https://data.cityofnewyork.us/Business/Legally-Operating-Businesses/w7w3-xahh), publicly provided by the NYC Department of Consumer Affairs. No API key or registration is required.

### Features

- **Search businesses** by keyword in business name or trade name
- **Fetch by license number** — look up specific licenses using their DCA license number
- **Filter by borough** — Manhattan, Brooklyn, Queens, Bronx, Staten Island
- **Filter by license type** — Individual or Premises
- **Filter by ZIP code** — narrow to a specific neighborhood
- Structured output with license number, business name, address, contact, geo coordinates
- Fully free — no API key, no proxy, no cookies

### Input

| Field | Type | Description |
|-------|------|-------------|
| `mode` | String (required) | `searchBusinesses` or `getByLicense` |
| `query` | String | Keyword to search in business/trade name (e.g. 'restaurant', 'pizza') |
| `licenseNumbers` | String[] | List of DCA license numbers (mode=getByLicense) |
| `licenseType` | String | Filter: `Individual` or `Premises` (blank = all) |
| `borough` | String | Filter: Manhattan, Brooklyn, Queens, Bronx, Staten Island |
| `zipCode` | String | 5-digit ZIP code filter (e.g. '10001') |
| `maxItems` | Integer | Max records to return (1–10000, default: 100) |

#### Example Input — Search Restaurants

```json
{
  "mode": "searchBusinesses",
  "query": "restaurant",
  "borough": "Manhattan",
  "maxItems": 50
}
````

#### Example Input — Get by License Number

```json
{
  "mode": "getByLicense",
  "licenseNumbers": ["0982764-DCA", "0002902-DCA"],
  "maxItems": 10
}
```

### Output

Each record contains:

| Field | Description |
|-------|-------------|
| `licenseNumber` | DCA license number (e.g. `0982764-DCA`) |
| `businessName` | Official registered business name |
| `tradeName` | Trade/DBA name (if different from business name) |
| `address` | Full address string |
| `city` | City (usually a NYC neighborhood or the borough name) |
| `state` | State (NY) |
| `zipCode` | ZIP code |
| `borough` | NYC borough (Manhattan, Brooklyn, Queens, Bronx, Staten Island) |
| `licenseType` | License type: `Individual` or `Premises` |
| `licenseStatus` | Current status (Active, Inactive, Pending, etc.) |
| `licenseExpirationDate` | Expiration date (YYYY-MM-DD) |
| `phone` | Contact phone number |
| `latitude` | Geographic latitude |
| `longitude` | Geographic longitude |
| `sourceUrl` | NYC Open Data query URL for this record |
| `recordType` | Always `businessLicense` |
| `scrapedAt` | ISO 8601 timestamp |

#### Example Output

```json
{
  "licenseNumber": "0982764-DCA",
  "businessName": "MARGHERITA PIZZA",
  "tradeName": "NY CORP.",
  "address": "16304 JAMAICA AVE, JAMAICA, NY, 11432",
  "city": "JAMAICA",
  "state": "NY",
  "zipCode": "11432",
  "borough": "Queens",
  "licenseType": "Premises",
  "licenseStatus": "Active",
  "licenseExpirationDate": "2028-03-31",
  "phone": "7186575780",
  "latitude": 40.70467524177002,
  "longitude": -73.79682330827154,
  "sourceUrl": "https://data.cityofnewyork.us/resource/w7w3-xahh.json?license_nbr=0982764-DCA",
  "recordType": "businessLicense",
  "scrapedAt": "2026-05-30T10:00:00+00:00"
}
```

### Use Cases

- **Business research** — find licensed businesses in a specific NYC neighborhood
- **Market analysis** — count active businesses by category or borough
- **Compliance verification** — confirm a business holds a valid DCA license
- **Lead generation** — find businesses by type and location with contact details
- **Local government data** — explore NYC's business landscape

### FAQ

**What types of businesses are licensed by NYC DCA?**
The DCA licenses hundreds of business types including autos, home improvement contractors, electronics stores, secondhand dealers, pawnbrokers, sidewalk cafes, tow trucks, employment agencies, and more.

**Is an API key required?**
No. The NYC Open Data Socrata API is publicly accessible with no registration.

**How many records are in the database?**
The NYC DCA license database contains 500K+ records spanning active, inactive, and historical licenses.

**What does `licenseType` mean?**
`Premises` means the license is tied to a physical location. `Individual` means the license is issued to a person rather than a location.

**Can I filter by business category?**
The dataset does not include a standard business category field. Use keyword search (`query`) to find businesses by type (e.g. 'pawnbroker', 'tow truck', 'sidewalk cafe').

# Actor input Schema

## `mode` (type: `string`):

How to find businesses. 'browseCity' browses all businesses in a US city/state. 'search' finds businesses matching a keyword.

## `stateSlug` (type: `string`):

US state abbreviation for browseCity mode (e.g. 'tx', 'ca', 'ny'). Used to build the city browse URL.

## `citySlug` (type: `string`):

City name slug for browseCity mode (e.g. 'san-antonio', 'los-angeles'). Leave blank to browse all businesses in the state.

## `query` (type: `string`):

Keyword to search for businesses (mode=search only). E.g. 'plumber', 'dentist', 'restaurant'.

## `location` (type: `string`):

City/state location filter for search mode (e.g. 'San Antonio TX', 'Houston TX'). Recommended: MerchantCircle may redirect geo-less searches to your IP location.

## `fetchDetails` (type: `boolean`):

If enabled, fetches each business's detail page for richer data (phone, website, exact address). Slower but more complete.

## `maxItems` (type: `integer`):

Maximum number of business records to return (1â€“5000).

## Actor input object example

```json
{
  "mode": "browseCity",
  "stateSlug": "tx",
  "citySlug": "san-antonio",
  "fetchDetails": true,
  "maxItems": 10
}
```

# Actor output Schema

## `licenses` (type: `string`):

Dataset containing all scraped NYC business license records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "browseCity",
    "stateSlug": "tx",
    "citySlug": "san-antonio",
    "fetchDetails": true,
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlergang/merchantcircle-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "browseCity",
    "stateSlug": "tx",
    "citySlug": "san-antonio",
    "fetchDetails": True,
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlergang/merchantcircle-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "browseCity",
  "stateSlug": "tx",
  "citySlug": "san-antonio",
  "fetchDetails": true,
  "maxItems": 10
}' |
apify call crawlergang/merchantcircle-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=crawlergang/merchantcircle-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "MerchantCircle Business Directory Scraper",
        "description": "Scrape local business listings from MerchantCircle.com - 100K+ US businesses with contact info, ratings, categories, and addresses. Browse by city/state or search by keyword.",
        "version": "1.0",
        "x-build-id": "D4MyFcKT6YdhyZ5Sd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/crawlergang~merchantcircle-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-crawlergang-merchantcircle-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/crawlergang~merchantcircle-scraper/runs": {
            "post": {
                "operationId": "runs-sync-crawlergang-merchantcircle-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/crawlergang~merchantcircle-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-crawlergang-merchantcircle-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",
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "browseCity",
                            "search"
                        ],
                        "type": "string",
                        "description": "How to find businesses. 'browseCity' browses all businesses in a US city/state. 'search' finds businesses matching a keyword.",
                        "default": "browseCity"
                    },
                    "stateSlug": {
                        "title": "State (2-letter code)",
                        "type": "string",
                        "description": "US state abbreviation for browseCity mode (e.g. 'tx', 'ca', 'ny'). Used to build the city browse URL."
                    },
                    "citySlug": {
                        "title": "City slug (optional)",
                        "type": "string",
                        "description": "City name slug for browseCity mode (e.g. 'san-antonio', 'los-angeles'). Leave blank to browse all businesses in the state."
                    },
                    "query": {
                        "title": "Search keyword",
                        "type": "string",
                        "description": "Keyword to search for businesses (mode=search only). E.g. 'plumber', 'dentist', 'restaurant'."
                    },
                    "location": {
                        "title": "Location (for search mode)",
                        "type": "string",
                        "description": "City/state location filter for search mode (e.g. 'San Antonio TX', 'Houston TX'). Recommended: MerchantCircle may redirect geo-less searches to your IP location."
                    },
                    "fetchDetails": {
                        "title": "Fetch business details",
                        "type": "boolean",
                        "description": "If enabled, fetches each business's detail page for richer data (phone, website, exact address). Slower but more complete.",
                        "default": true
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of business records to return (1â€“5000).",
                        "default": 10
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
