PHPackages                             larsnieuwenhuizen/trustpilot - 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. larsnieuwenhuizen/trustpilot

ActiveLibrary[API Development](/categories/api)

larsnieuwenhuizen/trustpilot
============================

PHP library for communication with the Trustpilot API

1.0.1(6y ago)110.8k2[2 PRs](https://github.com/LarsNieuwenhuizen/Trustpilot/pulls)MITPHPPHP &gt;=7.3CI failing

Since Jun 5Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/LarsNieuwenhuizen/Trustpilot)[ Packagist](https://packagist.org/packages/larsnieuwenhuizen/trustpilot)[ RSS](/packages/larsnieuwenhuizen-trustpilot/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

[![Code Climate](https://camo.githubusercontent.com/58900f732752802f4cff9dbeedd5d0b4f32b8269f1ce1afb0a108dc10cb31045/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4c6172734e69657577656e6875697a656e2f547275737470696c6f742f6261646765732f6770612e737667)](https://codeclimate.com/github/LarsNieuwenhuizen/Trustpilot)[![Test Coverage](https://camo.githubusercontent.com/c7486af71612f267d7b093b1ed6536deab91e9495a9f244509a5c3d811e7717f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f4c6172734e69657577656e6875697a656e2f547275737470696c6f742f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/LarsNieuwenhuizen/Trustpilot/coverage)[![Build Status](https://camo.githubusercontent.com/606e3c7e94d27164fa94928de5d18468bd4da52f3a34aeb62e734329f5b38d47/68747470733a2f2f7472617669732d63692e6f72672f4c6172734e69657577656e6875697a656e2f547275737470696c6f742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/LarsNieuwenhuizen/Trustpilot)[![StyleCI](https://camo.githubusercontent.com/c3fbac38e74a496981fa936202901042c46bfa165b8f410accaf49745a929d69/68747470733a2f2f7374796c6563692e696f2f7265706f732f38373832323834312f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/87822841)

Trustpilot
==========

[](#trustpilot)

PHP library for communication with Trustpilot

Under development
-----------------

[](#under-development)

This package is currently being developed (12-04-2017)

This package will first only support the public routes which require access through api key. Later on the private requests will be added with oAuth support.

Functioning calls
-----------------

[](#functioning-calls)

- #### Business units

    [](#business-units)

    - Get public business unit
    - Get a business unit's reviews
    - Get a business unit's categories
    - Get a business unit's web links
    - Get a list of business units
- #### Categories

    [](#categories)

    - Get category
    - List business units in category
- #### Consumers

    [](#consumers)

    - Get a consumer's reviews
    - Get the profile of the consumer
    - Get the profile of the consumer(with #reviews and weblinks)

Example setup
-------------

[](#example-setup)

The configuration class with search for a config.yaml file in the root of the project and use those settings by default.

You can also define a different file using the Configuration constructor like this:

```
$configuration = new Trustpilot\Configuration('path/to/my/config.yaml');
```

If you've got that file, configuration can be set as such:

```
TrustPilot:
  baseUrl: 'https://api.trustpilot.com/'
  basePath: 'v1/'
  resultsPerPage: 5
  orderBy: 'createdat.desc'
  apiKey: 'myApiKey'
```

If you do not have a yaml file the Configuration can be created using the setters. The setters can always be used to override any Configuration property.

```
$configuration = new \LarsNieuwenhuizen\Trustpilot\Configuration();
$configuration->setBaseUrl('https://api.trustpilot.com/')
    ->setBasePath('v1/')
    ->setDefaultResultsPerPage(5)
    ->setDefaultOrderBy('createdat.desc')
    ->setApiKey('apikey');

$client = new \LarsNieuwenhuizen\Trustpilot\Client($configuration);

$result = $client->businessDataService->getAllBusinessUnits();
```

Install via composer
--------------------

[](#install-via-composer)

```
$ composer require larsnieuwenhuizen/trustpilot
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance50

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% 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

Every ~0 days

Total

2

Last Release

2216d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97544bd744bf40a6da900dca3f865c9a4c819e4e115eafcea88fa674157d8651?d=identicon)[lars.nieuwenhuizen](/maintainers/lars.nieuwenhuizen)

---

Top Contributors

[![LarsNieuwenhuizen](https://avatars.githubusercontent.com/u/479364?v=4)](https://github.com/LarsNieuwenhuizen "LarsNieuwenhuizen (6 commits)")[![alexoanea](https://avatars.githubusercontent.com/u/1708430?v=4)](https://github.com/alexoanea "alexoanea (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/larsnieuwenhuizen-trustpilot/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.5M925](/packages/statamic-cms)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M717](/packages/sylius-sylius)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[currency-cloud/client

A PHP library which implements the complete functionality of v2 of the The Currency Cloud API.

17338.5k](/packages/currency-cloud-client)

PHPackages © 2026

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