# Trustpilot Business Scraper (`scrapeai/trustpilot-business-scraper`) Actor

Retrieves verified business data from Trustpilot using search queries, delivering structured details like business name, trust score, review count, contact info, location, and categories—ideal for B2B lead generation, market research, and business intelligence.

- **URL**: https://apify.com/scrapeai/trustpilot-business-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Lead generation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$4.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#rental-actors

## 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

## 🧠 Trustpilot Business Scraper - API Based

This Apify actor retrieves verified business data through the Trustpilot search API. Search by query to collect structured business information including name, trust score, reviews count, contact details, location, and categories. Perfect for B2B lead generation, market research, and business intelligence.

### ✅ Use Cases

- 📇 Generate business leads with verified trust scores
- 💬 Build contact lists for cold outreach campaigns
- 🏙️ Conduct market research by location and category
- 🧭 Perform competitive analysis in your niche
- 📊 Gather structured business intelligence from Trustpilot

### 📥 Input Configuration

You can customize the actor using the following input fields:

```json
{
    "query": "Jewelry store in New York",
    "maxPages": 10,
    "minTrustScore": 4.0,
    "minReviews": 100
}
````

#### 🧾 Fields Explained

| Field | Type | Description |
|-------|------|-------------|
| `query` | string | Search query for Trustpilot (e.g., "Jewelry store in New York", "Software companies in London") |
| `maxPages` | number | Maximum number of pages to scrape (10 results per page, max 100) |
| `minTrustScore` | number | Minimum trust score (0-5) to include businesses. Set to 0 for no filter. |
| `minReviews` | number | Minimum number of reviews to include businesses. Set to 0 for no filter. |

### 📤 Output

The actor returns a dataset containing structured business records from Trustpilot. Each record includes comprehensive details about the business, suitable for lead generation, analytics, and market research.

#### 🧩 Sample Output

```json
{
    "businessUnitId": "5d9d8280c8dfa00001c8546c",
    "displayName": "Talisa Jewelry",
    "identifyingName": "talisa.com",
    "stars": 4,
    "trustScore": 4.1,
    "numberOfReviews": 1898,
    "location": {
        "address": "250 Greenwich St",
        "city": "New York",
        "zipCode": "10007",
        "country": "United States"
    },
    "contact": {
        "website": "https://www.talisa.com/",
        "email": "support@talisa.com",
        "phone": "+1 (646) 846-1810"
    },
    "categories": [
        {
            "categoryId": "jewelry_store",
            "displayName": "Jewelry Store",
            "isPredicted": false
        },
        {
            "categoryId": "jewelry_designer",
            "displayName": "Jewelry Designer",
            "isPredicted": false
        }
    ],
    "logoUrl": "https://s3-eu-west-1.amazonaws.com/tpd/logos/5d9d8280c8dfa00001c8546c/0x0.png",
    "isRecommendedInCategories": false,
    "trustpilotUrl": "https://www.trustpilot.com/review/talisa.com"
}
```

#### 📋 Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `businessUnitId` | string | Unique Trustpilot business identifier |
| `displayName` | string | Business display name |
| `identifyingName` | string | Business domain/identifying name |
| `stars` | number | Star rating (1-5) |
| `trustScore` | number | Trustpilot trust score (0-5) |
| `numberOfReviews` | integer | Total number of reviews |
| `location` | object | Business location (address, city, zipCode, country) |
| `contact` | object | Contact info (website, email, phone) |
| `categories` | array | Business categories from Trustpilot |
| `logoUrl` | string | Business logo URL (if available) |
| `isRecommendedInCategories` | boolean | Whether recommended in categories |
| `trustpilotUrl` | string | Direct link to Trustpilot profile |

### 🔍 Data Source

- ✓ Data fetched exclusively via Trustpilot search API (HTTP GET requests)
- ✓ No HTML scraping or DOM parsing
- ✓ Verified business information directly from Trustpilot
- ✓ Automatic filtering and deduplication

### 🔒 Proxy Configuration

This actor uses standard HTTP headers with optional proxy support for:

- Avoiding IP-based rate limiting or bans
- Accessing location-specific data
- Ensuring stable data retrieval at scale

Configure proxy settings in Apify:

```json
{
  "useApifyProxy": true,
  "apifyProxyGroups": ["RESIDENTIAL"],
  "apifyProxyCountry": "US"
}
```

### 🚀 How to Use

1. Open the actor in Apify Console
2. Click "Try actor" or create a new task
3. Enter your search query (e.g., "Jewelry store in New York")
4. Configure optional filters (minimum trust score, minimum reviews)
5. Run the actor
6. Download results in JSON, CSV, or Excel format

### ⚙️ Advanced Input Example

```json
{
    "query": "Software companies in San Francisco",
    "maxPages": 20,
    "minTrustScore": 4.5,
    "minReviews": 500
}
```

### 🛠️ Tech Stack

- **Apify SDK** — actor orchestration and data handling
- **Node.js 18+** — runtime environment with native fetch API
- **Trustpilot Search API** — exclusive data source for business information

### 📊 Data Processing Features

- ✓ Automatic duplicate detection using Business Unit IDs
- ✓ Filtering by minimum trust score and review count
- ✓ Structured data parsing and normalization
- ✓ Comprehensive logging and error handling
- ✓ Schema validation for all output records

### 🔧 Local Development

#### Installation

```bash
npm install
```

#### Running the Actor

```bash
npm start
```

#### Validation

Validate all generated datasets against the schema:

```bash
node validate-datasets.js
```

#### Code Quality

Format code:

```bash
npm run format
```

Check linting:

```bash
npm run lint
```

### 📂 Project Structure

```
.
├── .actor/                          ## Actor configuration
│   ├── actor.json                  ## Actor metadata
│   ├── input_schema.json           ## Input parameters schema
│   ├── dataset_schema.json         ## Output dataset schema
│   ├── input.json                  ## Default input
│   ├── input-local.json            ## Local development input
│   └── input-production.json       ## Production input
├── src/
│   └── main.js                     ## Main actor script
├── storage/
│   └── datasets/default/           ## Generated datasets
├── package.json                    ## Dependencies
├── validate-datasets.js            ## Dataset validator
└── README.md                       ## This file
```

### 🤝 Support

For issues, questions, or feature requests, please refer to the Apify documentation or contact support.

# Actor input Schema

## `query` (type: `string`):

Search query for Trustpilot businesses (e.g., 'Jewelry store in New York', 'Software companies in London')

## `maxPages` (type: `integer`):

Maximum number of pages to scrape (10 results per page)

## `minTrustScore` (type: `number`):

Minimum trust score (0-5) to include businesses. Set to 0 for no filter.

## `minReviews` (type: `integer`):

Minimum number of reviews to include businesses. Set to 0 for no filter.

## Actor input object example

```json
{
  "query": "Jewelry store in New York",
  "maxPages": 10,
  "minTrustScore": 0,
  "minReviews": 0
}
```

# 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 = {
    "query": "Jewelry store in New York",
    "maxPages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeai/trustpilot-business-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 = {
    "query": "Jewelry store in New York",
    "maxPages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeai/trustpilot-business-scraper").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 '{
  "query": "Jewelry store in New York",
  "maxPages": 10
}' |
apify call scrapeai/trustpilot-business-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapeai/trustpilot-business-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Trustpilot Business Scraper",
        "description": "Retrieves verified business data from Trustpilot using search queries, delivering structured details like business name, trust score, review count, contact info, location, and categories—ideal for B2B lead generation, market research, and business intelligence.",
        "version": "2.0",
        "x-build-id": "8dttTUSl4BTxrOSf1"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapeai~trustpilot-business-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapeai-trustpilot-business-scraper",
                "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/scrapeai~trustpilot-business-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapeai-trustpilot-business-scraper",
                "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/scrapeai~trustpilot-business-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapeai-trustpilot-business-scraper",
                "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": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Search query for Trustpilot businesses (e.g., 'Jewelry store in New York', 'Software companies in London')",
                        "default": "Jewelry store in New York"
                    },
                    "maxPages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape (10 results per page)",
                        "default": 10
                    },
                    "minTrustScore": {
                        "title": "Minimum Trust Score",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Minimum trust score (0-5) to include businesses. Set to 0 for no filter.",
                        "default": 0
                    },
                    "minReviews": {
                        "title": "Minimum Reviews",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum number of reviews to include businesses. Set to 0 for no filter.",
                        "default": 0
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
