Trustpilot API.
A client wanted to show its Trustpilot reviews on their webshop, but wanted more options than the Trustpilot Widget allowed. Once you login to the Trustpilot Business portal you can get an API key and use that to get the data.
The following 3 endpoints provided me with all the data I needed for the job:
https://api.trustpilot.com/v1/business-units//reviews?apikey=&stars=3,4,5&language=en
This gives you the service reviews. The Weglote javascript object gave me the information about the current language, and I added an eventlistener to check when the user would change language to fetch new reviews in the correct language.
https://api.trustpilot.com/v1/business-units/?apikey=
Of course, we also want to show the overall score, and the amount of reviews. This API endpoint provided this data, as well as an endpoint to get the green stars image to show on your site.
https://api.trustpilot.com/v1/product-reviews/business-units/?apikey=&sku=
A last request was to show the individual product scores for every product. Here we get individual values for value for money and quality.