Skip to content

How to use the Data Solutions API

The Data Solutions API provides access to Trustpilot’s data for all Business Units (domains).

To get specific information about a business, such as its TrustScore or consumer reviews, use the following steps:

To get started, you need to find the Business Unit ID for the company you’re interested in. You can do this by using the Find business unit endpoint and searching by the company’s domain name.

For example, to find trustpilot.com’s Business Unit ID, use the following code:

curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units?domain=trustpilot.com" \
-H "apikey: YOUR-API-KEY-HERE"

The API returns the Business Unit ID and other basic company details. Copy the ID to use in the next step. A typical response might look like this:

{
"businessUnits": [
{
"id": "507f191e810c19729de860ea",
"displayName": "Trustpilot",
"name": {
"referring": [
"Trustpilot"
],
"identifying": "Trustpilot"
}
}
]
}

If you’ve got the Business Unit ID for a business you’re interested in, use the following scenarios to retrieve specific data for that business.

To get a Business Unit’s TrustScore, star rating and the total number of reviews, use the Get business unit details endpoint and provide the Business Unit’s ID as a path parameter.

For example:

curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units/507f191e810c19729de860ea" \
-H "apikey: YOUR-API-KEY-HERE"

The response for business unit details includes the following:

ResponseDescription
idThe business unit’s ID on Trustpilot.
nameContainer for the business’s names.
name.displayThe name of the business as shown on Trustpilot.
name.identifyingThe base URL of the business website.
name.referringA list of domains associated with the business.
categoriesContainer for the business’s category information.
categories[].categoryIdCategory identifier.
categories[].isPrimaryReturns true if this is the primary category for the business.
isClaimedReturns true if the business has claimed its Trustpilot profile.
statusThe current operational status of the business profile on Trustpilot. This can return active or closed.
isSubscriberReturns true if the business pays for Trustpilot.
addressThe physical address of the business.
address.streetStreet address.
address.cityCity.
address.stateState.
address.countryThe country where the business is primarily based or registered.
address.countryCodeThe ISO 3166-1 alpha-2 code for the country.
address.postcodePostal code.
scoreContainer for performance scores.
score.starsThe business’s overall star rating, which is the trustScore rounded to the nearest 0.5.
score.trustScoreThe business’s overall TrustScore, calculated from all its reviews. It ranges from 1.0 to 5.0.
numberOfReviewsA breakdown of review counts.
numberOfReviews.totalThe total number of reviews the business has received on Trustpilot.
numberOfReviews.usedForTrustScoreCalculationThe number of reviews used to calculate the TrustScore.
numberOfReviews.oneStarThe number of active one star reviews.
numberOfReviews.twoStarsThe number of active two star reviews.
numberOfReviews.threeStarsThe number of active three star reviews.
numberOfReviews.fourStarsThe number of active four star reviews.
numberOfReviews.fiveStarsThe number of active five star reviews.
descriptionThe business’s self-reported description.
description.headerDescription header.
description.textDescription text.
contactEmailThe public contact email or link to a contact form.
contactPhoneNumberThe public contact phone number.
socialMediaLinks to the business’s social media profiles.
socialMedia.facebookFacebook profile URL.
socialMedia.linkedinLinkedIn profile URL.
socialMedia.twitterTwitter profile URL.
socialMedia.youtubeYoutube profile URL.
socialMedia.instagramInstagram profile URL.
websiteUrlThe URL that links out from a business’s Trustpilot profile to their website. This is either set by the business or automatically when the domain gets its first customer review.

Get the latest reviews for a business unit

Section titled “Get the latest reviews for a business unit”

If you want to display an up to date sample of a business’s reviews, use the Get latest reviews for business unitendpoint. To use this endpoint, pass in the Business Unit ID and define the number of reviews (up to five) that you want to receive.

For example:

curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units/507f191e810c19729de860ea/reviews/latest" \
-H "apikey: YOUR-API-KEY-HERE"

The response for a latest service review includes the following:

ResponseDescription
idThe review ID
starsHow many stars the consumer has given the domain, out of 5.
titleWhat the consumer titled the review.
textThe body of the review.
languageThe language the review is written in
createdAtThe time the review was submitted.
updatedAtThe time the review was updated, if at all.
experiencedAtThe point in the user journey that the review is about. For example, delivery.
sourceWhether the review was organic or prompted by an invitation.

To access a Business Unit’s reviews, use the Get service reviews endpoint and provide the Business Unit’s ID as a path parameter.

For example:

curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units/507f191e810c19729de860ea/reviews" \
-H "apikey: YOUR-API-KEY-HERE"

The response for a service review includes the following:

ResponseDescription
idThe review ID
starsHow many stars the consumer has given the domain, out of 5.
titleWhat the consumer titled the review.
textThe body of the review.
languageThe language the review is written in
createdAtThe time the review was submitted.
updatedAtThe time the review was updated, if at all.
experiencedAtThe point in the user journey that the review is about. For example, delivery.
sourceWhether the review was organic or prompted by an invitation.