RESTful API for accessing Trustpilot product review data
API Secret: All public endpoints require api-secret as the authentication parameter.
Access: These endpoints are publicly accessible for testing and integration purposes.
Method: GET
Purpose: Simple SKU-based review lookup
Best for: Legacy integrations, simple use cases
Rate limit: 30 requests/minute
Method: POST
Purpose: Batch processing with validation
Best for: Production applications, structured data
Rate limit: 30 requests/minute
Method: POST
Purpose: High-performance batch processing
Best for: High-volume applications, real-time sync
Rate limit: 30 requests/minute
1. Choose Your API Version:
2. Get Your API Secret:
API Secret: {Your provided api-secret}
3. Test the API:
curl -X POST "http://your-domain/api/v3/trustpilot/product-reviews/{api-secret}/batch-summaries/" \
-H "Content-Type: application/json" \
-d '{"products": [{"id": "123", "skus": ["sku1", "sku2"]}]}'
GET /api/v1/trustpilot/product-reviews/{api-secret}
Fetches Trustpilot product reviews for specific SKUs. This is the legacy endpoint that accepts comma-separated SKUs and returns aggregated review data.
GET /api/v1/trustpilot/product-reviews/{api-secret}?sku=42397086548162,42397086646466
{
"total_reviews": 153,
"average_stars": 4.8,
"api_type": "public"
}
200 Success - Reviews retrieved successfully
400 Bad Request - Missing SKU parameter
403 Forbidden - Invalid business ID
401 Unauthorized - Authentication error (when using private API)
500 Internal Server Error - Server error occurred
POST /api/v2/trustpilot/product-reviews/{api-secret}/batch-summaries/
Fetches Trustpilot product reviews for multiple products in a single request. This endpoint processes multiple products with their associated SKUs and returns structured review data maintaining product relationships. The endpoint includes comprehensive payload validation to ensure data integrity.
Content-Type: application/json
Validation Rules:
id (non-empty string) and skus (array){
"products": [
{
"id": "426547893629",
"skus": ["42397086548162", "42397086580930", "42397086613698"]
},
{
"id": "246547893623",
"skus": ["42397086548163"]
},
{
"id": "526545456786",
"skus": ["42397086548164", "42397086580935", "42397086613666"]
}
]
}
Array Format (default):
{
"reviews": [
{
"product_id": "426547893629",
"average_stars": 4.8,
"total_reviews": 153
},
{
"product_id": "246547893623",
"average_stars": 4.2,
"total_reviews": 45
}
]
}
Hash Format (?format=hash) - Optimized for Shopify:
{
"reviews": {
"426547893629": {
"average_stars": 4.8,
"total_reviews": 153
},
"246547893623": {
"average_stars": 4.2,
"total_reviews": 45
}
}
}
200 Success - Reviews retrieved successfully
400 Bad Request - Invalid or missing JSON payload, validation errors
403 Forbidden - Invalid business ID
401 Unauthorized - Authentication error (when using private API)
500 Internal Server Error - Server error occurred
Missing products field:
{"error": "Missing 'products' field in payload"}
Empty products array:
{"error": "'products' array cannot be empty"}
Too many products:
{"error": "'products' array cannot contain more than 100 items"}
Missing skus field:
{"error": "Product at index 0 missing required 'skus' field"}
Too many SKUs:
{"error": "Product at index 0 'skus' cannot contain more than 50 SKUs"}
Invalid SKU format:
{"error": "Product at index 0, SKU at index 1 contains invalid characters"}
POST /api/v3/trustpilot/product-reviews/{api-secret}/batch-summaries/
Recommended for high-volume applications and production use.
The v3 endpoint is our most optimized version for batch processing multiple products. It uses advanced batching strategies to minimize API calls and maximize throughput. Perfect for high-volume applications, e-commerce platforms, and real-time product catalog synchronization.
Content-Type: application/json
Same format as v2:
{
"products": [
{
"id": "426547893629",
"skus": ["42397086548162", "42397086580930", "42397086613698"]
},
{
"id": "246547893623",
"skus": ["42397086548163"]
}
]
}
Same as v2 endpoint
Includes performance metrics:
{
"reviews": [
{
"product_id": "426547893629",
"average_stars": 4.8,
"total_reviews": 153
}
],
"performance": {
"api_calls_made": 1,
"processing_time_ms": 120,
"total_skus_processed": 4,
"skus_per_second": 33.33,
"average_skus_per_api_call": 4.0
}
}
/api/v2/ to /api/v3/No code changes required beyond the URL!
api-secret is accepted for public accesscURL Example for v3 endpoint:
curl -X POST "http://localhost:5000/api/v3/trustpilot/product-reviews/api-secret/batch-summaries/"
-H "Content-Type: application/json"
-d '{
"products": [
{
"id": "426547893629",
"skus": ["42397086548162", "42397086580930"]
}
]
}'
cURL Example for v2 endpoint:
curl -X POST "http://localhost:5000/api/v2/trustpilot/product-reviews/api-secret/batch-summaries/"
-H "Content-Type: application/json"
-d '{
"products": [
{
"id": "426547893629",
"skus": ["42397086548162", "42397086580930"]
}
]
}'
cURL Example for v1 endpoint:
curl "http://localhost:5000/api/v1/trustpilot/product-reviews/api-secret/?sku=42397086548162,42397086580930"