# Trustpilot Scraper (`romy/trustpilot-scraper`) Actor

Scrape company profiles and user reviews from Trustpilot by domain name. Extracts trust score, rating distribution, reviewer details, review text, and company replies.

- **URL**: https://apify.com/romy/trustpilot-scraper.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.34 / 1,000 company scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Trustpilot Scraper

Scrapes company profiles and user reviews from [Trustpilot](https://www.trustpilot.com/) for a list of domains.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `domains` | `string[]` | *required* | List of domain names to scrape (e.g. `["amazon.com", "tokopedia.com"]`) |
| `maxReviewsPerDomain` | `integer` | `0` | Maximum reviews to collect per domain. `0` = unlimited |
| `language` | `string` | `"all"` | Filter reviews by language ISO code (e.g. `"en"`, `"id"`). `"all"` = no filter |

#### Example Input

```json
{
  "domains": ["amazon.com", "tokopedia.com"],
  "maxReviewsPerDomain": 50,
  "language": "en"
}
```

### Output

Two record types are pushed to the dataset:

#### Company record

```json
{
  "type": "company",
  "domain": "amazon.com",
  "name": "Amazon",
  "trustScore": 1.8,
  "totalReviews": 46831,
  "website": "http://www.amazon.com",
  "ratingDistribution": {
    "1": 35000,
    "2": 2000,
    "3": 1500,
    "4": 2000,
    "5": 6331
  }
}
```

#### Review record

```json
{
  "type": "review",
  "domain": "amazon.com",
  "id": "abc123",
  "rating": 5,
  "title": "Great service",
  "text": "Very fast delivery and easy returns.",
  "publishedDate": "2024-11-20",
  "experiencedDate": "2024-11-15",
  "reviewer": "Jane Doe",
  "reviewerCountry": "US",
  "reviewerReviewCount": 12,
  "companyReply": null,
  "language": "en",
  "isVerified": true
}
```

### Pricing

This actor uses PAY_PER_EVENT billing:

| Event | Price |
|-------|-------|
| Actor start | $0.05 |
| Per company scraped | $0.001 |
| Per review scraped | $0.001 |

### Notes

- Trustpilot uses Cloudflare protection. This actor works on Apify's infrastructure but may be blocked when run locally on datacenter IPs.
- Reviews are fetched in parallel batches of 5 pages for efficiency.
- Set `maxReviewsPerDomain: 0` for unlimited reviews (use with caution — some companies have thousands of pages).

# Actor input Schema

## `domains` (type: `array`):

List of company domains to scrape, e.g. \["amazon.com", "tokopedia.com"].

## `maxReviewsPerDomain` (type: `integer`):

Maximum number of reviews to fetch per domain. Set to 0 for unlimited.

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

Language filter for reviews. Use ISO code (e.g. 'en', 'id', 'de') or 'all' to fetch all languages.

## Actor input object example

```json
{
  "domains": [
    "amazon.com"
  ],
  "maxReviewsPerDomain": 0,
  "language": "all"
}
```

# Actor output Schema

## `dataset` (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 = {
    "domains": [
        "amazon.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/trustpilot-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 = { "domains": ["amazon.com"] }

# Run the Actor and wait for it to finish
run = client.actor("romy/trustpilot-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 '{
  "domains": [
    "amazon.com"
  ]
}' |
apify call romy/trustpilot-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/trustpilot-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/OkMkgL3yzQKbHwkEd/builds/ynTgK2Uxhrx6tRkTu/openapi.json
