# Local SMB Lead & Website Audit Scraper (`zendev/yp-smb-lead-auditor`) Actor

Extract local SMB leads from Yellow Pages and audit their websites for MX-validated emails, 15 social profiles, SSL validity, CMS, booking widgets, and ad pixels—with stateful delta monitoring.

- **URL**: https://apify.com/zendev/yp-smb-lead-auditor.md
- **Developed by:** [Zandro Justine Labasano](https://apify.com/zendev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 local smb lead extracteds

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

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

## Local SMB Lead & Website Audit Scraper (Yellow Pages + Contact & Tech Enrichment)

Extract verified local SMB leads from **Yellow Pages** and automatically audit each business's live website for **MX-validated emails**, **15 social media profiles**, **SSL validity**, **CMS platform**, **booking widgets**, and **ad tracking pixels** (GA4, Meta Pixel, Google Ads).

Built with a two-tier anti-bot architecture (`gotScraping` TLS impersonation + automatic `PlaywrightCrawler` Cloudflare fallback) and proxy arbitrage that routes only Yellow Pages requests through residential proxies while auditing SMB websites directly.

***

### Key Features

- **Two-Tier Yellow Pages Extraction:** Uses lightweight `gotScraping` + Cheerio (`~180 KB/page`) with automatic escalation to `PlaywrightCrawler` (`blockRequests()`) only when Cloudflare triggers.
- **Proxy Arbitrage:** Never wastes residential proxy bandwidth on SMB website crawls—fetches business homepages and `/contact` or `/about` pages directly with an 8-second timeout.
- **MX-Validated Email & Role Classification:** Extracts emails, filters asset/placeholder false positives, verifies domain MX records via `node:dns/promises`, and classifies `role` (`info@`, `sales@`) vs. `named` contacts.
- **Tech Stack & Agency Pitch Flags:** Detects WordPress, Squarespace, Wix, Shopify, Webflow, Calendly, ServiceTitan, Housecall Pro, Jobber, GA4, Meta Pixel, and Google Ads, automatically tagging `NO_WEBSITE`, `NO_SSL`, `LOW_REVIEWS`, `NO_TRACKING_PIXELS`, and `NO_BOOKING_WIDGET`.
- **Stateful Delta Monitoring:** Supply `monitorProjectName` to skip unchanged listings across scheduled runs without re-billing.

***

### FAQ

#### How does the two-tier scraper keep residential proxy costs low?

Yellow Pages pages are fetched first via lightweight TLS-impersonating HTTP requests (`~180 KB/page`), escalating to Playwright only if Cloudflare challenges a URL. All SMB website audits run over direct connections with zero residential proxy bandwidth.

#### Are extracted business emails validated before being returned?

Yes. Every discovered email is filtered against asset and placeholder domains, classified as a role inbox (`info@`, `sales@`) or named address, and verified against live DNS MX records (`mxValid: true`).

#### How does stateful delta monitoring prevent duplicate billing?

When `monitorProjectName` is set, the scraper hashes each listing's core fields in a named Apify Key-Value Store. Listings unchanged since your previous run are automatically skipped and never pushed or billed.

# Actor input Schema

## `searchTerms` (type: `array`):

Business categories or keywords to search on Yellow Pages (e.g., 'plumbers', 'roofing contractors', 'dentists').

## `locations` (type: `array`):

Target US cities, states, or ZIP codes paired with each search term (e.g., 'Austin, TX', '78701').

## `startUrls` (type: `array`):

Optional direct YellowPages.com search or /mip/ business detail URLs to crawl alongside or instead of searchTerms + locations.

## `maxItemsPerSearch` (type: `integer`):

Maximum number of deduplicated business leads to extract per search term + location pair (1 to 3,000).

## `auditWebsites` (type: `boolean`):

Directly audit each business website (bypassing residential proxy) for SSL status, MX-validated emails, 15 social platforms, CMS, booking widgets, and ad pixels.

## `scrapeYpDetails` (type: `boolean`):

Fetch each business's Yellow Pages profile page to extract full descriptions, complete hours, payment methods, and YP-listed email addresses.

## `skipLeadResellers` (type: `boolean`):

Exclude sponsored ad blocks and national 1-800/888 lead-generation aggregators so only genuine local SMBs are returned.

## `onlyPitchTargets` (type: `boolean`):

Filter output to businesses missing a website, lacking valid HTTPS/SSL, or having fewer than 5 reviews.

## `monitorProjectName` (type: `string`):

Optional project slug for stateful delta monitoring across runs. Unchanged listings are skipped and never re-billed.

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

Residential proxy configuration used exclusively for YellowPages.com requests (direct website audits never consume residential proxy bandwidth).

## Actor input object example

```json
{
  "searchTerms": [
    "plumbers"
  ],
  "locations": [
    "Austin, TX"
  ],
  "startUrls": [],
  "maxItemsPerSearch": 10,
  "auditWebsites": true,
  "scrapeYpDetails": false,
  "skipLeadResellers": true,
  "onlyPitchTargets": false,
  "monitorProjectName": "",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `outreach_audit` (type: `string`):

No description

# 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 = {
    "searchTerms": [
        "plumbers"
    ],
    "locations": [
        "Austin, TX"
    ],
    "maxItemsPerSearch": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("zendev/yp-smb-lead-auditor").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 = {
    "searchTerms": ["plumbers"],
    "locations": ["Austin, TX"],
    "maxItemsPerSearch": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("zendev/yp-smb-lead-auditor").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 '{
  "searchTerms": [
    "plumbers"
  ],
  "locations": [
    "Austin, TX"
  ],
  "maxItemsPerSearch": 10
}' |
apify call zendev/yp-smb-lead-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zendev/yp-smb-lead-auditor"
        }
    }
}
```

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/GI5JOrktYTdlrDjQg/builds/qPebVsgcdFYlk8jFD/openapi.json
