App Ratings
Fetch rating distribution (star counts and average) for an app.
Endpoint
GET /api/insights/{store}/app/{bundleId}/ratings/
Path Parameters
| Parameter | Required | Description |
|---|---|---|
store | Yes | apple or google |
bundleId | Yes | App bundle identifier |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
country | string | Smart fallback | Country code |
lang | string | en | Language (Google only) |
Example Request
GET /api/insights/apple/app/com.spotify.client/ratings/?country=us
Response
Returns rating distribution data. Shape varies by store:
Apple:
{
"average": 4.3,
"count": 15234567,
"histogram": {
"1": 823456,
"2": 412345,
"3": 1234567,
"4": 3456789,
"5": 9307410
}
}
Google:
{
"average": 4.1,
"count": 28456123,
"histogram": {
"1": 2845612,
"2": 1422806,
"3": 4268418,
"4": 8536836,
"5": 11382451
}
}
Cache
| Header | Value |
|---|---|
s-maxage | 86400 (24 hours) |
max-age | 3600 (1 hour) |
stale-while-revalidate | 7200 (2 hours) |
Errors
| Status | Description |
|---|---|
| 400 | Missing/invalid store or bundleId |
| 404 | App not found |
| 429 | Rate limit exceeded |
| 503 | Network/timeout error |
| 500 | Upstream API failure |