请求协助:谷歌Play评论爬取接口https://play.google.com/store/getreviews返回404错误
getreviews Returns 404 Hey there, sorry to hear that the unofficial getreviews endpoint let you down so quickly—Google’s Play Store is super aggressive about blocking non-public API access, and that endpoint was never meant for external scraping in the first place. No wonder it stopped working after just one day. Let’s walk through some reliable alternatives to get your review scraping back on track:
1. Use the Official Google Play Developer API (Recommended)
This is the only legitimate, stable way to access Play Store reviews, and it’s supported by Google directly. Here’s how to get started:
- First, you’ll need a Google Cloud project and access to the Google Play Android Developer API. Enable it in your Cloud Console, then generate an API key or use OAuth 2.0 for authentication (OAuth is required if you need access to reviews for apps you don’t own, but you’ll need the app developer’s permission).
- Once set up, you can fetch reviews using a GET request like this:
This endpoint returns structured JSON data, handles pagination automatically, and won’t suddenly stop working like the unofficialGET https://play.googleapis.com/androidpublisher/v3/applications/com.your.app.package/reviewsgetreviewsendpoint. Just make sure to follow the API rate limits to avoid getting blocked.
2. Simulate Browser Behavior for Unofficial Scraping (If Official API Isn’t an Option)
If you can’t use the official API (e.g., you don’t have developer access to the app), you’ll need to mimic how a real user would browse reviews. Here’s what to focus on:
- Use Headless Browsers: Tools like Puppeteer or Selenium let you load the Play Store review page (e.g.,
https://play.google.com/store/apps/details?id=com.your.app.package&showAllReviews=true) and simulate scrolling to load more reviews. This avoids triggering Google’s anti-scraping measures as easily as direct POST requests. - Spoof Headers & Cookies: Always use a valid, up-to-date User-Agent string (match a recent Chrome/Firefox version), and preserve cookies between requests to maintain a "real user" session. Avoid sending too many requests in a short time—add random delays between actions.
- Dynamic XHR Monitoring: If you still want to use API-like calls, open your browser’s DevTools while browsing reviews, monitor the XHR requests that load additional reviews, and replicate those requests with proper headers and parameters. Keep in mind these endpoints can change at any time, so you’ll need to update your code regularly.
Critical Note on Compliance
Google’s Terms of Service prohibit unauthorized scraping of their services. If you’re scraping reviews for commercial use, stick to the official API to avoid account bans or legal issues. For personal use, proceed with caution and keep your scraping activity low-volume.
内容的提问来源于stack exchange,提问作者shivakrishna

