PHPackages                             rrortega/trustpilot-review-collector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rrortega/trustpilot-review-collector

ActiveLibrary[API Development](/categories/api)

rrortega/trustpilot-review-collector
====================================

TrustpilotReviewCollector is a PHP class designed to fetch and parse profile business data and reviews from Trustpilot.com

v1.0.0(3y ago)02.8k↓50%1[1 PRs](https://github.com/rrortega/trustpilot-review-collector/pulls)MITPHPPHP ^7.4

Since Mar 22Pushed 2y ago2 watchersCompare

[ Source](https://github.com/rrortega/trustpilot-review-collector)[ Packagist](https://packagist.org/packages/rrortega/trustpilot-review-collector)[ RSS](/packages/rrortega-trustpilot-review-collector/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

trustpilot-reviews-collector
============================

[](#trustpilot-reviews-collector)

Retrive data from Trustpilot.com TrustpilotReviewCollector is a PHP class designed to fetch and parse reviews and business profile from Trustpilot.com for a specified business unit ID. It supports pagination and allows customization of the number of reviews to fetch, sorting, and ordering. The class uses Symfony\\DomCrawler and Symfony\\HttpClient.

Installation
------------

[](#installation)

You can install TrustpilotReviewCollector library via Composer:

```
composer require rrortega/trustpilot-review-collector
```

Usage
-----

[](#usage)

Here's an example of how to use TrustpilotReviewCollector:

```
use RRO\Review\Collector\TrustpilotReviewCollector;

$businessUnitId="www.google.com";
$count=5;
$orderby = 'time';
$order = 'desc'
$trustpilot = new TrustpilotReviewCollector($businessUnitId,$count, $orderby , $order );
$reviews = $trustpilot->getReviews();

// The fetched reviews include details such as review ID, user, avatar, verified status, title, URL, content, rating, time,answer and answer_time.

foreach($reviews as $r){

     // echo  $r["id"];
     // echo  $r["user"];
     // echo  $r["avatar"];
     // echo  $r["verified"]; //true if user is verified in truspilot
     // echo  $r["iso"];//user country iso2
     // echo  $r["title"];
     // echo  $r["url"];
     // echo  $r["body"];
     // echo  $r["rating"]; //1 to 5 float value
     // echo  $r["time"]; //ex: 2023-03-20T13:30:34.000Z
}

// The profile include details such as business, category, website, logo, rating, qualification, and total_reviews.

$details= $trustpilot->getReviews();
 // echo  $details["business"];
 // echo  $details["category"];
 // echo  $details["website"];
 // echo  $details["logo"];
 // echo  $details["rating"];
 // echo  $details["qualification"];
 // echo  $details["total_reviews"];
```

Testing
-------

[](#testing)

You can run the unit tests for TrustpilotReviewCollector Library using PHPUnit:

```
./vendor/bin/phpunit

```

License
-------

[](#license)

TrustpilotReviewCollector Library is licensed under the MIT license. See the LICENSE file for more information.

---

NO SEAS MALITO Y REGÁLAME UN CAFECITO 👉

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/686a458c23cf789d3e8b3df17c3bdb07194f2d6efbe7c4ef2919f437a0078889?d=identicon)[rrortega](/maintainers/rrortega)

---

Top Contributors

[![rrortega](https://avatars.githubusercontent.com/u/34726482?v=4)](https://github.com/rrortega "rrortega (21 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rrortega-trustpilot-review-collector/health.svg)

```
[![Health](https://phpackages.com/badges/rrortega-trustpilot-review-collector/health.svg)](https://phpackages.com/packages/rrortega-trustpilot-review-collector)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[storyblok/php-content-api-client

PHP Client for Storyblok Content API

11136.8k4](/packages/storyblok-php-content-api-client)[storyblok/php-management-api-client

Storyblok PHP Client for Management API

1224.4k1](/packages/storyblok-php-management-api-client)[smnandre/pagespeed-api

PageSpeed Insight PHP Api Client 🚀 Analyse web pages for performances metrics, core web vitals...

1511.5k](/packages/smnandre-pagespeed-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
