Skip to Content
API ReferenceEndpointsReview Statistics

Review Statistics

GET/api/v1/reviews/stats

Retrieve aggregate review statistics for your organization, including total review count, average rating, sentiment score, platform breakdown, and rating distribution.

Authentication

Bearer API Key — requires a Growth plan or higher.

curl "https://app.prooflio.io/api/v1/reviews/stats" \ -H "Authorization: Bearer YOUR_API_KEY"

Response

200 OK

{ "data": { "totalReviews": 142, "averageRating": 4.37, "averageSentiment": 0.71, "last30Days": 23, "last7Days": 8, "platforms": [ { "platform": "GOOGLE", "count": 87, "averageRating": 4.5 }, { "platform": "YELP", "count": 34, "averageRating": 4.1 }, { "platform": "TRUSTPILOT", "count": 21, "averageRating": 4.3 } ], "ratingDistribution": [ { "rating": 1, "count": 3 }, { "rating": 2, "count": 5 }, { "rating": 3, "count": 12 }, { "rating": 4, "count": 45 }, { "rating": 5, "count": 77 } ] } }

Response Fields

FieldTypeDescription
totalReviewsnumberTotal number of reviews across all platforms.
averageRatingnumber | nullOverall average star rating (1–5).
averageSentimentnumber | nullOverall average AI sentiment score (0–1).
last30DaysnumberNumber of new reviews received in the past 30 days.
last7DaysnumberNumber of new reviews received in the past 7 days.
platformsarrayBreakdown by platform with count and average rating.
ratingDistributionarrayCount of reviews per star rating (1–5).

Platform Object

FieldTypeDescription
platformstringPlatform name (e.g., GOOGLE, YELP).
countnumberNumber of reviews from this platform.
averageRatingnumber | nullAverage rating for this platform.

Rating Distribution Object

FieldTypeDescription
ratingnumber | nullStar rating value (1–5).
countnumberNumber of reviews with this rating.

Error Responses

StatusDescription
401 UnauthorizedMissing or invalid API key.
403 ForbiddenPlan does not include API access.
429 Too Many RequestsRate limit exceeded.

Usage Example

const response = await fetch('https://app.prooflio.io/api/v1/reviews/stats', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' }, }); const { data } = await response.json(); console.log(`Total reviews: ${data.totalReviews}`); console.log(`Average rating: ${data.averageRating}★`); console.log(`Avg sentiment: ${(data.averageSentiment * 100).toFixed(0)}% positive`); console.log(`New this week: ${data.last7Days}`); // Find your top platform const topPlatform = data.platforms.sort((a, b) => b.count - a.count)[0]; console.log(`Top platform: ${topPlatform.platform} (${topPlatform.count} reviews)`);
Last updated on