# Reputation & Review Sentiment Monitor – Google + TripAdvisor (`malikgen/google-and-tripadvisor-review-scraper`) Actor

Multi-source review & reputation monitor: pulls Google Maps + TripAdvisor reviews, adds AI sentiment, negative-review alerts, date filtering and a unified schema. Built on best-in-class sources for reliability. n8n/Make webhook, JSON/CSV/API, incremental scheduled runs.

- **URL**: https://apify.com/malikgen/google-and-tripadvisor-review-scraper.md
- **Developed by:** [Malikgen](https://apify.com/malikgen) (community)
- **Categories:** Business, Marketing, Lead generation
- **Features:** Full permissions
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

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

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

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

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

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

# README

## Review Aggregator Analyzer

Reliable multi-source review monitor for **Google Maps** and **TripAdvisor** with sentiment analysis, date filtering, webhook alerts, and incremental mode.

### How it works

This actor is an **orchestrator**. Instead of scraping Google or TripAdvisor directly (which breaks constantly due to DOM changes and anti-bot updates), it delegates to proven, maintained child actors on the Apify platform:

| Platform | Child Actor | Maintained by |
|----------|-------------|---------------|
| Google Maps | `compass/Google-Maps-Reviews-Scraper` | Compass |
| TripAdvisor | `maxcopell/tripadvisor-reviews` | maxcopell |

**Our value layer on top:**

- Unified review schema across both platforms
- Local sentiment analysis (positive / neutral / negative + score)
- Date filtering, rating filtering, sentiment filtering
- Incremental mode — only new reviews since the last run
- Webhook / n8n alerts for negative reviews
- Run summary stored in KV store

### Pricing

You are billed for:

1. **This actor** — lightweight orchestration, typically < $0.01 per run
2. **Child actor usage** — billed automatically to your Apify account at each child actor's own rate

No proxy costs on your end — child actors manage their own proxies.

***

### Quick Start

#### Simple input (form mode)

```json
{
    "businessName": "McDonald's Times Square",
    "businessLocation": "New York, USA",
    "googleMapsUrl": "https://www.google.com/maps/place/McDonald's/@40.7579787,-73.9877438,17z/...",
    "tripAdvisorUrl": "https://www.tripadvisor.com/Restaurant_Review-g60763-d479078-Reviews-McDonald_s-New_York_City_New_York.html",
    "dateFilter": "last_month",
    "maxReviewsPerBusiness": 50,
    "enableSentiment": true
}
```

#### Multiple businesses (API / JSON mode)

```json
{
    "businesses": [
        {
            "name": "McDonald's Times Square",
            "location": "New York, USA",
            "platforms": ["google", "tripadvisor"],
            "urls": {
                "google": "https://www.google.com/maps/place/...",
                "tripadvisor": "https://www.tripadvisor.com/Restaurant_Review-..."
            }
        }
    ],
    "dateFilter": "last_month",
    "maxReviewsPerBusiness": 50,
    "enableSentiment": true
}
```

#### Google Maps only (no TripAdvisor URL needed)

```json
{
    "businessName": "My Business",
    "businessLocation": "City, Country",
    "googleMapsUrl": "https://www.google.com/maps/place/...",
    "dateFilter": "last_week"
}
```

> **TripAdvisor note:** A TripAdvisor URL is required for TripAdvisor scraping. If you omit `tripAdvisorUrl`, TripAdvisor is skipped gracefully with a log message — it is not an error.
>
> If only `businessName` + `businessLocation` are provided (no `googleMapsUrl`), a Google Maps search URL is constructed automatically. This works for most businesses but a direct Maps URL is more reliable.

***

### How to find business URLs

#### Google Maps URL

1. Go to [Google Maps](https://www.google.com/maps)
2. Search for the business
3. Click the business listing so the info panel opens
4. Copy the URL from your browser address bar

The URL should contain `/place/` — e.g.:

```
https://www.google.com/maps/place/McDonald's/@40.7579787,-73.9877438,17z/data=...
```

#### TripAdvisor URL

1. Go to [TripAdvisor](https://www.tripadvisor.com)
2. Search for the business
3. Click the listing
4. Copy the URL from your browser address bar

URL formats:

```
## Restaurant
https://www.tripadvisor.com/Restaurant_Review-g{GEO_ID}-d{LOCATION_ID}-Reviews-Name-City.html

## Hotel
https://www.tripadvisor.com/Hotel_Review-g{GEO_ID}-d{LOCATION_ID}-Reviews-Name-City.html
```

***

### Input Parameters

#### Business Details

| Parameter | Type | Description |
|-----------|------|-------------|
| `businessName` | String | Business name (used for labelling and as Google search fallback) |
| `businessLocation` | String | City and country (used with businessName for Google search fallback) |
| `googleMapsUrl` | String | Google Maps place URL |
| `tripAdvisorUrl` | String | TripAdvisor listing URL (required for TripAdvisor; skipped if omitted) |
| `businesses` | Array | JSON array of `{ name, location, platforms, urls }` for multi-business runs |

#### Scraping Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `platforms` | Array | `["google","tripadvisor"]` | Which platforms to include |
| `maxReviewsPerBusiness` | Integer | 50 | Max reviews per platform per business |
| `sortBy` | String | `newest` | `newest`, `most_relevant`, `highest_rating`, `lowest_rating` |
| `dateFilter` | String | `last_month` | `last_24h`, `last_48h`, `last_week`, `last_month`, `last_3_months`, `last_year`, `all`, `custom` |
| `dateFrom` | String | — | Custom range start (YYYY-MM-DD) |
| `dateTo` | String | — | Custom range end (YYYY-MM-DD) |

#### Sentiment & Filtering

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `enableSentiment` | Boolean | `true` | Run local sentiment analysis on each review |
| `sentimentFilter` | String | `all` | `all`, `negative_only`, `neutral_only`, `positive_only` |
| `minRating` | Integer | — | Only include reviews with rating ≥ this value |
| `maxRating` | Integer | — | Only include reviews with rating ≤ this value |
| `includeBusinessResponse` | Boolean | `true` | Include owner replies in output |

#### Webhook Alerts

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `webhookUrl` | String | — | POST target for negative review alerts (n8n, Zapier, etc.) |
| `negativeThreshold` | Integer | 2 | Reviews at or below this rating trigger a webhook alert |

#### Advanced (Incremental Mode)

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `onlyNewReviews` | Boolean | `false` | Only fetch reviews newer than the last run |
| `firstRunDateLimit` | String | `last_month` | Lookback on the very first incremental run |

***

### Output Schema

Every item in the dataset follows this shape. All keys are always present — `null` is used where the source does not supply a value.

```json
{
    "id": "compass-review-id-or-generated",
    "business": {
        "name": "McDonald's Times Square",
        "location": "New York, USA",
        "businessId": null,
        "platformBusinessId": null
    },
    "platform": "google",
    "platformUrl": "https://www.google.com/maps/place/...",
    "reviewer": {
        "name": "R J",
        "profileUrl": null,
        "reviewCount": null,
        "isLocalGuide": false,
        "avatarUrl": null
    },
    "review": {
        "rating": 4,
        "ratingNormalized": 4,
        "text": "Convenient location and great customer service staff.",
        "date": "2025-12-18",
        "dateISO": "2025-12-18T21:41:33.000Z",
        "language": "en",
        "helpfulVotes": 0,
        "photos": []
    },
    "businessResponse": null,
    "sentiment": {
        "score": 0.47,
        "label": "positive",
        "confidence": 0.68,
        "source": "combined",
        "breakdown": { "text": 0.43, "rating": 0.5 }
    },
    "metadata": {
        "scrapedAt": "2025-12-18T21:41:33.277Z",
        "isNew": true,
        "runId": "VTnrK3BNnx",
        "architecture": "orchestrator-v2"
    }
}
```

#### Sentiment Score Interpretation

| Label | Score Range | Meaning |
|-------|-------------|---------|
| `positive` | > 0.2 | Happy customer |
| `neutral` | -0.2 to 0.2 | Mixed or average |
| `negative` | < -0.2 | Needs attention |

***

### Webhook Payload

When a review at or below `negativeThreshold` stars is found, a POST is sent to `webhookUrl`:

```json
{
    "alertType": "negative_review",
    "timestamp": "2025-12-18T21:41:33.277Z",
    "business": { "name": "McDonald's Times Square", "location": "New York, USA" },
    "platform": "google",
    "review": {
        "id": "...",
        "rating": 1,
        "text": "Very bad experience...",
        "reviewerName": "John D.",
        "date": "2025-12-18",
        "url": "https://..."
    },
    "sentiment": { "score": -0.7, "label": "negative" }
}
```

A run-complete summary is also sent after all reviews are processed:

```json
{
    "alertType": "run_complete",
    "summary": {
        "totalReviews": 47,
        "negativeReviews": 5,
        "positiveReviews": 38,
        "neutralReviews": 4,
        "averageRating": 4.1
    }
}
```

***

### API Usage

#### Start a Run

```bash
curl -X POST "https://api.apify.com/v2/acts/malikgen~google-and-tripadvisor-review-scraper/runs?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "businessName": "McDonald'\''s Times Square",
    "businessLocation": "New York, USA",
    "googleMapsUrl": "https://www.google.com/maps/place/...",
    "tripAdvisorUrl": "https://www.tripadvisor.com/Restaurant_Review-...",
    "dateFilter": "last_month",
    "maxReviewsPerBusiness": 50,
    "enableSentiment": true
  }'
```

#### Get Results

```bash
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_TOKEN&format=json"
curl "https://api.apify.com/v2/datasets/DATASET_ID/items?token=YOUR_TOKEN&format=csv"
```

***

### n8n Integration

1. Import the included `n8n-workflow-async-polling.json` into n8n
2. Add your Apify API token as a Query Auth credential
3. Set the Actor ID to `malikgen~google-and-tripadvisor-review-scraper`
4. Optionally connect a webhook URL for instant negative review alerts

***

### Troubleshooting

**No reviews returned?**

- Verify URLs open correctly in a browser
- Try `dateFilter: "last_3_months"` or `"all"` to confirm reviews exist
- For TripAdvisor, confirm you provided `tripAdvisorUrl` (it is required)

**Fewer reviews than expected?**

- Increase `maxReviewsPerBusiness`
- Widen the date filter
- Child actors may have their own rate limits — check their logs in your Apify run history

**Run times out?**

- This orchestrator runs child actors synchronously. For large `maxReviewsPerBusiness` values, the child actors may take several minutes. The parent actor's `timeoutSecs` (default 3600) should be sufficient for most cases.

***

### Changelog

#### v0.0 (Orchestrator Architecture)

- Replaced native scrapers with child-actor calls (compass + maxcopell)
- Removed proxy configuration requirement — child actors handle proxies
- Retained all value-layer features: sentiment, filtering, webhook, incremental mode
- Reduced orchestrator memory to 1024 MB (lightweight — no browser)
- Added unified field-mapping layer for consistent output across platforms

#### v0.0.21 (Previous — Native Scrapers)

- Native Google Maps and TripAdvisor scrapers (now replaced)
- Sentiment analysis, date filtering, webhook alerts

# Actor input Schema

## `businessName` (type: `string`):

Name of the business you want to scrape reviews for (e.g., Yellowstone National Park)

## `businessLocation` (type: `string`):

City and country of the business (e.g., New York, USA)

## `googleMapsUrl` (type: `string`):

Google Maps PLACE URL of the business (recommended for Google reviews). Open Google Maps, click the place, and copy the URL — a /maps/place/ URL works best. If left blank, we search by Business Name + Location (best-effort).

## `tripAdvisorUrl` (type: `string`):

TripAdvisor URL of the business (optional — leave blank to skip TripAdvisor). Open TripAdvisor, find the place, and copy the URL. Example: https://www.tripadvisor.com/Hotel_Review-g60763-d208453-Reviews-Hilton_New_York_Times_Square-New_York_City_New_York.html

## `platforms` (type: `array`):

Which review platforms to scrape. Google Maps works for any business. TripAdvisor is best for hotels, restaurants, and attractions.

## `dateFilter` (type: `string`):

How far back to look for reviews. Use 'last_24h' for daily monitoring, 'last_week' for weekly reports.

## `dateFrom` (type: `string`):

Start date for custom range (YYYY-MM-DD format, e.g., 2025-01-01)

## `dateTo` (type: `string`):

End date for custom range (YYYY-MM-DD format, e.g., 2025-12-31)

## `maxReviewsPerBusiness` (type: `integer`):

Maximum number of reviews to scrape per platform. Lower = faster and cheaper.

## `enableSentiment` (type: `boolean`):

Analyze each review to determine if it's positive, negative, or neutral. Adds a sentiment score to each review.

## `sentimentFilter` (type: `string`):

Only output reviews matching this sentiment. Use 'Negative Only' to focus on bad reviews that need attention.

## `minRating` (type: `integer`):

Only include reviews with rating >= this value (1-5 stars). Leave empty for no minimum.

## `maxRating` (type: `integer`):

Only include reviews with rating <= this value (1-5 stars). Set to 2 or 3 to get only low-rated reviews.

## `includeBusinessResponse` (type: `boolean`):

Include the business owner's response to each review (if any)

## `sortBy` (type: `string`):

How to sort the scraped reviews

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

Receive instant alerts when negative reviews are found. Enter your n8n webhook URL or any HTTP endpoint.

## `negativeThreshold` (type: `integer`):

Send webhook alert for reviews with this rating or lower. Set to 2 to alert on 1-2 star reviews.

## `onlyNewReviews` (type: `boolean`):

Only scrape reviews newer than the last run. Useful for scheduled monitoring to avoid duplicates.

## `firstRunDateLimit` (type: `string`):

For the first run in incremental mode, how far back to look for reviews

## Actor input object example

```json
{
  "businessName": "Yellowstone National Park",
  "businessLocation": "Wyoming, USA",
  "googleMapsUrl": "https://www.google.com/maps/place/Yellowstone+National+Park/@44.5857951,-110.5140571,9z/data=!3m1!4b1!4m5!3m4!1s0x5351e55555555555:0xaca8f930348fe1bb!8m2!3d44.427963!4d-110.588455?hl=en-GB",
  "tripAdvisorUrl": "",
  "platforms": [
    "google",
    "tripadvisor"
  ],
  "dateFilter": "last_month",
  "dateFrom": "2025-01-01",
  "dateTo": "2025-12-31",
  "maxReviewsPerBusiness": 50,
  "enableSentiment": true,
  "sentimentFilter": "all",
  "includeBusinessResponse": true,
  "sortBy": "newest",
  "negativeThreshold": 2,
  "onlyNewReviews": false,
  "firstRunDateLimit": "last_month"
}
```

# Actor output Schema

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

No description

## `fullData` (type: `string`):

No description

## `csvExport` (type: `string`):

No description

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "businessName": "Yellowstone National Park",
    "businessLocation": "Wyoming, USA",
    "googleMapsUrl": "https://www.google.com/maps/place/Yellowstone+National+Park/@44.5857951,-110.5140571,9z/data=!3m1!4b1!4m5!3m4!1s0x5351e55555555555:0xaca8f930348fe1bb!8m2!3d44.427963!4d-110.588455?hl=en-GB",
    "tripAdvisorUrl": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("malikgen/google-and-tripadvisor-review-scraper").call(input);

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

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

```

## Python example

```python
from apify_client import ApifyClient

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

# Prepare the Actor input
run_input = {
    "businessName": "Yellowstone National Park",
    "businessLocation": "Wyoming, USA",
    "googleMapsUrl": "https://www.google.com/maps/place/Yellowstone+National+Park/@44.5857951,-110.5140571,9z/data=!3m1!4b1!4m5!3m4!1s0x5351e55555555555:0xaca8f930348fe1bb!8m2!3d44.427963!4d-110.588455?hl=en-GB",
    "tripAdvisorUrl": "",
}

# Run the Actor and wait for it to finish
run = client.actor("malikgen/google-and-tripadvisor-review-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "businessName": "Yellowstone National Park",
  "businessLocation": "Wyoming, USA",
  "googleMapsUrl": "https://www.google.com/maps/place/Yellowstone+National+Park/@44.5857951,-110.5140571,9z/data=!3m1!4b1!4m5!3m4!1s0x5351e55555555555:0xaca8f930348fe1bb!8m2!3d44.427963!4d-110.588455?hl=en-GB",
  "tripAdvisorUrl": ""
}' |
apify call malikgen/google-and-tripadvisor-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,malikgen/google-and-tripadvisor-review-scraper"
        }
    }
}
```

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

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Fba9IMaQdBRXwz1qV/builds/9S0yHPYcc2lJraLv2/openapi.json
