# Yelp Reviews Scraper - Sentiment, Topics, Competitor Delta (`seibs.co/yelp-reviews-pro`) Actor

Bulk Yelp review scraper with per-review sentiment, topic clusters (food, service, wait, value, parking), responder tracking, 12-month trend and competitor delta. LLM-ready JSON for reputation, local SEO and chain ops teams.

- **URL**: https://apify.com/seibs.co/yelp-reviews-pro.md
- **Developed by:** [Seibs.co](https://apify.com/seibs.co) (community)
- **Categories:** Business, Marketing, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 business summaries

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 Reviews Pro

<!-- TOP-SELL-START -->
> **TL;DR for local SEO agencies, multi-unit franchise managers, and reputation-management teams:** Pulls Yelp reviews for one or many businesses with built-in sentiment, 9-topic clustering, owner-response tracking, 12-month trend label, and pairwise competitor delta. Compared to a generic Yelp scraper, you get an intelligence layer on top (sentiment with negation handling, topic tags, response-gap metric, competitor delta, and an llm_ready Markdown summary mode for AI agents). Free Apify plan covers small business-input runs on your $5 platform credit. PPE charges scale per review. Upgrade to Apify Starter ($49/mo) for production volume.

### Run it in 30 seconds

```python
## Via the Apify Python SDK
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("seibs.co/yelp-reviews-pro").call(run_input={
    "mode": "single_business",
    "business_inputs": [
        "https://www.yelp.com/biz/the-french-laundry-yountville"
    ],
    "max_reviews_per_business": 200,
    "include_topic_clustering": true
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
````

Or via curl:

```bash
curl -X POST "https://api.apify.com/v2/acts/seibs.co~yelp-reviews-pro/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"mode": "single_business", "business_inputs": ["https://www.yelp.com/biz/the-french-laundry-yountville"], "max_reviews_per_business": 200, "include_topic_clustering": true}'
```

Or click "Try for free" on this page if you prefer the no-code UI.

### What you get

Each run produces:

- A clean dataset, filterable in the Apify console and downloadable as CSV or JSON
- An OUTPUT.html dashboard preview of your top records
- A sample-output preview at [`.actor/sample-output.json`](./.actor/sample-output.json)

Per-archetype custom artifacts shipped with this actor:

- top-negative-reviews.html (with suggested response templates and copy-to-clipboard buttons)
- sentiment-trend.csv (12-month trend with improving / flat / declining label)
- competitor-delta.csv (pairwise rating, response-rate, and top-complaint diff)

***

### What does Yelp Reviews Pro do?

It wraps the `agents/yelp-reviews` upstream actor and layers an analysis pass on top: per-review sentiment with negation handling, topic tagging across nine common categories, owner-response stats, 12-month time-series with `improving / flat / declining` trend label, and pairwise competitor delta. Optional LLM-ready markdown summaries drop straight into agent prompts.

### AI / RAG / Agent

Built for AI reputation-management agents and local-SEO bots. Set `output_format=llm_ready` to get a pre-summarized Markdown block per business (rating trend, top complaints, top praise, response gap, competitor delta) that a model can ingest in a single prompt. Per-review records carry `sentiment`, `review_topics`, `reviewer_is_elite`, and `useful_count` as embedding metadata. Compatible with **LangChain**, **LlamaIndex**, **Pinecone**, **Weaviate**, **Chroma**, and any **MCP**-aware agent runtime.

```python
from apify_client import ApifyClient

client = ApifyClient("APIFY_TOKEN")
run = client.actor("you/yelp-reviews-pro").call(run_input={
    "mode": "batch_analysis",
    "business_inputs": [
        "https://www.yelp.com/biz/joes-pizza-new-york-9",
        "https://www.yelp.com/biz/prince-street-pizza-new-york"
    ],
    "max_reviews_per_business": 200,
    "review_sort": "newest",
    "output_format": "llm_ready"
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item.get("record_type") == "business_summary":
        print(item["llm_summary_md"])
```

### Features

- Per-review sentiment (positive / neutral / negative) with `sentiment_score` in \[-1, 1] - lexicon-based, no API key, no per-call cost.
- Topic clustering - `food_quality`, `service`, `wait_time`, `cleanliness`, `value_pricing`, `ambience`, `staff_friendliness`, `parking`, `accessibility`, aggregated into `topic_distribution` and ranked into `top_complaint_topics` / `top_praise_topics`.
- Responder tracking - business-owner response rate, average time-to-respond in days, owner reply sentiment distribution.
- Time-series breakdown - last 12 months of review counts + average rating, with derived `recent_trend`.
- Competitor delta mode - given 2-5 businesses, returns pairwise rating delta, review-count delta, common complaints, unique complaints per side.
- LLM-ready output - set `output_format=llm_ready` and every record gets a `llm_summary_md` markdown block.
- Yelp-native reviewer signals - `reviewer_is_elite`, `reviewer_review_count`, `reviewer_friend_count`, `reviewer_photo_count` (shill / credibility weighting).
- Review reactions - `useful_count`, `funny_count`, `cool_count` per review.

### Use cases

- Chain reputation managers monitoring 20-500 Yelp locations who currently glue together a raw review scrape + sentiment notebook + dashboard.
- Local SEO agencies running monthly client reports - drop the LLM markdown straight into the report template.
- Restaurant groups / multi-location service businesses with response-rate / time-to-respond / recent-trend KPIs.
- Competitive intel teams - `competitor_delta` answers "what do customers complain about us vs the competition?"
- AI product builders feeding local-business data into LLM workflows who need pre-summarized markdown, not raw JSON.

### FAQ

**Q: Is this legal?**
A: Yes - Yelp reviews are public and we go through the upstream `agents/yelp-reviews` actor, which scrapes the public Yelp frontend (not the paid Yelp Fusion API). Use the data per Yelp's Terms of Service and applicable law.

**Q: Why might a run fail?**
A: (1) Yelp's anti-bot blocks the session - the row comes back with `available: false` and a `reason`. RESIDENTIAL proxy is mandatory; datacenter IPs are rejected. (2) Business URL has no `/biz/<slug>` segment - upstream returns nothing. (3) Pushing `max_reviews_per_business` above 500 on many businesses at once triggers rate limits - lower concurrency or split the run.

**Q: How fresh is the data?**
A: Live at crawl time. Reviews are read directly from the public Yelp page during the run. `review_sort: newest` returns most recent first - typically within minutes of being posted.

**Q: Can I schedule this daily or weekly?**
A: Yes - weekly is the standard cadence for chain reputation monitoring. Daily for crisis-watch on a single high-volume business. Use Apify Schedules; combine with `recent_trend` to alert on `declining` flips.

**Q: How do I push results into a CRM or BI tool?**
A: Two paths. (1) `output_format: csv_friendly` flattens reviews for direct import into BI dashboards (Looker, Power BI, Sheets). (2) `output_format: llm_ready` drops `llm_summary_md` straight into agent prompts or a client report template. Zapier/Make/n8n forward business-summary records to HubSpot, Salesforce, or a Slack channel on negative-trend alerts.

**Q: How is this different from `agents/yelp-reviews` or `tri_angle/yelp-review-scraper`?**
A: Those are the upstream raw-scraper layer - they pull reviews and exit. This actor wraps that scrape and layers an intelligence pass on top: per-review sentiment with negation handling, 9-topic clustering with aggregated `top_complaint_topics` / `top_praise_topics`, owner-responder metrics (response rate, time-to-respond, reply sentiment), 12-month time-series with `improving / flat / declining` trend label, pairwise competitor delta, and LLM-ready markdown summaries. You are paying for the analysis layer, not the scrape - if all you need is raw reviews, use the upstream directly.

**Q: How accurate is the sentiment classifier?**
A: ~85% on English consumer reviews against human labels in spot-check sets; lexicon-based with 2-token negation lookback. Non-English (es, fr, de) runs ~70-75%.

**Q: How does PPE pricing actually work here?**
A: $0.010 per `business_summary`, $0.001 per `review_record`, $0.020 per `competitor_delta_record`, $0.005 per `llm_summary`. A 100-review business in JSON mode is about $0.11; a 5-business competitor delta with 100 reviews each is about $0.65.

### Related Actors

- Pair with any lead-finder actor (`home-services-lead-finder`, `restaurants-lead-finder`, `salon-spa-lead-finder`, etc.) - those build the lead list, this actor monitors each lead's Yelp reputation as a companion intelligence layer.
- `google-maps-reviews-pro` - same intelligence layer applied to Google Maps reviews. Run both for cross-platform sentiment + topic + responder coverage.
- `reddit-topic-watcher` - extend reputation monitoring beyond review platforms to Reddit complaint and praise threads.

### Integrations

- Zapier - push to HubSpot/Salesforce/Pipedrive/Apollo/Klaviyo
- Make.com - workflow automation
- n8n - self-hosted automation
- Apify webhooks - POST to your endpoint
- API + dataset export (JSON/CSV/Excel/XML)
- MCP / AI agents - call from Claude/GPT/LangChain

### Modes

| Mode | What it does | Inputs |
|---|---|---|
| `batch_analysis` | Independent analysis of N businesses (up to 50). | List of Yelp URLs or business IDs. |
| `competitor_delta` | Pairwise comparison of 2-5 businesses. | 2-5 inputs. |
| `single_business_deep` | Max depth on one business; bumps `max_reviews` to 500+. | First input only. |

### Input

See `.actor/INPUT_SCHEMA.json`. Sample:

```json
{
    "mode": "batch_analysis",
    "business_inputs": [
        "https://www.yelp.com/biz/joes-pizza-new-york-9",
        "prince-street-pizza-new-york"
    ],
    "max_reviews_per_business": 100,
    "review_sort": "newest",
    "include_sentiment": true,
    "include_topic_clustering": true,
    "include_time_series": true,
    "output_format": "json",
    "apify_proxy_groups": ["RESIDENTIAL"],
    "concurrency": 4
}
```

### Output

One record per business with the analysis layer attached. Sample:

```json
{
    "record_type": "business_summary",
    "business_name": "Joe's Pizza",
    "yelp_url": "https://www.yelp.com/biz/joes-pizza-new-york-9",
    "current_rating": 4.5,
    "total_review_count": 8421,
    "sentiment_distribution": {"positive_pct": 78.0, "negative_pct": 9.0},
    "top_praise_topics": ["food_quality", "value_pricing"],
    "top_complaint_topics": ["wait_time"],
    "responder_metrics": {"response_rate": 12.0, "avg_response_time_days": 4.8},
    "recent_trend": "improving",
    "reviews": [
        {
            "rating": 5,
            "text": "Best slice in NY",
            "sentiment": "positive",
            "sentiment_score": 0.82,
            "review_topics": ["food_quality"],
            "reviewer_is_elite": true,
            "useful_count": 12,
            "funny_count": 2,
            "cool_count": 4
        }
    ],
    "available": true,
    "scraped_at": "2026-05-16T12:00:00Z"
}
```

### Pricing

Pay-per-event:

| Event | Price | When charged |
|---|---|---|
| `business_summary` | $0.010 | Once per business successfully analyzed. |
| `review_record` | $0.001 | Once per individual review extracted. |
| `competitor_delta_record` | $0.020 | Once per pairwise comparison. |
| `llm_summary` | $0.005 | Once per business when `output_format=llm_ready`. |

Typical 100-review business in JSON mode: $0.11. 5-business `competitor_delta` with 100 reviews each: $0.65.

### Save your input as an Apify Task

Apify Tasks let you save a configured input once and re-run it with a single click - no need to re-type search terms, locations, filters, or tier settings every time. Tasks are the foundation for everything that comes next: schedules, monitor mode, and webhook routing all attach to a saved Task, not to the raw actor.

Steps to save your current input as a Task:

1. On this actor's Apify Store page, click `Run` with your input fully configured.
2. Click the `Save as task` button at the top of the run page.
3. Name the task something memorable (e.g. `Reviews for top 10 competitors - weekly`).
4. Reload the task page and click `Start` anytime to re-run with the same inputs.

Tasks unlock the next two features below: scheduling and monitor mode.

### Run this weekly with Apify Schedules

Apify Schedules cron-run any saved Task automatically. Pair this with the saved Task above and you get hands-off recurring runs with no manual clicks, no missed weeks, and a steady stream of fresh data into your CRM or warehouse.

Steps to schedule a Task:

1. Save your input as a Task (see above).
2. Go to https://console.apify.com/schedules and click `Create new schedule`.
3. Pick your Task and set the cron expression. Common patterns:
   - Daily at 9am UTC: `0 9 * * *`
   - Weekly on Mondays at 9am: `0 9 * * 1`
   - Monthly on the 1st: `0 9 1 * *`
4. Save. Apify will run your Task on that schedule automatically, push the dataset to whatever integrations you have wired up, and fire run-completion webhooks for downstream automation.

Run weekly to track sentiment trends, catch negative reviews fast, and feed fresh review text into your VOC pipeline.

### Monitor mode (v2, beta)

Monitor mode is the v2 evolution of this actor and is currently in BETA. It turns a recurring schedule into a true change-feed instead of a firehose of duplicate records.

How it works:

- When this actor runs under an Apify Schedule, monitor mode is enabled automatically.
- Instead of emitting ALL records every run, it emits ONLY records that are NEW or CHANGED since the last scheduled run.
- A digest record summarizes the delta (X new, Y changed, Z removed) at the top of every run.
- Optional: provide a Slack or email webhook URL in the `monitor_webhook_url` input field and the digest fires there too, so your team gets the delta in their inbox or channel without polling the dataset.
- Cost: a single `scheduled_delta_run` event ($0.05) per scheduled run, plus standard PPE on emitted delta records only. Predictable monthly cost, no surprise bills from re-charging for unchanged records.

Monitor mode is rolling out to the top 3 actors first (this one included if it's hotel-motel-lead-finder, google-maps-reviews-pro, or mcp-accounting-firm-leads). Full portfolio coverage by end of June.

### Support

Open an issue on the actor's GitHub or contact via Apify Store. Include the run ID and input config.

### Changelog

See [CHANGELOG.md](./CHANGELOG.md).

### Found this useful?

If this actor saved you time or money, please consider leaving a quick review on the Apify Store. Reviews help other buyers find work that solves their problem and let me prioritize the features paying customers actually use. Leave a review: https://apify.com/seibs.co/yelp-reviews-pro#reviews

# Actor input Schema

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

batch\_analysis = analyze N businesses independently. competitor\_delta = pairwise side-by-side comparison of 2-5 businesses. single\_business\_deep = max-depth on one business (largest review pull, full per-review enrichment).

## `business_inputs` (type: `array`):

Up to 50 Yelp business URLs (https://www.yelp.com/biz/<slug>) or business IDs (the slug after /biz/). Mixed types accepted.

## `max_reviews_per_business` (type: `integer`):

Cap on how many reviews to pull per business from the upstream scraper. Higher = better stats but slower and more expensive upstream cost. Hard cap of 500 to prevent runaway cost.

## `review_sort` (type: `string`):

How the upstream actor should sort reviews before we take the first N. 'newest' is best for trend analysis; 'rating\_low\_high' is best for surfacing complaints fast; 'elites\_first' prioritizes high-credibility reviewers.

## `language` (type: `string`):

Language code for reviews. Sentiment and topic lexicons currently work best for English; other languages still return raw reviews but may have lower analysis accuracy.

## `include_owner_responses` (type: `boolean`):

When true, captures business-owner replies on each review and computes responder metrics (response rate, time-to-response, owner reply sentiment). Strong reputation-management signal.

## `include_sentiment` (type: `boolean`):

Lexicon-based sentiment scoring (positive / neutral / negative) with negation handling. No API key needed - runs entirely in-actor.

## `include_topic_clustering` (type: `boolean`):

Detects topics in each review using keyword sets: food\_quality, service, wait\_time, cleanliness, value\_pricing, ambience, staff\_friendliness, parking, accessibility.

## `include_time_series` (type: `boolean`):

Monthly review count + average rating for the last 12 months. Determines trend (improving / flat / declining).

## `output_format` (type: `string`):

json = full structured business + reviews records. llm\_ready = adds a markdown summary block per business optimized for LLM prompt injection. csv\_friendly = flat one-row-per-review (no nested arrays).

## `competitor_delta_max_pairs` (type: `integer`):

Only used in competitor\_delta mode. Caps the number of pairwise comparisons emitted. With 5 businesses there are 10 pairs; this caps that to the most-divergent N.

## `apify_proxy_groups` (type: `array`):

Proxy groups passed through to the upstream agents/yelp-reviews actor. RESIDENTIAL is mandatory for Yelp - their anti-bot blocks datacenter IPs aggressively.

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

Number of businesses processed in parallel. Each business triggers one upstream actor call; raise carefully.

## Actor input object example

```json
{
  "mode": "batch_analysis",
  "business_inputs": [
    "https://www.yelp.com/biz/joes-pizza-new-york-9"
  ],
  "max_reviews_per_business": 100,
  "review_sort": "newest",
  "language": "en",
  "include_owner_responses": true,
  "include_sentiment": true,
  "include_topic_clustering": true,
  "include_time_series": true,
  "output_format": "json",
  "competitor_delta_max_pairs": 5,
  "apify_proxy_groups": [
    "RESIDENTIAL"
  ],
  "concurrency": 4
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All business summary records with sentiment + topic aggregates.

## `datasetItemsDetailed` (type: `string`):

Every aggregate field per business, including time-series and responder metrics.

## `datasetItemsReviews` (type: `string`):

Explodes the reviews array - one row per review with sentiment + topics columns.

## `datasetItemsCsv` (type: `string`):

Spreadsheet-friendly export of the overview view.

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "mode": "batch_analysis",
    "business_inputs": [
        "https://www.yelp.com/biz/joes-pizza-new-york-9"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("seibs.co/yelp-reviews-pro").call(input);

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "mode": "batch_analysis",
    "business_inputs": ["https://www.yelp.com/biz/joes-pizza-new-york-9"],
}

# Run the Actor and wait for it to finish
run = client.actor("seibs.co/yelp-reviews-pro").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "mode": "batch_analysis",
  "business_inputs": [
    "https://www.yelp.com/biz/joes-pizza-new-york-9"
  ]
}' |
apify call seibs.co/yelp-reviews-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=seibs.co/yelp-reviews-pro",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Yelp Reviews Scraper - Sentiment, Topics, Competitor Delta",
        "description": "Bulk Yelp review scraper with per-review sentiment, topic clusters (food, service, wait, value, parking), responder tracking, 12-month trend and competitor delta. LLM-ready JSON for reputation, local SEO and chain ops teams.",
        "version": "0.1",
        "x-build-id": "RniBGkOpzy6zBPkCJ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/seibs.co~yelp-reviews-pro/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-seibs.co-yelp-reviews-pro",
                "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/seibs.co~yelp-reviews-pro/runs": {
            "post": {
                "operationId": "runs-sync-seibs.co-yelp-reviews-pro",
                "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/seibs.co~yelp-reviews-pro/run-sync": {
            "post": {
                "operationId": "run-sync-seibs.co-yelp-reviews-pro",
                "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",
                "required": [
                    "mode",
                    "business_inputs"
                ],
                "properties": {
                    "mode": {
                        "title": "Run mode",
                        "enum": [
                            "batch_analysis",
                            "competitor_delta",
                            "single_business_deep"
                        ],
                        "type": "string",
                        "description": "batch_analysis = analyze N businesses independently. competitor_delta = pairwise side-by-side comparison of 2-5 businesses. single_business_deep = max-depth on one business (largest review pull, full per-review enrichment).",
                        "default": "batch_analysis"
                    },
                    "business_inputs": {
                        "title": "Businesses (Yelp URLs or business IDs)",
                        "maxItems": 50,
                        "type": "array",
                        "description": "Up to 50 Yelp business URLs (https://www.yelp.com/biz/<slug>) or business IDs (the slug after /biz/). Mixed types accepted.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "max_reviews_per_business": {
                        "title": "Max reviews per business",
                        "minimum": 10,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Cap on how many reviews to pull per business from the upstream scraper. Higher = better stats but slower and more expensive upstream cost. Hard cap of 500 to prevent runaway cost.",
                        "default": 100
                    },
                    "review_sort": {
                        "title": "Review sort order",
                        "enum": [
                            "newest",
                            "oldest",
                            "rating_high_low",
                            "rating_low_high",
                            "elites_first",
                            "yelp_default"
                        ],
                        "type": "string",
                        "description": "How the upstream actor should sort reviews before we take the first N. 'newest' is best for trend analysis; 'rating_low_high' is best for surfacing complaints fast; 'elites_first' prioritizes high-credibility reviewers.",
                        "default": "newest"
                    },
                    "language": {
                        "title": "Review language",
                        "enum": [
                            "en",
                            "es",
                            "fr",
                            "de",
                            "it",
                            "pt",
                            "ja",
                            "ko",
                            "zh"
                        ],
                        "type": "string",
                        "description": "Language code for reviews. Sentiment and topic lexicons currently work best for English; other languages still return raw reviews but may have lower analysis accuracy.",
                        "default": "en"
                    },
                    "include_owner_responses": {
                        "title": "Include owner responses",
                        "type": "boolean",
                        "description": "When true, captures business-owner replies on each review and computes responder metrics (response rate, time-to-response, owner reply sentiment). Strong reputation-management signal.",
                        "default": true
                    },
                    "include_sentiment": {
                        "title": "Per-review sentiment analysis",
                        "type": "boolean",
                        "description": "Lexicon-based sentiment scoring (positive / neutral / negative) with negation handling. No API key needed - runs entirely in-actor.",
                        "default": true
                    },
                    "include_topic_clustering": {
                        "title": "Topic clustering per review",
                        "type": "boolean",
                        "description": "Detects topics in each review using keyword sets: food_quality, service, wait_time, cleanliness, value_pricing, ambience, staff_friendliness, parking, accessibility.",
                        "default": true
                    },
                    "include_time_series": {
                        "title": "Time-series breakdown",
                        "type": "boolean",
                        "description": "Monthly review count + average rating for the last 12 months. Determines trend (improving / flat / declining).",
                        "default": true
                    },
                    "output_format": {
                        "title": "Output format",
                        "enum": [
                            "json",
                            "llm_ready",
                            "csv_friendly"
                        ],
                        "type": "string",
                        "description": "json = full structured business + reviews records. llm_ready = adds a markdown summary block per business optimized for LLM prompt injection. csv_friendly = flat one-row-per-review (no nested arrays).",
                        "default": "json"
                    },
                    "competitor_delta_max_pairs": {
                        "title": "Competitor delta max pairs",
                        "minimum": 2,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Only used in competitor_delta mode. Caps the number of pairwise comparisons emitted. With 5 businesses there are 10 pairs; this caps that to the most-divergent N.",
                        "default": 5
                    },
                    "apify_proxy_groups": {
                        "title": "Proxy groups (forwarded to upstream)",
                        "type": "array",
                        "description": "Proxy groups passed through to the upstream agents/yelp-reviews actor. RESIDENTIAL is mandatory for Yelp - their anti-bot blocks datacenter IPs aggressively.",
                        "default": [
                            "RESIDENTIAL"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "concurrency": {
                        "title": "Per-business concurrency",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Number of businesses processed in parallel. Each business triggers one upstream actor call; raise carefully.",
                        "default": 4
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
