Data Solutions API
-
Get business unit details
Get business unit details including TrustScore and review statistics.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/data-solutions/v1/business-units/{businessUnitId}
Parameters
-
businessUnitId, Required string
The business unit identifier
Example: .../v1/business-units/507f191e810c19729de860ea
curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units/{businessUnitId}" \-H "apikey: YOUR-API-KEY-HERE"Response
{"id": "507f191e810c19729de860ea","trustScore": 4.5,"stars": 4,"status": "active","country": "US","numberOfReviews": {"total": 10,"usedForTrustScoreCalculation": 8,"oneStar": 1,"twoStars": 2,"threeStars": 3,"fourStars": 2,"fiveStars": 2}} -
-
Find business units
Get all business units or search by domain.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/data-solutions/v1/business-units
Parameters
-
domain, Optional string
Domain you want to search for. For example, trustpilot.com
Example: ?domain=trustpilot.com
-
perPage, Optional number
Number of results per page (1-1000)
Example: ?perPage=20
-
page, Optional number
Page number for pagination (must be positive)
Example: ?page=1
curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units" \-H "apikey: YOUR-API-KEY-HERE"Response
{"businessUnits": [{"id": "507f191e810c19729de860ea","displayName": "Trustpilot","name": {"referring": ["Trustpilot"],"identifying": "Trustpilot"}}]} -
-
Get service reviews
Get service reviews for a specific business unit.
HTTP method: GET
Authentication: API Key
URL: https://api.trustpilot.com/data-solutions/v1/business-units/{businessUnitId}/reviews
Parameters
-
startDate, Optional string
Start date for filtering reviews (ISO 8601 format)
Example: ?startDate=2023-12-31
-
endDate, Optional string
End date for filtering reviews (ISO 8601 format)
Example: ?endDate=2023-12-31
-
nextToken, Optional string
Token for pagination to get the next set of reviews (base64 encoded JSON)
Example: ?nextToken=eyJ0b2tlbiI6ICJzYW1wbGVUb2tlbiIsICJwYWdlIjogMSwgInBlclBhZ2UiOiAyfQ==
-
businessUnitId, Required string
The business unit identifier
Example: .../v1/business-units/507f191e810c19729de860ea/reviews
curl -X GET "https://api.trustpilot.com/data-solutions/v1/business-units/{businessUnitId}/reviews" \-H "apikey: YOUR-API-KEY-HERE"Response
{"reviews": [{"id": "507f191e810c19729de860ea","stars": 4,"title": "Great Service!","text": "I had a wonderful experience.","language": "en","createdAt": "2023-12-31T12:00:00Z","updatedAt": "2023-12-31T12:00:00Z","experiencedAt": "2023-12-31T12:00:00Z","source": "organic"}],"nextToken": "eyJ0b2tlbiI6ICJzYW1wbGVUb2tlbiIsICJwYWdlIjogMSwgInBlclBhZ2UiOiAyfQ=="} -