# Yelp Real-Time Data — Business Scraper & Lead Extractor (`b2b_leads/yelp-real-time-data`) Actor

Real-time Yelp scraper for business search, details, reviews & contact enrichment (phone, website, email). Reliable, proxy-ready, LLM/MCP-friendly. Export leads to JSON, CSV, or Excel.

- **URL**: https://apify.com/b2b\_leads/yelp-real-time-data.md
- **Developed by:** [Chidubem Aneke](https://apify.com/b2b_leads) (community)
- **Categories:** Lead generation, E-commerce, Automation
- **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/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

## Yelp Real-Time Data — Live Business Intelligence Scraper

**Turn Yelp into structured JSON** — search results, full contact profiles, reviews, photos, category listings, events, and arbitrary URL scraping. Enable features with **checkboxes** — **Business Search is on by default**. One feature runs per start (if multiple are checked, highest priority wins). Every row is tagged with `featureType` so agents, CRMs, and data pipelines can filter without guessing.

Built for **lead generation**, **local SEO**, **reputation monitoring**, **market research**, and **real-time data feeds** — with optional email enrichment from business websites and 40+ data fields per business.

---

### Why teams choose this Actor

- **Rich, join-friendly JSON** — identity, contact, location, reputation, operations, and media in one canonical schema
- **Eight specialized modes** — search, details, reviews, photos, category browse, URL scraper, events, full pipeline
- **Checkbox UX** — enable only what you need; Business Search on by default; one feature per run
- **Lead-gen ready** — phone, E.164 phone, website, resolved URL, optional email, completeness score
- **Filter-rich** — Yelp-native filters on requests + post-scrape filters before save
- **Apify-native** — API, schedules, webhooks, dataset views, CSV/Excel export
- **Agent & MCP friendly** — documented input/output contracts below for LLM tool use

---

### Use cases

| Use case | Enable | What you get |
|----------|--------|--------------|
| **B2B lead lists** | `enableBusinessSearch` + `searchEnrichContacts` | Businesses with phone, website, rating, address; optional email from website |
| **One-click lead gen** | `enableFullPipeline` | Search → full contact profile (+ optional reviews) in one run |
| **CRM enrichment** | `enableBusinessDetails` | Deep profile for known Yelp URLs: hours, amenities, social links |
| **Outbound sales prospecting** | `enableBusinessSearch` + `filterPreset: lead_gen` | Pre-filtered rows: phone required, min rating, email enrichment |
| **Local SEO audits** | `enableBusinessDetails` or `enableCategoryBrowse` | Claimed status, hours, categories, review counts, completeness score |
| **Competitor mapping** | `enableCategoryBrowse` or `enableBusinessSearch` | All businesses in a category + geo with filters |
| **Reputation monitoring** | `enableBusinessReviews` | Paginated review text with business contact embedded on each row |
| **Sentiment & NLP pipelines** | `enableBusinessReviews` | Star rating, date, author, text, keyword filters |
| **Brand / visual audit** | `enableBusinessPhotos` | Photo URLs, captions, dates, categories |
| **Event marketing** | `enableEvents` | Local events by city or URL with date/category filters |
| **Ad-hoc research** | `enableScrapeByUrl` | Paste any Yelp URL — auto-detects page type |
| **Data warehouse / lake** | Any enabled feature | Stable `featureType` + ISO timestamps for incremental loads |
| **AI agent workflows** | Any enabled feature | Structured input schema + typed output rows (see below) |

---

### Data richness — what each business row can include

When data exists on Yelp (and optionally the business website for email), business-facing rows populate fields from this **canonical profile**:

#### Identity & links
| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Business name |
| `bizId` | string \| null | Yelp slug ID (from URL) |
| `encBizId` | string \| null | Encoded ID for joins / GraphQL |
| `url` | string | Yelp page URL |
| `yelpProfileUrl` | string \| null | Canonical profile URL |
| `categories` | string[] | All category labels |
| `primaryCategory` | string \| null | Main category |
| `description` | string \| null | About / snippet text |

#### Contact (high value for lead gen)
| Field | Type | Description |
|-------|------|-------------|
| `phone` | string \| null | Display phone |
| `phoneE164` | string \| null | Normalized E.164 |
| `website` | string \| null | Raw website (may be Yelp redirect) |
| `websiteFinal` | string \| null | Dereferenced external URL |
| `email` | string \| null | From website enrichment when enabled |
| `emailSource` | string \| null | `website`, `jsonld`, or `mailto` |
| `socialLinks` | object[] | Platform + URL pairs |

#### Location
| Field | Type | Description |
|-------|------|-------------|
| `address` | object \| null | Structured: street, city, state, zip, country, formatted |
| `neighborhood` | string \| null | Neighborhood name |
| `city`, `state`, `zip`, `country` | string \| null | Flat address parts |
| `coordinates` | object \| null | `{ latitude, longitude }` |

#### Reputation
| Field | Type | Description |
|-------|------|-------------|
| `rating` | number \| null | Average stars (1–5) |
| `reviewCount` | number \| null | Total reviews |
| `priceRange` | string \| null | `$` – `$$$$` |
| `ratingDistribution` | object \| null | Star histogram (details mode) |
| `isClaimed` | boolean \| null | Profile claimed by owner |
| `isClosed` | boolean \| null | Permanently closed flag |

#### Operations & media (details mode)
| Field | Type | Description |
|-------|------|-------------|
| `hours` | object[] | Day, open, close, overnight |
| `isOpenNow` | boolean \| null | Computed open status |
| `amenities` | string[] | Highlights / amenities |
| `serviceArea`, `paymentMethods` | various | When available |
| `photoUrls`, `logoUrl`, `menuUrl` | string \| null | Media and menu links |
| `imageUrl` | string \| null | Primary listing image |

#### Meta (every row)
| Field | Type | Description |
|-------|------|-------------|
| `featureType` | string | Which mode produced the row — **filter on this** |
| `locale` | string | Region code (e.g. `US`) |
| `scrapedAt` | string | ISO-8601 collection time |
| `dataCompletenessScore` | number | 0–100 based on populated fields |

**Email is not on Yelp profiles.** Enable `includeEmailFromWebsite: true` to scan contact/about pages (bounded, no LLM).

---

### Input schema (for APIs, agents, and MCP tools)

**Rule:** Enable **one feature checkbox** per run (`enableBusinessSearch` is on by default). If multiple are checked, priority is: **Pipeline → Details → Reviews → Photos → Category → Scrape → Events → Search**.

#### Feature checkboxes

| Field | Default | Feature |
|-------|---------|---------|
| `enableBusinessSearch` | `true` | Keyword + location search |
| `enableBusinessDetails` | `false` | Full profiles for `/biz/...` URLs |
| `enableBusinessReviews` | `false` | Paginated reviews |
| `enableBusinessPhotos` | `false` | Photo galleries |
| `enableCategoryBrowse` | `false` | Category + location listings |
| `enableScrapeByUrl` | `false` | Any Yelp URL (auto-detect) |
| `enableEvents` | `false` | Event listings |
| `enableFullPipeline` | `false` | Search → enrich → optional reviews |

#### Global fields (all modes)

Console form order: **General → feature sections (checkbox each) → Contact enrichment → Result filters → Proxy (last)**. Region defaults to `US` (not exposed in the form).

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `maxItems` | integer | `10` | Fallback cap when a mode-specific limit is unset |
| `includeEmailFromWebsite` | boolean | `false` | Crawl business website for email |
| `emailMaxContactPages` | integer | `5` | Max pages per website (1–10) |
| `filterPreset` | enum | `"none"` | `lead_gen`, `seo_audit`, `high_rating`, or `custom` |
| `filterMinRating` / `filterMaxRating` | number | `0` / `5` | Post-scrape star filter |
| `filterRequirePhone` / `filterRequireWebsite` / `filterRequireEmail` | boolean | `false` | Require contact fields |
| `filterExcludeClosed` | boolean | `true` | Drop closed businesses |
| `filterMinCompletenessScore` | integer | `0` | Minimum 0–100 completeness |
| `proxyConfiguration` | object | residential US | Apify Proxy — **last in form**; use RESIDENTIAL for Yelp |

#### When `enableBusinessSearch` is true — Business Search

| Field | Type | Description |
|-------|------|-------------|
| `searchQueries` | string[] | `"keyword :: location"` e.g. `"dentists :: Miami, FL"` |
| `searchKeywords` + `searchLocations` | string[] | Cross-product alternative to `searchQueries` |
| `searchUrls` | string[] | Direct Yelp search URLs |
| `searchMaxResultsPerQuery` | integer | Max businesses per query |
| `searchMaxPages` | integer | SERP pages to crawl |
| `searchEnrichContacts` | boolean | Full Lead-Gen contact scrape per result |
| `searchSort`, `searchPrice`, `searchOpenNow`, … | various | Yelp-native SERP filters |

#### When `enableBusinessDetails` is true — Business Details

| Field | Type | Description |
|-------|------|-------------|
| `businessUrls` | string[] | `/biz/...` URLs |
| `businessAliases` | string[] | Slug IDs |
| `encBizIds` | string[] | Encoded business IDs |
| `includeHours`, `includeAmenities`, `includePhotos`, … | boolean | Toggle detail sections |

#### When `enableBusinessReviews` is true — Business Reviews

| Field | Type | Description |
|-------|------|-------------|
| `reviewsBusinessUrls` / `reviewsEncBizIds` | string[] | Target businesses |
| `reviewsMaxPerBusiness` | integer | Reviews per business |
| `reviewsSortBy` | enum | `DATE_DESC`, `RATING_DESC`, etc. |
| `reviewsFilterByRating` | number[] | Star subset |
| `reviewsIncludeBusinessContact` | boolean | Attach phone/website to each review row |

#### When `enableBusinessPhotos` is true — Business Photos

| Field | Type | Description |
|-------|------|-------------|
| `photosBusinessUrls` / `photosEncBizIds` | string[] | Target businesses |
| `photosMaxPerBusiness` | integer | Photo cap |
| `photosSortBy`, `photosCategory`, … | various | Gallery filters |

#### When `enableCategoryBrowse` is true — Category Browse

| Field | Type | Description |
|-------|------|-------------|
| `categoryNames` + `categoryLocation` | string / string[] | e.g. `"Plumbers"` + `"Denver, CO"` |
| `categoryUrls` | string[] | Direct category listing URLs |
| `categoryMaxBusinesses` | integer | Listing cap |
| `categoryEnrichContacts` | boolean | Lead-Gen contact per listing (slow) |

#### When `enableScrapeByUrl` is true — Scrape By URL

| Field | Type | Description |
|-------|------|-------------|
| `scrapeUrls` | string[] | Any Yelp URL (search, biz, reviews, photos, category, events) |
| `scrapeExtractType` | enum | `auto` (default) or force a page type |
| `scrapeMaxPages` | integer | Pagination for list pages |
| `scrapeInheritFeatureFilters` | boolean | Apply result filters to scraped lists |

#### When `enableEvents` is true — Events

| Field | Type | Description |
|-------|------|-------------|
| `eventsLocation` | string | City/region for event search |
| `eventsUrls` | string[] | Direct events listing URLs |
| `eventsMaxItems` | integer | Event cap |
| `eventsDateFrom` / `eventsDateTo` | string | Date range filters |

#### When `enableFullPipeline` is true — Full Pipeline

| Field | Type | Description |
|-------|------|-------------|
| `pipelineQueries` | string[] | `"keyword :: location"` queries |
| `pipelineMaxBusinesses` | integer | Total businesses to enrich |
| `pipelineFetchReviews` | boolean | Also scrape reviews per business |
| `pipelineIncludeEmail` | boolean | Email enrichment during pipeline |

---

### Output schema (dataset rows)

**Storage:** Default Apify dataset — **one JSON object per scraped item**.

**Required on every row:** `featureType`, `locale`, `scrapedAt`, `url`

#### `featureType` values — use this to route rows

| `featureType` | Enabled by | Row shape |
|---------------|------------|-----------|
| `business_search` | `enableBusinessSearch` | Profile core + `query`, `position`, `page`, `isAd` |
| `business_details` | `enableBusinessDetails`, `enableFullPipeline` | Profile core + `hours`, `amenities`, `socialLinks`, … |
| `business_reviews` | `enableBusinessReviews`, `enableFullPipeline` | Review fields + optional `businessName`, `businessPhone`, … |
| `business_photos` | `enableBusinessPhotos` | `photoId`, `caption`, `url`, linked business fields |
| `category_browse` | `enableCategoryBrowse` | Profile core + `category`, `categoryUrl`, `position` |
| `events` | `enableEvents` | `title`, `date`, `venue`, `description`, … |
| `scrape_by_url` | `enableScrapeByUrl` | Wrapper: `sourceUrl`, `detectedPageType`, nested `data` |

#### Dataset API views (append `?view=` to dataset URL)

| View | Purpose |
|------|---------|
| `overview` | All features — name, phone, email, rating, URL |
| `leads` | CRM export — contact + completeness score |
| `search` | SERP rows only |
| `details` | Full profiles only |
| `reviews` | Review text + linked business |
| `photos` | Photo URLs |
| `categories` | Category browse |
| `events` | Event listings |

**Apify API example:** `GET /v2/datasets/{id}/items?view=leads&format=json`

---

### Example inputs (copy-paste for agents)

#### Lead generation search
```json
{
  "enableBusinessSearch": true,
  "searchQueries": ["dentists :: Phoenix, AZ"],
  "searchMaxResultsPerQuery": 25,
  "searchEnrichContacts": true,
  "includeEmailFromWebsite": true,
  "filterPreset": "lead_gen",
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}
````

#### Full profile for one business

```json
{
  "enableBusinessSearch": false,
  "enableBusinessDetails": true,
  "businessUrls": ["https://www.yelp.com/biz/franklin-barbecue-austin"],
  "includeHours": true,
  "includeAmenities": true,
  "includeEmailFromWebsite": true
}
```

#### Reviews with business contact

```json
{
  "enableBusinessSearch": false,
  "enableBusinessReviews": true,
  "reviewsBusinessUrls": ["https://www.yelp.com/biz/franklin-barbecue-austin"],
  "reviewsMaxPerBusiness": 50,
  "reviewsSortBy": "DATE_DESC",
  "reviewsIncludeBusinessContact": true
}
```

#### Category mapping

```json
{
  "enableBusinessSearch": false,
  "enableCategoryBrowse": true,
  "categoryNames": ["Plumbers"],
  "categoryLocation": "Denver, CO",
  "categoryMaxBusinesses": 30,
  "filterMinRating": 4
}
```

#### One-shot pipeline

```json
{
  "enableBusinessSearch": false,
  "enableFullPipeline": true,
  "pipelineQueries": ["dentists :: Phoenix, AZ"],
  "pipelineMaxBusinesses": 20,
  "pipelineIncludeEmail": true,
  "pipelineFetchReviews": false
}
```

#### Scrape any Yelp URL

```json
{
  "enableBusinessSearch": false,
  "enableScrapeByUrl": true,
  "scrapeUrls": [
    "https://www.yelp.com/biz/example-business-city",
    "https://www.yelp.com/search?find_desc=coffee&find_loc=San+Francisco%2C+CA"
  ],
  "scrapeExtractType": "auto"
}
```

***

### How to run (Apify Console)

1. Open the Actor → **Start**
2. Check the **feature checkbox** you need — Business Search is on by default
3. Fill inputs for that mode only
4. Keep **Proxy → Residential (US)**
5. Run → export from **Leads** view or API

***

### Memory recommendations

| Profile | RAM | Typical workload |
|---------|-----|------------------|
| Light | 512 MB | Search ≤25, details ≤10, no email |
| Standard | 1024 MB | Search ≤100, email on ≤25 businesses |
| Heavy | 2048 MB | Large review dumps, email on 100+ businesses |

***

### Integrating with LLMs & MCP

**For tool-calling agents:**

1. **Enable one feature checkbox** — determines which input fields are required
2. **Validate required fields** per mode (see Input schema above)
3. **Read output** from dataset; filter `items` where `featureType` matches your mode
4. **Use `?view=leads`** when the agent needs contact columns only
5. **Use `dataCompletenessScore`** to rank rows for outreach quality

**Stable join keys:** `encBizId` or `bizId` or `url` across search → details → reviews runs (run modes separately, join in your warehouse).

**Do not** enable multiple modes in one run — use separate runs and merge downstream.

***

### Contact & custom projects

Need a custom scraper or a web app built? I take on custom work, including:

- **Web scraping / data extraction** — any site, any scale (search, detail pages, contact & lead enrichment, anti-bot handling, proxies)
- **Apify actors** — building, optimizing, or maintaining actors
- **Web apps** — full-stack builds of any kind (dashboards, APIs, automation, integrations)

Reach out and let's build it:

- **Email:** <dubem115@gmail.com>
- **GitHub:** [github.com/DrunkCodes](https://github.com/DrunkCodes)

# Actor input Schema

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

Fallback cap per feature when a feature-specific limit is not set.

## `enableBusinessSearch` (type: `boolean`):

Search Yelp by keyword and location.

## `searchQueries` (type: `array`):

Queries in "keyword :: location" format, e.g. "dentists :: Miami, FL".

## `searchKeywords` (type: `array`):

Alternative to searchQueries — combined with searchLocations.

## `searchLocations` (type: `array`):

Locations paired with searchKeywords (every keyword × every location).

## `searchUrls` (type: `array`):

Full Yelp search result URLs to scrape directly.

## `searchMaxResultsPerQuery` (type: `integer`):

Maximum businesses to return per query or URL (1–240).

## `searchPage` (type: `integer`):

First search results page to scrape (1-based).

## `searchMaxPages` (type: `integer`):

Number of search result pages to crawl per query.

## `searchSort` (type: `string`):

How Yelp sorts search results.

## `searchCategory` (type: `string`):

Yelp category slug or cflt code to restrict search results.

## `searchPrice` (type: `string`):

Filter by price tier.

## `searchOpenNow` (type: `boolean`):

Only show businesses open right now.

## `searchOpenAt` (type: `string`):

Filter businesses open at a specific time (HH:mm, 24-hour).

## `searchOpenOn` (type: `string`):

Filter businesses open on a specific day, e.g. Monday.

## `searchAttributes` (type: `array`):

Yelp attribute filters, e.g. hot\_and\_new, offers\_delivery, wheelchair\_accessible.

## `searchDistance` (type: `number`):

Search radius in miles. 0 = Yelp default.

## `searchRating` (type: `number`):

Yelp-native minimum rating filter (e.g. 4, 4.5). 0 = off.

## `searchEnrichContacts` (type: `boolean`):

Fetch full phone, website, and optional email for each search result via GraphQL/detail fetch.

## `searchIncludeSponsored` (type: `boolean`):

Include ad/sponsored rows in search output. Use Result filters → Exclude sponsored to drop them.

## `enableBusinessDetails` (type: `boolean`):

Scrape full contact profiles for specific business URLs.

## `businessUrls` (type: `array`):

Full Yelp /biz/... URLs to scrape.

## `businessAliases` (type: `array`):

Yelp business slug only, e.g. joes-pizza-brooklyn.

## `encBizIds` (type: `array`):

Yelp encBizId values for fastest GraphQL fetch.

## `includeHours` (type: `boolean`):

Include full weekly operating hours.

## `includeAmenities` (type: `boolean`):

Include amenities and highlights.

## `includePhotos` (type: `boolean`):

Include photo URLs on the details row (or use Business Photos feature).

## `includeMenu` (type: `boolean`):

Include menu URL and parseable menu items when available.

## `includeRatingDistribution` (type: `boolean`):

Include star rating histogram (1–5 stars).

## `includeSocialLinks` (type: `boolean`):

Include Facebook, Instagram, and other social links when listed.

## `includeServiceArea` (type: `boolean`):

Include service area for contractors and mobile businesses.

## `includePaymentMethods` (type: `boolean`):

Include accepted payment types when listed.

## `detailsIncludeEmailFromWebsite` (type: `boolean`):

Override global email enrichment setting for Business Details only.

## `enableBusinessReviews` (type: `boolean`):

Scrape paginated customer reviews for specific businesses.

## `reviewsEncBizIds` (type: `array`):

Encoded business IDs to fetch reviews for.

## `reviewsBusinessUrls` (type: `array`):

Yelp /biz/... URLs to fetch reviews for.

## `reviewsMaxPerBusiness` (type: `integer`):

Maximum reviews to collect per business (1–500).

## `reviewsSortBy` (type: `string`):

How Yelp sorts reviews.

## `reviewsFilterByRating` (type: `array`):

Subset of star ratings to fetch (1–5). Default: all stars.

## `reviewsLanguage` (type: `string`):

Language code for reviews.

## `reviewsMinConfidence` (type: `string`):

Yelp review confidence level filter.

## `reviewsDateFrom` (type: `string`):

ISO date — skip reviews older than this (post-scrape filter).

## `reviewsDateTo` (type: `string`):

ISO date — skip reviews newer than this (post-scrape filter).

## `reviewsMinWordCount` (type: `integer`):

Skip reviews shorter than this many words.

## `reviewsKeywordsInclude` (type: `array`):

Keep reviews whose body contains any of these keywords.

## `reviewsKeywordsExclude` (type: `array`):

Drop reviews whose body contains any of these keywords.

## `reviewsEliteOnly` (type: `boolean`):

Only keep reviews from Yelp Elite reviewers.

## `reviewsWithPhotosOnly` (type: `boolean`):

Only keep reviews that include photos.

## `reviewsWithTextOnly` (type: `boolean`):

Drop rating-only reviews with no text body.

## `reviewsMinRating` (type: `integer`):

Post-scrape filter: minimum star rating per review. 0 = off.

## `reviewsMaxRating` (type: `integer`):

Post-scrape filter: maximum star rating per review. 5 = off.

## `reviewsIncludeBusinessContact` (type: `boolean`):

Include business name, phone, website, and rating on each review row.

## `enableBusinessPhotos` (type: `boolean`):

Scrape photo URLs and captions for specific businesses.

## `photosEncBizIds` (type: `array`):

Encoded business IDs to fetch photos for.

## `photosBusinessUrls` (type: `array`):

Yelp /biz/... URLs to fetch photos for.

## `photosMaxPerBusiness` (type: `integer`):

Maximum photos to collect per business (1–100).

## `photosSortBy` (type: `string`):

How to sort photos.

## `photosDateFrom` (type: `string`):

Upload date lower bound (ISO date).

## `photosDateTo` (type: `string`):

Upload date upper bound (ISO date).

## `photosCategory` (type: `string`):

Filter photos by category.

## `photosWithCaptionOnly` (type: `boolean`):

Only keep photos that have a caption.

## `photosIncludeUserInfo` (type: `boolean`):

Include photographer name and profile URL when available.

## `photosIncludeBusinessContact` (type: `boolean`):

Include business name and phone on each photo row.

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

Paste any Yelp URL — search, business, reviews, photos, category, or events.

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

Yelp URLs to scrape when Scrape By URL is enabled.

## `scrapeExtractType` (type: `string`):

Force extraction type or use auto-detection.

## `scrapeMaxPages` (type: `integer`):

Maximum pages to crawl for paginated list URLs.

## `scrapeInheritFeatureFilters` (type: `boolean`):

Apply relevant filters from other sections based on detected page type.

## `enableCategoryBrowse` (type: `boolean`):

List businesses in a Yelp category for a location.

## `categoryUrls` (type: `array`):

Full Yelp category page URLs.

## `categoryNames` (type: `array`):

Category names, e.g. Plumbers, Coffee & Tea. Requires categoryLocation.

## `categoryLocation` (type: `string`):

Location for categoryNames searches, e.g. Denver, CO.

## `categoryMaxBusinesses` (type: `integer`):

Maximum businesses to return per category (1–240).

## `categorySort` (type: `string`):

How Yelp sorts category results.

## `categoryPrice` (type: `string`):

Filter by price tier.

## `categoryOpenNow` (type: `boolean`):

Only show businesses open right now.

## `categoryAttributes` (type: `array`):

Yelp attribute filters for category browse.

## `categoryDistance` (type: `number`):

Search radius in miles. 0 = Yelp default.

## `categoryRating` (type: `number`):

Yelp-native minimum rating filter. 0 = off.

## `categoryEnrichContacts` (type: `boolean`):

Fetch full phone, website, and optional email for each category result.

## `categoryIncludeSubcategories` (type: `boolean`):

Drill into subcategories when the category URL supports it.

## `enableEvents` (type: `boolean`):

Scrape Yelp event listings by location or URL.

## `eventsLocation` (type: `string`):

City or region to search for events.

## `eventsUrls` (type: `array`):

Direct Yelp event page URLs.

## `eventsMaxItems` (type: `integer`):

Maximum events to collect.

## `eventsDateFrom` (type: `string`):

ISO date — skip events before this date.

## `eventsDateTo` (type: `string`):

ISO date — skip events after this date.

## `eventsFreeOnly` (type: `boolean`):

Only keep free events.

## `eventsCategory` (type: `string`):

Filter by event category, e.g. Music, Food.

## `eventsSortBy` (type: `string`):

How to sort events.

## `eventsKeywordsInclude` (type: `array`):

Keep events whose title or description contains any keyword.

## `enableFullPipeline` (type: `boolean`):

One-shot lead gen: search, enrich contacts, optionally fetch reviews.

## `pipelineQueries` (type: `array`):

Queries in "keyword :: location" format for the pipeline.

## `pipelineMaxBusinesses` (type: `integer`):

Maximum total businesses in the pipeline run.

## `pipelineFetchReviews` (type: `boolean`):

Scrape reviews for each business after enrichment.

## `pipelineReviewsMax` (type: `integer`):

Maximum reviews per business when pipeline reviews are enabled.

## `pipelineIncludeEmail` (type: `boolean`):

Enable website email enrichment during the pipeline.

## `includeEmailFromWebsite` (type: `boolean`):

When enabled, visit the business website (contact/about pages) to find an email address. Email is not listed on Yelp profiles.

## `emailMaxContactPages` (type: `integer`):

Maximum pages to fetch per business website when email enrichment is enabled (1–10).

## `emailTimeoutSeconds` (type: `integer`):

Per-website timeout for email enrichment requests.

## `filterPreset` (type: `string`):

Apply a named filter preset. Explicit fields below override preset values when set.

## `filterMinRating` (type: `number`):

Skip businesses below this star rating. 0 = off.

## `filterMaxRating` (type: `number`):

Skip businesses above this star rating. 5 = off.

## `filterMinReviewCount` (type: `integer`):

Skip businesses with fewer reviews than this. 0 = off.

## `filterMaxReviewCount` (type: `integer`):

Skip businesses with more reviews than this. 0 = no maximum.

## `filterRequirePhone` (type: `boolean`):

Only keep businesses that have a phone number.

## `filterRequireWebsite` (type: `boolean`):

Only keep businesses that have a website URL.

## `filterRequireEmail` (type: `boolean`):

Only keep businesses with an email (after website enrichment if enabled).

## `filterExcludeClosed` (type: `boolean`):

Drop businesses marked as permanently closed on Yelp.

## `filterExcludeAds` (type: `boolean`):

Drop sponsored/ad rows from search and category browse results.

## `filterCategoriesInclude` (type: `array`):

Keep only businesses matching any of these categories (case-insensitive). Empty = all.

## `filterCategoriesExclude` (type: `array`):

Drop businesses matching any of these categories (case-insensitive).

## `filterMinCompletenessScore` (type: `integer`):

Minimum dataCompletenessScore (0–100) required to keep a business row. 0 = off.

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

Use Apify Proxy with US Residential for best results on Yelp. Leave the default unless you know you need something else.

## Actor input object example

```json
{
  "maxItems": 10,
  "enableBusinessSearch": true,
  "searchQueries": [
    "dentists :: Miami, FL"
  ],
  "searchKeywords": [],
  "searchLocations": [],
  "searchUrls": [],
  "searchMaxResultsPerQuery": 10,
  "searchPage": 1,
  "searchMaxPages": 1,
  "searchSort": "recommended",
  "searchCategory": "",
  "searchPrice": "",
  "searchOpenNow": false,
  "searchOpenAt": "",
  "searchOpenOn": "",
  "searchAttributes": [],
  "searchDistance": 0,
  "searchRating": 0,
  "searchEnrichContacts": false,
  "searchIncludeSponsored": true,
  "enableBusinessDetails": false,
  "businessUrls": [],
  "businessAliases": [],
  "encBizIds": [],
  "includeHours": true,
  "includeAmenities": true,
  "includePhotos": false,
  "includeMenu": false,
  "includeRatingDistribution": true,
  "includeSocialLinks": true,
  "includeServiceArea": false,
  "includePaymentMethods": false,
  "detailsIncludeEmailFromWebsite": false,
  "enableBusinessReviews": false,
  "reviewsEncBizIds": [],
  "reviewsBusinessUrls": [],
  "reviewsMaxPerBusiness": 10,
  "reviewsSortBy": "DATE_DESC",
  "reviewsFilterByRating": [
    5,
    4,
    3,
    2,
    1
  ],
  "reviewsLanguage": "en",
  "reviewsMinConfidence": "HIGH_CONFIDENCE",
  "reviewsDateFrom": "",
  "reviewsDateTo": "",
  "reviewsMinWordCount": 0,
  "reviewsKeywordsInclude": [],
  "reviewsKeywordsExclude": [],
  "reviewsEliteOnly": false,
  "reviewsWithPhotosOnly": false,
  "reviewsWithTextOnly": true,
  "reviewsMinRating": 0,
  "reviewsMaxRating": 5,
  "reviewsIncludeBusinessContact": true,
  "enableBusinessPhotos": false,
  "photosEncBizIds": [],
  "photosBusinessUrls": [],
  "photosMaxPerBusiness": 20,
  "photosSortBy": "newest",
  "photosDateFrom": "",
  "photosDateTo": "",
  "photosCategory": "",
  "photosWithCaptionOnly": false,
  "photosIncludeUserInfo": false,
  "photosIncludeBusinessContact": true,
  "enableScrapeByUrl": false,
  "scrapeUrls": [],
  "scrapeExtractType": "auto",
  "scrapeMaxPages": 1,
  "scrapeInheritFeatureFilters": true,
  "enableCategoryBrowse": false,
  "categoryUrls": [],
  "categoryNames": [],
  "categoryLocation": "",
  "categoryMaxBusinesses": 50,
  "categorySort": "recommended",
  "categoryPrice": "",
  "categoryOpenNow": false,
  "categoryAttributes": [],
  "categoryDistance": 0,
  "categoryRating": 0,
  "categoryEnrichContacts": false,
  "categoryIncludeSubcategories": true,
  "enableEvents": false,
  "eventsLocation": "",
  "eventsUrls": [],
  "eventsMaxItems": 20,
  "eventsDateFrom": "",
  "eventsDateTo": "",
  "eventsFreeOnly": false,
  "eventsCategory": "",
  "eventsSortBy": "date",
  "eventsKeywordsInclude": [],
  "enableFullPipeline": false,
  "pipelineQueries": [],
  "pipelineMaxBusinesses": 50,
  "pipelineFetchReviews": false,
  "pipelineReviewsMax": 5,
  "pipelineIncludeEmail": true,
  "includeEmailFromWebsite": false,
  "emailMaxContactPages": 5,
  "emailTimeoutSeconds": 15,
  "filterPreset": "none",
  "filterMinRating": 0,
  "filterMaxRating": 5,
  "filterMinReviewCount": 0,
  "filterMaxReviewCount": 0,
  "filterRequirePhone": false,
  "filterRequireWebsite": false,
  "filterRequireEmail": false,
  "filterExcludeClosed": true,
  "filterExcludeAds": false,
  "filterCategoriesInclude": [],
  "filterCategoriesExclude": [],
  "filterMinCompletenessScore": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

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

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

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

Compact table — feature type, name, phone, email, rating, reviews, and URL.

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

Contact-focused business rows for lead generation and CRM export.

## `search` (type: `string`):

Search result rows only (featureType = business\_search).

## `details` (type: `string`):

Business detail page rows (featureType = business\_details).

## `reviews` (type: `string`):

Customer review rows (featureType = business\_reviews).

## `photos` (type: `string`):

Photo rows (featureType = business\_photos).

## `categories` (type: `string`):

Category browse rows (featureType = category\_browse).

## `events` (type: `string`):

Event listing rows (featureType = events).

# 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 = {
    "searchQueries": [
        "dentists :: Miami, FL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_leads/yelp-real-time-data").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 = { "searchQueries": ["dentists :: Miami, FL"] }

# Run the Actor and wait for it to finish
run = client.actor("b2b_leads/yelp-real-time-data").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 '{
  "searchQueries": [
    "dentists :: Miami, FL"
  ]
}' |
apify call b2b_leads/yelp-real-time-data --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=b2b_leads/yelp-real-time-data",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yelp Real-Time Data — Business Scraper & Lead Extractor",
        "description": "Real-time Yelp scraper for business search, details, reviews & contact enrichment (phone, website, email). Reliable, proxy-ready, LLM/MCP-friendly. Export leads to JSON, CSV, or Excel.",
        "version": "0.0",
        "x-build-id": "31uRi62wXTNiJz4W5"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/b2b_leads~yelp-real-time-data/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-b2b_leads-yelp-real-time-data",
                "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/b2b_leads~yelp-real-time-data/runs": {
            "post": {
                "operationId": "runs-sync-b2b_leads-yelp-real-time-data",
                "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/b2b_leads~yelp-real-time-data/run-sync": {
            "post": {
                "operationId": "run-sync-b2b_leads-yelp-real-time-data",
                "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": {
                    "maxItems": {
                        "title": "Default max items per feature",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Fallback cap per feature when a feature-specific limit is not set.",
                        "default": 10
                    },
                    "enableBusinessSearch": {
                        "title": "Business Search",
                        "type": "boolean",
                        "description": "Search Yelp by keyword and location.",
                        "default": true
                    },
                    "searchQueries": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "Queries in \"keyword :: location\" format, e.g. \"dentists :: Miami, FL\".",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchKeywords": {
                        "title": "Search keywords (cross-product)",
                        "type": "array",
                        "description": "Alternative to searchQueries — combined with searchLocations.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchLocations": {
                        "title": "Search locations (cross-product)",
                        "type": "array",
                        "description": "Locations paired with searchKeywords (every keyword × every location).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchUrls": {
                        "title": "Direct search URLs",
                        "type": "array",
                        "description": "Full Yelp search result URLs to scrape directly.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchMaxResultsPerQuery": {
                        "title": "Max results per query",
                        "minimum": 1,
                        "maximum": 240,
                        "type": "integer",
                        "description": "Maximum businesses to return per query or URL (1–240).",
                        "default": 10
                    },
                    "searchPage": {
                        "title": "Start page",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "First search results page to scrape (1-based).",
                        "default": 1
                    },
                    "searchMaxPages": {
                        "title": "Max pages per query",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Number of search result pages to crawl per query.",
                        "default": 1
                    },
                    "searchSort": {
                        "title": "Sort order",
                        "enum": [
                            "recommended",
                            "rating",
                            "review_count",
                            "distance"
                        ],
                        "type": "string",
                        "description": "How Yelp sorts search results.",
                        "default": "recommended"
                    },
                    "searchCategory": {
                        "title": "Category filter",
                        "type": "string",
                        "description": "Yelp category slug or cflt code to restrict search results.",
                        "default": ""
                    },
                    "searchPrice": {
                        "title": "Price range",
                        "enum": [
                            "",
                            "$",
                            "$$",
                            "$$$",
                            "$$$$"
                        ],
                        "type": "string",
                        "description": "Filter by price tier.",
                        "default": ""
                    },
                    "searchOpenNow": {
                        "title": "Open now",
                        "type": "boolean",
                        "description": "Only show businesses open right now.",
                        "default": false
                    },
                    "searchOpenAt": {
                        "title": "Open at time",
                        "type": "string",
                        "description": "Filter businesses open at a specific time (HH:mm, 24-hour).",
                        "default": ""
                    },
                    "searchOpenOn": {
                        "title": "Open on day",
                        "type": "string",
                        "description": "Filter businesses open on a specific day, e.g. Monday.",
                        "default": ""
                    },
                    "searchAttributes": {
                        "title": "Business attributes",
                        "type": "array",
                        "description": "Yelp attribute filters, e.g. hot_and_new, offers_delivery, wheelchair_accessible.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchDistance": {
                        "title": "Distance radius (miles)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Search radius in miles. 0 = Yelp default.",
                        "default": 0
                    },
                    "searchRating": {
                        "title": "Minimum Yelp rating filter",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Yelp-native minimum rating filter (e.g. 4, 4.5). 0 = off.",
                        "default": 0
                    },
                    "searchEnrichContacts": {
                        "title": "Enrich contacts from detail pages",
                        "type": "boolean",
                        "description": "Fetch full phone, website, and optional email for each search result via GraphQL/detail fetch.",
                        "default": false
                    },
                    "searchIncludeSponsored": {
                        "title": "Include sponsored results",
                        "type": "boolean",
                        "description": "Include ad/sponsored rows in search output. Use Result filters → Exclude sponsored to drop them.",
                        "default": true
                    },
                    "enableBusinessDetails": {
                        "title": "Business Details",
                        "type": "boolean",
                        "description": "Scrape full contact profiles for specific business URLs.",
                        "default": false
                    },
                    "businessUrls": {
                        "title": "Business URLs",
                        "type": "array",
                        "description": "Full Yelp /biz/... URLs to scrape.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "businessAliases": {
                        "title": "Business aliases (slugs)",
                        "type": "array",
                        "description": "Yelp business slug only, e.g. joes-pizza-brooklyn.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "encBizIds": {
                        "title": "Encoded business IDs",
                        "type": "array",
                        "description": "Yelp encBizId values for fastest GraphQL fetch.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeHours": {
                        "title": "Include hours",
                        "type": "boolean",
                        "description": "Include full weekly operating hours.",
                        "default": true
                    },
                    "includeAmenities": {
                        "title": "Include amenities",
                        "type": "boolean",
                        "description": "Include amenities and highlights.",
                        "default": true
                    },
                    "includePhotos": {
                        "title": "Include inline photos",
                        "type": "boolean",
                        "description": "Include photo URLs on the details row (or use Business Photos feature).",
                        "default": false
                    },
                    "includeMenu": {
                        "title": "Include menu",
                        "type": "boolean",
                        "description": "Include menu URL and parseable menu items when available.",
                        "default": false
                    },
                    "includeRatingDistribution": {
                        "title": "Include rating distribution",
                        "type": "boolean",
                        "description": "Include star rating histogram (1–5 stars).",
                        "default": true
                    },
                    "includeSocialLinks": {
                        "title": "Include social links",
                        "type": "boolean",
                        "description": "Include Facebook, Instagram, and other social links when listed.",
                        "default": true
                    },
                    "includeServiceArea": {
                        "title": "Include service area",
                        "type": "boolean",
                        "description": "Include service area for contractors and mobile businesses.",
                        "default": false
                    },
                    "includePaymentMethods": {
                        "title": "Include payment methods",
                        "type": "boolean",
                        "description": "Include accepted payment types when listed.",
                        "default": false
                    },
                    "detailsIncludeEmailFromWebsite": {
                        "title": "Enrich email (Details only override)",
                        "type": "boolean",
                        "description": "Override global email enrichment setting for Business Details only.",
                        "default": false
                    },
                    "enableBusinessReviews": {
                        "title": "Business Reviews",
                        "type": "boolean",
                        "description": "Scrape paginated customer reviews for specific businesses.",
                        "default": false
                    },
                    "reviewsEncBizIds": {
                        "title": "Review business IDs (encBizId)",
                        "type": "array",
                        "description": "Encoded business IDs to fetch reviews for.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "reviewsBusinessUrls": {
                        "title": "Review business URLs",
                        "type": "array",
                        "description": "Yelp /biz/... URLs to fetch reviews for.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "reviewsMaxPerBusiness": {
                        "title": "Max reviews per business",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum reviews to collect per business (1–500).",
                        "default": 10
                    },
                    "reviewsSortBy": {
                        "title": "Review sort",
                        "enum": [
                            "DATE_DESC",
                            "DATE_ASC",
                            "RATING_DESC",
                            "RATING_ASC",
                            "ELITE",
                            "LOWEST_RATED"
                        ],
                        "type": "string",
                        "description": "How Yelp sorts reviews.",
                        "default": "DATE_DESC"
                    },
                    "reviewsFilterByRating": {
                        "title": "Star ratings to include",
                        "type": "array",
                        "description": "Subset of star ratings to fetch (1–5). Default: all stars.",
                        "default": [
                            5,
                            4,
                            3,
                            2,
                            1
                        ]
                    },
                    "reviewsLanguage": {
                        "title": "Review language",
                        "type": "string",
                        "description": "Language code for reviews.",
                        "default": "en"
                    },
                    "reviewsMinConfidence": {
                        "title": "Minimum confidence",
                        "enum": [
                            "HIGH_CONFIDENCE",
                            "LOW_CONFIDENCE"
                        ],
                        "type": "string",
                        "description": "Yelp review confidence level filter.",
                        "default": "HIGH_CONFIDENCE"
                    },
                    "reviewsDateFrom": {
                        "title": "Reviews from date",
                        "type": "string",
                        "description": "ISO date — skip reviews older than this (post-scrape filter).",
                        "default": ""
                    },
                    "reviewsDateTo": {
                        "title": "Reviews to date",
                        "type": "string",
                        "description": "ISO date — skip reviews newer than this (post-scrape filter).",
                        "default": ""
                    },
                    "reviewsMinWordCount": {
                        "title": "Minimum word count",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip reviews shorter than this many words.",
                        "default": 0
                    },
                    "reviewsKeywordsInclude": {
                        "title": "Keywords to include",
                        "type": "array",
                        "description": "Keep reviews whose body contains any of these keywords.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "reviewsKeywordsExclude": {
                        "title": "Keywords to exclude",
                        "type": "array",
                        "description": "Drop reviews whose body contains any of these keywords.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "reviewsEliteOnly": {
                        "title": "Elite reviewers only",
                        "type": "boolean",
                        "description": "Only keep reviews from Yelp Elite reviewers.",
                        "default": false
                    },
                    "reviewsWithPhotosOnly": {
                        "title": "Reviews with photos only",
                        "type": "boolean",
                        "description": "Only keep reviews that include photos.",
                        "default": false
                    },
                    "reviewsWithTextOnly": {
                        "title": "Reviews with text only",
                        "type": "boolean",
                        "description": "Drop rating-only reviews with no text body.",
                        "default": true
                    },
                    "reviewsMinRating": {
                        "title": "Per-review minimum stars",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Post-scrape filter: minimum star rating per review. 0 = off.",
                        "default": 0
                    },
                    "reviewsMaxRating": {
                        "title": "Per-review maximum stars",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Post-scrape filter: maximum star rating per review. 5 = off.",
                        "default": 5
                    },
                    "reviewsIncludeBusinessContact": {
                        "title": "Attach business contact to each review",
                        "type": "boolean",
                        "description": "Include business name, phone, website, and rating on each review row.",
                        "default": true
                    },
                    "enableBusinessPhotos": {
                        "title": "Business Photos",
                        "type": "boolean",
                        "description": "Scrape photo URLs and captions for specific businesses.",
                        "default": false
                    },
                    "photosEncBizIds": {
                        "title": "Photo business IDs (encBizId)",
                        "type": "array",
                        "description": "Encoded business IDs to fetch photos for.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "photosBusinessUrls": {
                        "title": "Photo business URLs",
                        "type": "array",
                        "description": "Yelp /biz/... URLs to fetch photos for.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "photosMaxPerBusiness": {
                        "title": "Max photos per business",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum photos to collect per business (1–100).",
                        "default": 20
                    },
                    "photosSortBy": {
                        "title": "Photo sort",
                        "enum": [
                            "newest",
                            "oldest",
                            "highest_rated"
                        ],
                        "type": "string",
                        "description": "How to sort photos.",
                        "default": "newest"
                    },
                    "photosDateFrom": {
                        "title": "Photos from date",
                        "type": "string",
                        "description": "Upload date lower bound (ISO date).",
                        "default": ""
                    },
                    "photosDateTo": {
                        "title": "Photos to date",
                        "type": "string",
                        "description": "Upload date upper bound (ISO date).",
                        "default": ""
                    },
                    "photosCategory": {
                        "title": "Photo category",
                        "enum": [
                            "",
                            "food",
                            "menu",
                            "inside",
                            "outside",
                            "all"
                        ],
                        "type": "string",
                        "description": "Filter photos by category.",
                        "default": ""
                    },
                    "photosWithCaptionOnly": {
                        "title": "Photos with caption only",
                        "type": "boolean",
                        "description": "Only keep photos that have a caption.",
                        "default": false
                    },
                    "photosIncludeUserInfo": {
                        "title": "Include photographer info",
                        "type": "boolean",
                        "description": "Include photographer name and profile URL when available.",
                        "default": false
                    },
                    "photosIncludeBusinessContact": {
                        "title": "Attach business contact to each photo",
                        "type": "boolean",
                        "description": "Include business name and phone on each photo row.",
                        "default": true
                    },
                    "enableScrapeByUrl": {
                        "title": "Scrape By URL",
                        "type": "boolean",
                        "description": "Paste any Yelp URL — search, business, reviews, photos, category, or events.",
                        "default": false
                    },
                    "scrapeUrls": {
                        "title": "Yelp URLs",
                        "type": "array",
                        "description": "Yelp URLs to scrape when Scrape By URL is enabled.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "scrapeExtractType": {
                        "title": "Extract type",
                        "enum": [
                            "auto",
                            "search",
                            "business",
                            "reviews",
                            "photos",
                            "category",
                            "events"
                        ],
                        "type": "string",
                        "description": "Force extraction type or use auto-detection.",
                        "default": "auto"
                    },
                    "scrapeMaxPages": {
                        "title": "Max pages",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum pages to crawl for paginated list URLs.",
                        "default": 1
                    },
                    "scrapeInheritFeatureFilters": {
                        "title": "Inherit feature filters",
                        "type": "boolean",
                        "description": "Apply relevant filters from other sections based on detected page type.",
                        "default": true
                    },
                    "enableCategoryBrowse": {
                        "title": "Category Browse",
                        "type": "boolean",
                        "description": "List businesses in a Yelp category for a location.",
                        "default": false
                    },
                    "categoryUrls": {
                        "title": "Category URLs",
                        "type": "array",
                        "description": "Full Yelp category page URLs.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "categoryNames": {
                        "title": "Category names",
                        "type": "array",
                        "description": "Category names, e.g. Plumbers, Coffee & Tea. Requires categoryLocation.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "categoryLocation": {
                        "title": "Category location",
                        "type": "string",
                        "description": "Location for categoryNames searches, e.g. Denver, CO.",
                        "default": ""
                    },
                    "categoryMaxBusinesses": {
                        "title": "Max businesses",
                        "minimum": 1,
                        "maximum": 240,
                        "type": "integer",
                        "description": "Maximum businesses to return per category (1–240).",
                        "default": 50
                    },
                    "categorySort": {
                        "title": "Sort order",
                        "enum": [
                            "recommended",
                            "rating",
                            "review_count",
                            "distance"
                        ],
                        "type": "string",
                        "description": "How Yelp sorts category results.",
                        "default": "recommended"
                    },
                    "categoryPrice": {
                        "title": "Price range",
                        "enum": [
                            "",
                            "$",
                            "$$",
                            "$$$",
                            "$$$$"
                        ],
                        "type": "string",
                        "description": "Filter by price tier.",
                        "default": ""
                    },
                    "categoryOpenNow": {
                        "title": "Open now",
                        "type": "boolean",
                        "description": "Only show businesses open right now.",
                        "default": false
                    },
                    "categoryAttributes": {
                        "title": "Business attributes",
                        "type": "array",
                        "description": "Yelp attribute filters for category browse.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "categoryDistance": {
                        "title": "Distance radius (miles)",
                        "minimum": 0,
                        "type": "number",
                        "description": "Search radius in miles. 0 = Yelp default.",
                        "default": 0
                    },
                    "categoryRating": {
                        "title": "Minimum Yelp rating filter",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Yelp-native minimum rating filter. 0 = off.",
                        "default": 0
                    },
                    "categoryEnrichContacts": {
                        "title": "Enrich contacts from detail pages",
                        "type": "boolean",
                        "description": "Fetch full phone, website, and optional email for each category result.",
                        "default": false
                    },
                    "categoryIncludeSubcategories": {
                        "title": "Include subcategories",
                        "type": "boolean",
                        "description": "Drill into subcategories when the category URL supports it.",
                        "default": true
                    },
                    "enableEvents": {
                        "title": "Events",
                        "type": "boolean",
                        "description": "Scrape Yelp event listings by location or URL.",
                        "default": false
                    },
                    "eventsLocation": {
                        "title": "Events location",
                        "type": "string",
                        "description": "City or region to search for events.",
                        "default": ""
                    },
                    "eventsUrls": {
                        "title": "Event URLs",
                        "type": "array",
                        "description": "Direct Yelp event page URLs.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "eventsMaxItems": {
                        "title": "Max events",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum events to collect.",
                        "default": 20
                    },
                    "eventsDateFrom": {
                        "title": "Events from date",
                        "type": "string",
                        "description": "ISO date — skip events before this date.",
                        "default": ""
                    },
                    "eventsDateTo": {
                        "title": "Events to date",
                        "type": "string",
                        "description": "ISO date — skip events after this date.",
                        "default": ""
                    },
                    "eventsFreeOnly": {
                        "title": "Free events only",
                        "type": "boolean",
                        "description": "Only keep free events.",
                        "default": false
                    },
                    "eventsCategory": {
                        "title": "Event category",
                        "type": "string",
                        "description": "Filter by event category, e.g. Music, Food.",
                        "default": ""
                    },
                    "eventsSortBy": {
                        "title": "Event sort",
                        "enum": [
                            "date",
                            "popular",
                            "distance"
                        ],
                        "type": "string",
                        "description": "How to sort events.",
                        "default": "date"
                    },
                    "eventsKeywordsInclude": {
                        "title": "Keywords to include",
                        "type": "array",
                        "description": "Keep events whose title or description contains any keyword.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "enableFullPipeline": {
                        "title": "Full Pipeline (Search → Enrich → Reviews)",
                        "type": "boolean",
                        "description": "One-shot lead gen: search, enrich contacts, optionally fetch reviews.",
                        "default": false
                    },
                    "pipelineQueries": {
                        "title": "Pipeline queries",
                        "type": "array",
                        "description": "Queries in \"keyword :: location\" format for the pipeline.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "pipelineMaxBusinesses": {
                        "title": "Max businesses",
                        "minimum": 1,
                        "maximum": 240,
                        "type": "integer",
                        "description": "Maximum total businesses in the pipeline run.",
                        "default": 50
                    },
                    "pipelineFetchReviews": {
                        "title": "Also fetch reviews",
                        "type": "boolean",
                        "description": "Scrape reviews for each business after enrichment.",
                        "default": false
                    },
                    "pipelineReviewsMax": {
                        "title": "Reviews per business",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum reviews per business when pipeline reviews are enabled.",
                        "default": 5
                    },
                    "pipelineIncludeEmail": {
                        "title": "Include email enrichment",
                        "type": "boolean",
                        "description": "Enable website email enrichment during the pipeline.",
                        "default": true
                    },
                    "includeEmailFromWebsite": {
                        "title": "Enrich email from business website",
                        "type": "boolean",
                        "description": "When enabled, visit the business website (contact/about pages) to find an email address. Email is not listed on Yelp profiles.",
                        "default": false
                    },
                    "emailMaxContactPages": {
                        "title": "Max website pages to scan",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum pages to fetch per business website when email enrichment is enabled (1–10).",
                        "default": 5
                    },
                    "emailTimeoutSeconds": {
                        "title": "Website timeout (seconds)",
                        "minimum": 5,
                        "maximum": 60,
                        "type": "integer",
                        "description": "Per-website timeout for email enrichment requests.",
                        "default": 15
                    },
                    "filterPreset": {
                        "title": "Filter preset",
                        "enum": [
                            "none",
                            "lead_gen",
                            "seo_audit",
                            "high_rating",
                            "custom"
                        ],
                        "type": "string",
                        "description": "Apply a named filter preset. Explicit fields below override preset values when set.",
                        "default": "none"
                    },
                    "filterMinRating": {
                        "title": "Minimum rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Skip businesses below this star rating. 0 = off.",
                        "default": 0
                    },
                    "filterMaxRating": {
                        "title": "Maximum rating",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Skip businesses above this star rating. 5 = off.",
                        "default": 5
                    },
                    "filterMinReviewCount": {
                        "title": "Minimum review count",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip businesses with fewer reviews than this. 0 = off.",
                        "default": 0
                    },
                    "filterMaxReviewCount": {
                        "title": "Maximum review count",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Skip businesses with more reviews than this. 0 = no maximum.",
                        "default": 0
                    },
                    "filterRequirePhone": {
                        "title": "Require phone number",
                        "type": "boolean",
                        "description": "Only keep businesses that have a phone number.",
                        "default": false
                    },
                    "filterRequireWebsite": {
                        "title": "Require website",
                        "type": "boolean",
                        "description": "Only keep businesses that have a website URL.",
                        "default": false
                    },
                    "filterRequireEmail": {
                        "title": "Require email",
                        "type": "boolean",
                        "description": "Only keep businesses with an email (after website enrichment if enabled).",
                        "default": false
                    },
                    "filterExcludeClosed": {
                        "title": "Exclude permanently closed",
                        "type": "boolean",
                        "description": "Drop businesses marked as permanently closed on Yelp.",
                        "default": true
                    },
                    "filterExcludeAds": {
                        "title": "Exclude sponsored results",
                        "type": "boolean",
                        "description": "Drop sponsored/ad rows from search and category browse results.",
                        "default": false
                    },
                    "filterCategoriesInclude": {
                        "title": "Categories to include",
                        "type": "array",
                        "description": "Keep only businesses matching any of these categories (case-insensitive). Empty = all.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "filterCategoriesExclude": {
                        "title": "Categories to exclude",
                        "type": "array",
                        "description": "Drop businesses matching any of these categories (case-insensitive).",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "filterMinCompletenessScore": {
                        "title": "Minimum data completeness score",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Minimum dataCompletenessScore (0–100) required to keep a business row. 0 = off.",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy settings",
                        "type": "object",
                        "description": "Use Apify Proxy with US Residential for best results on Yelp. Leave the default unless you know you need something else.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
