Skip to content

How to use the Data Solutions API

The Data Solutions API provides access to Trustpilot’s data for all business profiles.

To retrieve specific information about a business, such as its TrustScore or consumer reviews, you’ll first need to find its unique identifier, known as a business unit ID.

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

For example, to find the business unit ID for trustpilot.com:

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

The API will return a response containing the business unit details, including the id. Copy this business unit ID to use in the next step. A typical response will look like this:

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

Step 2: Get Business Data Using the Business Unit ID

Section titled “Step 2: Get Business Data Using the Business Unit ID”

Once you have the business unit ID, you can use it as a path parameter in other endpoints to retrieve specific data for that business.

To get a business’s TrustScore, star rating, and the total number of reviews, use the Get business unit details endpoint and include the business unit ID in the URL.

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

To retrieve consumer reviews for a business, use the Get service reviews with the business unit ID. You can also specify a date range to get reviews for a particular period.

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 details:

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 at, 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.