# Yelp B2b Lead Extractor (`b2b_leads/yelp-b2b-lead-extractor`) Actor

Scrape Yelp businesses by keyword and location with ease. This Actor extracts core business details and crawls associated websites to find emails and phone numbers. Perfect for B2B lead generation and building enriched prospect lists fast.

- **URL**: https://apify.com/b2b_leads/yelp-b2b-lead-extractor.md
- **Developed by:** [Emmanuel](https://apify.com/b2b_leads) (community)
- **Categories:** Lead generation, Developer tools, Automation
- **Security:** Limited permissions
- **Stats:** 48 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.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.

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

## 🎯 Yelp B2B Lead Extractor

**The most reliable Yelp scraper on Apify** — Extract verified business leads with emails, phone numbers, and social media profiles in minutes.

***

### 🚀 What This Actor Does

Turn Yelp search results into actionable B2B leads. Simply enter a keyword (like "Plumbers") and location (like "Miami, FL"), and get a complete spreadsheet of business contacts ready for outreach.

#### ✨ Data Extracted

| Field | Description |
|-------|-------------|
| **Business Name** | Official business name from Yelp |
| **Phone Number** | Direct business phone |
| **Website** | Official business website URL |
| **Email Addresses** | Extracted from business websites |
| **Social Media** | Facebook, Instagram, LinkedIn, Twitter links |
| **Rating** | Yelp star rating (1-5) |
| **Review Count** | Number of Yelp reviews |
| **Address** | Street address |
| **City** | City location |
| **Yelp URL** | Direct link to Yelp business page |

***

### 💼 Perfect For

- **Sales Teams** — Build targeted prospect lists by industry and location
- **Marketing Agencies** — Find local businesses for outreach campaigns
- **Lead Generation** — Automate B2B lead collection at scale
- **Market Research** — Analyze business density and competition
- **Recruiters** — Find companies in specific industries

***

### 🎯 Why Choose This Actor?

#### ✅ Built for Reliability

Yelp aggressively blocks scrapers. This actor uses **smart proxy rotation** across 7 countries where Yelp has less blocking, automatically retrying until successful.

#### ✅ Deep Email Extraction

Doesn't just grab Yelp data — actually visits each business website to find email addresses in headers, footers, and contact pages.

#### ✅ Complete Contact Profiles

Get everything you need for outreach: phone, email, website, AND social media links — all in one export.

#### ✅ Residential Proxies Only

Uses **premium residential proxies** (real ISP IPs) to avoid detection. Datacenter proxies don't work with Yelp — this actor handles it automatically.

***

### 📥 Input

| Field | Required | Description |
|-------|----------|-------------|
| `keyword` | ✅ Yes | What to search for (e.g., "Dentists", "Restaurants", "HVAC") |
| `location` | ✅ Yes | City and state (e.g., "Austin, TX", "Los Angeles, CA") |
| `maxResults` | No | Number of businesses to extract (default: 20, max: 100) |

#### Example Input

```json
{
  "keyword": "Plumbers",
  "location": "Miami, FL",
  "maxResults": 50
}
```

***

### 📤 Output

Results are saved to the **Apify Dataset** in JSON format. Each business includes:

```json
{
  "name": "ABC Plumbing Services",
  "phone": "(305) 555-1234",
  "website": "https://abcplumbing.com",
  "emails": "info@abcplumbing.com, service@abcplumbing.com",
  "social_links": "https://facebook.com/abcplumbing, https://instagram.com/abcplumbing",
  "rating": "4.5",
  "reviews": "127",
  "address": "123 Main Street",
  "city": "Miami",
  "yelp_url": "https://www.yelp.com/biz/abc-plumbing-services-miami",
  "website_status": "ok"
}
```

#### Export Options

- **JSON** — Raw data for developers
- **CSV** — Open in Excel or Google Sheets
- **Excel** — Direct .xlsx download

***

### ⚡ How It Works

1. **Smart Location Loading** — Loads Yelp with location pre-set to avoid blocks
2. **Human-Like Search** — Types keywords naturally with realistic delays
3. **Batch Processing** — Opens multiple business pages simultaneously for speed
4. **Deep Website Crawl** — Visits each business website to extract emails
5. **Automatic Retry** — Rotates through 7 proxy countries if blocked

#### Proxy Countries Used

🇧🇷 Brazil • 🇮🇹 Italy • 🇫🇷 France • 🇵🇹 Portugal • 🇩🇪 Germany • 🇮🇪 Ireland • 🇪🇸 Spain

***

### ⚠️ Requirements

This actor **requires residential proxies** to work. Residential proxies are billed separately based on data transfer.

- ✅ Apify account with residential proxy access
- ✅ Sufficient proxy credits

**Note:** The actor will fail if you don't have residential proxy access enabled. Check your Apify subscription settings.

***

### 📊 Performance

| Metric | Typical Value |
|--------|---------------|
| **Speed** | ~20 businesses in 3-5 minutes |
| **Success Rate** | 85-95% (depends on Yelp blocks) |
| **Email Find Rate** | 40-60% of businesses with websites |
| **Memory Usage** | 2-4 GB |

***

### 💡 Tips for Best Results

1. **Be Specific** — "Emergency Plumber" works better than just "Plumber"
2. **Include State** — Always include state code (e.g., "TX", "CA", "FL")
3. **Start Small** — Test with 10-20 results before running larger jobs
4. **Check Credits** — Residential proxies use data transfer credits

***

### 🔒 Legal & Ethical Use

This actor is designed for **legitimate business purposes** such as sales prospecting and market research. Users are responsible for:

- Complying with Yelp's Terms of Service
- Following applicable data protection laws (GDPR, CCPA, etc.)
- Using extracted data ethically and responsibly
- Not spamming or harassing businesses

***

### 🛠️ Troubleshooting

#### "All proxy countries failed"

→ Check that residential proxies are enabled in your Apify account

#### "No results found"

→ Try a different location or more general keyword

#### Low email extraction rate

→ Many small businesses don't list emails publicly — this is normal

***

### 📞 Support

Having issues? Check the run logs for detailed step-by-step progress. Each step is logged so you can see exactly where any problems occur.

***

### 🏷️ Tags

`yelp` `lead-generation` `b2b` `email-extractor` `business-scraper` `sales-leads` `contact-finder` `web-scraping` `playwright`

***

**Made with ❤️ for sales teams who hate manual prospecting**

# Actor input Schema

## `keyword` (type: `string`):

What type of business to search for (e.g., Plumbers, Dentists, Restaurants)

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

City and State to search in (e.g., Austin, TX)

## `maxResults` (type: `integer`):

Maximum number of businesses to scrape

## Actor input object example

```json
{
  "keyword": "Plumbers",
  "location": "Austin, TX",
  "maxResults": 1
}
```

# Actor output Schema

## `results` (type: `string`):

Business leads with contact info, social media, owner details, and website quality scores

# 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 = {
    "keyword": "Plumbers",
    "location": "Austin, TX",
    "maxResults": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/yelp-b2b-lead-extractor").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 = {
    "keyword": "Plumbers",
    "location": "Austin, TX",
    "maxResults": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/yelp-b2b-lead-extractor").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 '{
  "keyword": "Plumbers",
  "location": "Austin, TX",
  "maxResults": 1
}' |
apify call b2b_leads/yelp-b2b-lead-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_leads/yelp-b2b-lead-extractor"
        }
    }
}
```

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/IGH10BfiwefUKP6rP/builds/gv1Tia31G7HgDnrZp/openapi.json
