# App Review Insights (`hiranaz1/app-review-insights`) Actor

Get every review extracted plus an actionable analysis. Search any product by name and pull reviews from the App Store, Google Play, Capterra & Trustpilot, then get ranked complaints, strengths, feature requests & sentiment, with optional AI analysis via your own OpenAI key.

- **URL**: https://apify.com/hiranaz1/app-review-insights.md
- **Developed by:** [Hira Naz](https://apify.com/hiranaz1) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## App Review Insights

Type a **product name** and this Actor finds it across the **Apple App Store**, **Google Play**, **Capterra**, and **Trustpilot**, pulls the reviews into one unified dataset, and turns them into an **actionable, executive-ready report** — prioritized complaints, key strengths, feature requests, sentiment and rating trends.

No review IDs, no per-source configuration: it resolves the product by name on every source automatically. Each source is **fail-soft** — if one is unavailable, the others still produce a full report.

### Two modes

| | **Free (default)** | **AI analysis (optional)** |
|---|---|---|
| Cost | Free | Your own OpenAI API key |
| Engine | Local rule-based (VADER sentiment + aspect taxonomy) | OpenAI, grounded on the same reviews + stats |
| Output | Ratings, sentiment, aspect-based complaints/praises ranked by severity, feature requests, monthly trend, representative quotes | Everything in Free **plus** an `AI analysis` section: plain-language verdict, prioritized issues with recommendations, strengths, opportunities and quotes |

- **Free mode** runs whenever no key is supplied. It groups reviews into named aspects (e.g. *Meetings & Calls*, *Login & Accounts*, *Performance & Reliability*), ranks complaints by how many unhappy customers they affect (volume x negativity), and picks a representative, sentiment-matched quote for each.
- **AI mode** activates only when an **OpenAI API key** is provided. It samples a balanced set of reviews, sends them with the pre-computed statistics to OpenAI, and returns a concise product-team briefing. It is **fail-soft**: if the API call fails, the free report is still produced. Your key is used only for the run and is never written to the output.

### Sources

| Source | How it is fetched |
|---|---|
| Apple App Store | iTunes Search API (resolution) + server-rendered web reviews page |
| Google Play | `google-play-scraper` |
| Capterra | HTTP + Beautiful Soup |
| Trustpilot | Headless Chromium via `patchright` |

### Input

| Field | Key | Required | Default | Description |
|---|---|---|---|---|
| Product name | `productName` | Yes | — | The product to analyze (e.g. `Notion`, `Microsoft Teams`). |
| App Store country | `appStoreCountry` | No | `us` | Two-letter storefront code for App Store search/reviews. |
| Max reviews per source | `maxReviewsPerSource` | No | `200` | Upper bound on reviews fetched per source (10–500). |
| OpenAI API key | `openaiApiKey` | No | — | Optional. Enables the AI analysis section. Marked secret. |
| OpenAI model | `openaiModel` | No | `gpt-4o-mini` | Model for the AI analysis (only used when a key is given). |

Example input:

```json
{
  "productName": "Microsoft Teams",
  "appStoreCountry": "us",
  "maxReviewsPerSource": 100,
  "openaiApiKey": "sk-...",
  "openaiModel": "gpt-4o-mini"
}
```

### Output

- **Dataset** — every fetched review in a unified shape (`source`, `product`, `rating`, `title`, `body`, `author`, `date`, `url`, ...).
- **Key-value store**
  - `OUTPUT` — the full insights object as JSON (includes `aiAnalysis` when AI mode ran).
  - `REPORT.md` — a shareable Markdown report (the AI section appears first when enabled).

### Run locally

Requires Python 3.11+ (the deployed image uses 3.13).

```bash
python -m venv .venv
.venv\Scripts\activate            # Windows
## source .venv/bin/activate       # macOS / Linux
pip install -r requirements.txt
python -m patchright install chromium   # for Trustpilot
```

Put your input in `storage/key_value_stores/default/INPUT.json`, then run:

```bash
python -m my_actor
```

Or, using the Apify CLI (reads the same `INPUT.json`):

```bash
apify run
```

The report is written to `storage/key_value_stores/default/REPORT.md`.

To try **AI mode** locally, either add `"openaiApiKey": "sk-..."` to `INPUT.json`, or set the environment variable `OPENAI_API_KEY` before running.

### Deploy to Apify

#### Prerequisites

- An [Apify account](https://console.apify.com/) (free tier is fine).

- The Apify CLI:

  ```bash
  npm install -g apify-cli
  # or: brew install apify-cli
  ```

- Log in with your [API token](https://console.apify.com/account/integrations):

  ```bash
  apify login
  ```

#### Option A — Push from your machine (fastest)

From the project root (`app-review-insights/`, the folder containing `.actor/`):

```bash
apify push
```

This uploads the source, builds the Docker image on Apify (installs `requirements.txt` and Chromium per the `Dockerfile`), and creates the Actor under **[Actors → My Actors](https://console.apify.com/actors?tab=my)**. Re-run `apify push` to deploy updates.

> The first build takes a few minutes because it installs the Playwright/Chromium base image and dependencies. Watch the build log in the console; a green **Succeeded** means it is ready.

#### Option B — Connect a Git repository (best for ongoing work)

1. Push this project to GitHub/GitLab/Bitbucket.
2. Go to the [Actor creation page](https://console.apify.com/actors/new) and click **Link Git Repository**.
3. Point it at your repo (and the folder with `.actor/` if it is a monorepo).
4. Apify rebuilds automatically on every push to the tracked branch.

#### Run it on the platform

1. Open the Actor and go to the **Input** tab — the fields above render automatically from the input schema.
2. Enter a **Product name**. To enable AI mode, paste your **OpenAI API key** (it renders as a secret field).
3. Click **Start**.
4. When it finishes:
   - **Storage → Dataset** holds the raw reviews (exportable as JSON/CSV/Excel).
   - **Storage → Key-value store** holds `OUTPUT` (JSON) and `REPORT.md` (the readable report).

#### Notes on cost and secrets

- The Actor itself needs no paid API keys. Only **AI mode** uses your OpenAI key, and OpenAI bills you directly for those tokens.
- On the platform the OpenAI key is stored as a **secret input** and is not saved into the Actor output.
- You can schedule runs, call the Actor via the [API](https://docs.apify.com/api/v2), or wire it into [integrations](https://apify.com/integrations) (Make, Zapier, Slack, Google Drive, ...).

### Project structure

```
my_actor/
  main.py            # orchestration: resolve, fetch, analyze, report
  insights.py        # free rule-based analysis (VADER + aspect taxonomy)
  ai.py              # optional OpenAI analysis (only runs with a key)
  report.py          # Markdown report renderer
  sources/           # app_store, play_store, capterra, trustpilot
.actor/              # actor.json, input/output/dataset schemas
Dockerfile           # Python + Playwright base image
requirements.txt
```

### Documentation reference

- [Apify SDK for Python](https://docs.apify.com/sdk/python)
- [Apify Platform documentation](https://docs.apify.com/platform)
- [Actor input schema](https://docs.apify.com/platform/actors/development/input-schema)
- [Deploying Actors](https://docs.apify.com/platform/actors/development/deployment)

# Actor input Schema

## `productName` (type: `string`):

The product to analyze. The Actor searches each source by name automatically — no IDs needed.

## `appStoreCountry` (type: `string`):

Two-letter country code for the App Store storefront to search and read reviews from.

## `maxReviewsPerSource` (type: `integer`):

Maximum number of reviews to fetch from each source.

## `openaiApiKey` (type: `string`):

Optional. Provide your own OpenAI API key to add an AI-written analysis (prioritized issues, recommendations, strengths and opportunities) on top of the free rule-based report. Leave empty to run the free version only. Your key is used only for this run and is never stored in the output.

## `openaiModel` (type: `string`):

Model to use for the optional AI analysis. Only used when an OpenAI API key is provided.

## Actor input object example

```json
{
  "productName": "Notion",
  "appStoreCountry": "us",
  "maxReviewsPerSource": 200,
  "openaiModel": "gpt-4o-mini"
}
```

# Actor output Schema

## `results` (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 = {
    "productName": "Slack"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hiranaz1/app-review-insights").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 = { "productName": "Slack" }

# Run the Actor and wait for it to finish
run = client.actor("hiranaz1/app-review-insights").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 '{
  "productName": "Slack"
}' |
apify call hiranaz1/app-review-insights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hiranaz1/app-review-insights"
        }
    }
}

```

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/d2Zjyjd9dL78VYLsv/builds/0qg2YvvQuhGO7Z0gZ/openapi.json
