# Brownbook Business Data Scraper | Real-Time Leads (`b2b_leads/brownbook-real-time-data-scraper`) Actor

Collect live Brownbook business data at scale: search companies by keyword and location, open full profiles with reviews, and enrich leads with emails and socials. Structured rows stream to your dataset in real time.

- **URL**: https://apify.com/b2b_leads/brownbook-real-time-data-scraper.md
- **Developed by:** [Emmanuel](https://apify.com/b2b_leads) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Brownbook Real-Time Data

> **Free trial:** free Apify plans get a 2-result sample per run. Upgrade to a paid plan for full, unlimited data.

Live company intelligence from Brownbook — the worldwide business listing database with tens of millions of companies across 200+ countries. Search businesses by keyword and location, open full company profiles with reviews, and enrich leads with emails and social profiles. Every record streams to your dataset the moment it is collected.

### Who this is for

- **Lead-gen agencies** building outreach lists by trade and city (plumbers in Houston, notaries in Chicago)
- **Local SEO teams** auditing directory presence, categories, claimed status, and reviews
- **Sales prospectors** who need phone, website, email, and socials in one row
- **Market researchers** sizing categories city by city or country by country
- **CRM / data teams** enriching a company list they already have via Company URLs
- **Directory affiliates** tracking listings, ratings, and profile completeness

### Features

| Checkbox | What you get |
|---|---|
| 🔎 Business search (default on) | Keyword + city + country tasks; one row per company with name, category, address, phone, website, and Brownbook link |
| 🔗 Company URLs | Paste `brownbook.net/business/...` links to get the same rows, ideal for enriching a list you already own |
| 🎯 Full company details | Fills each row with its complete profile: description, full category path, business hours, tags, extra phones/websites, images, and published reviews |
| 🎯 Lead details (email discovery) | Visits each company's own website and adds contact emails plus social profiles; works with or without full details |
| 🔔 Webhook delivery | JSON or Slack push of every record, in addition to the dataset |
| 🌐 Connection | Residential proxy (US default) for reliable collection |

Search matches business names in the directory. Location and country scope each task; leave them empty to search worldwide.

### Input reference

```json
{
  "enableSearch": true,
  "searchTasks": [
    { "keyword": "plumber", "location": "New York", "country": "United States", "maxResults": 10 },
    { "keyword": "notary", "location": "Houston", "country": "United States", "maxResults": 10 }
  ],
  "enableScrapeByUrl": false,
  "scrapeUrls": ["https://brownbook.net/business/51285661/juliette-come2u-northeast-houston-notary-services"],
  "enableListingDetails": false,
  "enableLeadDetails": false,
  "concurrency": 2,
  "webhookUrl": "",
  "webhookFormat": "json"
}
```

| Field | Type | Default | Notes |
|---|---|---|---|
| `enableSearch` | boolean | `true` | Primary discovery feature |
| `searchTasks[].keyword` | string | — | Required per task, e.g. `plumber`, `dentist`, `coffee shop` |
| `searchTasks[].location` | string | `""` | City, e.g. `New York`. Empty = worldwide |
| `searchTasks[].country` | string | `""` | Country, e.g. `United States`, `United Kingdom`. Empty = worldwide |
| `searchTasks[].maxResults` | integer | `10` | Cap for that one search |
| `enableScrapeByUrl` / `scrapeUrls` | boolean / string\[] | `false` / `[]` | Company URLs to enrich directly |
| `enableListingDetails` | boolean | `false` | Full profile + reviews on the same row (`detailsFetched: true`) |
| `enableLeadDetails` | boolean | `false` | Website email + social discovery on the same row (`leadDetails: true`) |
| `concurrency` | integer 1–4 | `2` | Parallel detail enrichments |
| `webhookUrl` / `webhookFormat` | string | `""` / `json` | Extra real-time push (`json` or `slack`) |
| `proxyConfiguration` | object | Residential US | Change only for another country or your own proxy |

Empty input still runs a useful demo: Business search on, `plumber` in `New York, United States`, 10 rows.

### Output fields

One row per business. Fast cards carry what the directory shows; enrichments add fields to the same row — rows are never dropped.

Core: `name`, `category`, `categories`, `description`, `profileUrl`, `profileId`, `phone`, `mobile`, `fax`, `website`, `street`, `city`, `state`, `zipCode`, `country`, `location`, `lat`, `lng`, `rating`, `reviewCount`, `logoUrl`, `claimed`, `yearEstablished`.

Full company details adds: `businessHours`, full `categories` path, extra contact points, `images`-backed `logoUrl`, `reviews`, `detailsFetched: true`.

Lead details adds: `email`, `emails`, `socials`, `instagram`, `facebook`, `linkedin`, `twitter`, `leadDetails: true`.

Traceability: `featureType` (`search` | `scrape_by_url`), `searchKeyword`, `searchLocation`, `searchCountry`, `searchTaskIndex`, `searchTaskLabel`, `source`, `scrapedAt`. The run summary (`OUTPUT`) reports totals, duration, errors, and paywall status.

### Webhooks

Set **Webhook URL** to also POST every record the moment it is collected (dataset writes always happen first). `json` posts the full record; `slack` posts a compact company card. Delivery is fire-and-forget — a failing webhook never stops the run.

### MCP / AI-agent usage

Pair with the [Apify MCP server](https://docs.apify.com/mcp): your agent can start runs and read the dataset directly.

Example question for your agent:

> "Run the Brownbook actor for `dentist` in `Austin, United States` (10 results with lead details), then list every company that has an email address."

### FAQ

- **Which proxy is used?** Apify residential (US default) on the platform; DataImpulse residential for local development. Change the country only if you need another market.
- **How fresh is the data?** Every run collects live directory data — nothing is cached or pre-scraped.
- **What does the free trial include?** Free Apify plans export a 2-result sample per run so you can validate the schema before upgrading.
- **How am I charged?** Pay-per-event: one `result` event per exported row, plus any spend cap you set on your account.
- **Search or URLs?** Search for discovery; Company URLs when you already have a list to enrich.
- **Will enrichment slow my run?** Full details and lead discovery each add a little extra time per record. Keep them off for the fastest discovery runs.

### Delivery & trial notice

Runs stream structured company rows to the default dataset in real time. Free Apify plans are limited to a 2-result sample per run (`FREE_TIER_MAX_ITEMS=2`, `limit` mode); the owner can switch to `block` mode via the `FREE_TIER_MODE` environment variable. Paying plans get full, unlimited output.

# Actor input Schema

## `enableSearch` (type: `boolean`):

Find companies on Brownbook by keyword and location — a ready-to-run demo is pre-filled below. NOTE: free Apify plans are limited to a small sample of results per run — upgrade to a paid plan for full, unlimited data.

## `searchTasks` (type: `array`):

One row per search. Add a keyword (what to look for), a city, and a country. Click "+ Add" for every additional search. "Max results" governs that one row.

## `enableScrapeByUrl` (type: `boolean`):

Collect full details for specific Brownbook company pages instead of (or in addition to) searches.

## `scrapeUrls` (type: `array`):

Brownbook company URLs (https://brownbook.net/business/...).

## `enableListingDetails` (type: `boolean`):

Fill each result with its full company profile: description, complete category path, business hours, tags, extra phones and websites, images, and published reviews. Every result is still exported without it — enrichment adds fields to the same row, it never filters or drops rows.

## `enableLeadDetails` (type: `boolean`):

Visit each company's own website and add contact emails plus social profiles — the reliable lead-gen option. Works on its own, without full company details, so you can keep runs fast and still get emails. Companies with no published website are still exported, just without contact fields.

## `concurrency` (type: `integer`):

How many detail enrichments run in parallel (1–4). Higher is faster but a bit harder on rate limits.

## `webhookUrl` (type: `string`):

Every record is always saved to the run's dataset — a webhook is an ADDITIONAL real-time push. When set, each new record is also POSTed to this URL (CRM, Slack incoming webhook, Zapier, Make, Google Sheets).

## `webhookFormat` (type: `string`):

json = full record object; slack = Slack-friendly message payload.

## `proxyConfiguration` (type: `object`):

Apify residential proxy (US) is enabled by default for reliable results.

## Actor input object example

```json
{
  "enableSearch": true,
  "searchTasks": [
    {
      "keyword": "plumber",
      "location": "New York",
      "country": "United States",
      "maxResults": 10
    }
  ],
  "enableScrapeByUrl": false,
  "scrapeUrls": [],
  "enableListingDetails": false,
  "enableLeadDetails": false,
  "concurrency": 2,
  "webhookUrl": "",
  "webhookFormat": "json",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `allResults` (type: `string`):

Complete dataset with every row from all enabled features in this run.

## `leads` (type: `string`):

Outreach-ready rows with contact details.

## `runSummary` (type: `string`):

Run metadata: totals, duration, errors, spending-limit and free-tier (paywall) status.

# 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 = {
    "enableSearch": true,
    "searchTasks": [
        {
            "keyword": "plumber",
            "location": "New York",
            "country": "United States",
            "maxResults": 10
        }
    ],
    "enableListingDetails": false,
    "enableLeadDetails": false,
    "concurrency": 2,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/brownbook-real-time-data-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 = {
    "enableSearch": True,
    "searchTasks": [{
            "keyword": "plumber",
            "location": "New York",
            "country": "United States",
            "maxResults": 10,
        }],
    "enableListingDetails": False,
    "enableLeadDetails": False,
    "concurrency": 2,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/brownbook-real-time-data-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "enableSearch": true,
  "searchTasks": [
    {
      "keyword": "plumber",
      "location": "New York",
      "country": "United States",
      "maxResults": 10
    }
  ],
  "enableListingDetails": false,
  "enableLeadDetails": false,
  "concurrency": 2,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call b2b_leads/brownbook-real-time-data-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_leads/brownbook-real-time-data-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/657V85KCqM3vIgOsP/builds/T58dXTMGFvJQNihwT/openapi.json
