Google Play Store Reviews API -- next page token not returned from 3rd request when retrieving reviews

984 views Asked by At

I'm using this Google Play Store API to retrieve reviews: https://developers.google.com/android-publisher/api-ref/rest/v3/reviews/list

I was able to get OAuth2 authentication token, connect to the API endpoint, and get a list of reviews. For each request, I get 100 reviews. The app in question has about more than 300K reviews/ratings. However, I'm only able to grab 210 reviews.

In the first and second request to the API endpoint, I get a next page token (in the nextPageToken field) in the data. However, from the third request, the next page token is missing from the returned data.

  • First request: 100 reviews obtained; next page token issued
  • Second request: 100 reviews obtained; next page token issued
  • Third request: 10 reviews obtained; next page token NOT issued

Does anyone know why I don't get next page token from the third request to the API? I don't think I reached the "end" page, as I know there are over 300K reviews for the app.

1

There are 1 answers

0
Ilan P On

Oh boy I forgot - reviews with no feedback won’t be pulled, ie: ratings only: ‘Also, note that the API shows only the reviews that include comments. If a user rates your app but does not provide a comment, their feedback is not accessible from the API.’ As Google puts it in their docs: https://developers.google.com/android-publisher/reply-to-reviews

Possible many of the reviews your hitting may only be ratings - however, surprised you don’t have a next page token; when you dump the review post dates do you notice large gaps between the returned results in the 210? If so, could be the above is the reason.

—- Starting post before the above update —-

Since your limited to a MaxResults of 100 - I’d chunk it to see if I can get past the 210 returned results to see if it’s my calls timing out or anything if that nature - playing process of eliminations;

Loop this 5 times, https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews? access_token=your_auth_token&token=page_token&maxResults=50

Print the review IDs to console/page with a count, see if you break 250 even - if you do, don’t make 100 pills because for whatever reason it isn’t returning your requested data - could be the reviews aren’t “all published” with Google as I’ve experienced with GMB sometimes but often it could be server time outs, requesting an index far off the last index - can be anything until you rule it all out;

Pull 250 by max of 50s, that’s the best way to begin isolating IMO.