Google Play Scraper
Google-Play-Scraper is a Python library that provides APIs to easily crawl the Google Play Store for app details, reviews, search results, and more, without external dependencies. It is actively maintained with frequent updates to adapt to changes in the Play Store's structure. The current version is 1.2.7.
Warnings
- gotcha Aggressive scraping (too many requests in a short period) can lead to Google Play throttling your requests, returning 503 errors, captchas, or even temporary IP bans. Consider implementing delays or using proxies for large-scale operations.
- breaking Google Play's website structure can change periodically. Since this library directly scrapes HTML, such changes can break parsing logic, causing functions to return incomplete data or fail entirely.
- gotcha The `reviews_all` function (and `reviews` with pagination) may not fetch *all* reviews for apps with extremely high review counts (e.g., millions). Google Play often limits the number of accessible reviews via its endpoints, and the scraper might hit a cap, commonly returning a multiple of 199 or 200 reviews per batch. The total number of written reviews is typically much lower than the total star ratings shown.
- gotcha There are several similarly named Python and Node.js libraries (e.g., `play-scraper`, `google-play-scraper-dmi`, `facundoolano/google-play-scraper` which is Node.js). Ensure you are installing and importing from `google-play-scraper` by JoMingyu for the intended Python library.
Install
-
pip install google-play-scraper
Imports
- app
from google_play_scraper import app
- search
from google_play_scraper import search
- reviews
from google_play_scraper import reviews
- reviews_all
from google_play_scraper import reviews_all
- Sort
from google_play_scraper import Sort
- collection
from google_play_scraper import collection
- developer
from google_play_scraper import developer
Quickstart
from google_play_scraper import app, reviews, Sort
# Fetch details for a specific app (e.g., WhatsApp)
result = app(
'com.whatsapp',
lang='en', # defaults to 'en'
country='us' # defaults to 'us'
)
print("App Details:")
print(f" Title: {result.get('title')}")
print(f" Developer: {result.get('developer')}")
print(f" Score: {result.get('scoreText')}")
print(f" Installs: {result.get('installs')}")
# Fetch latest reviews for the app
result_reviews, continuation_token = reviews(
'com.whatsapp',
lang='en',
country='us',
sort=Sort.NEWEST,
count=10 # Number of reviews to fetch per call
)
print("\nLatest 10 Reviews:")
for i, review in enumerate(result_reviews):
print(f" {i+1}. User: {review.get('userName')}, Score: {review.get('score')}, Text: {review.get('content')[:70]}...")
# To get all reviews (be cautious with large apps, see warnings)
# all_reviews = []
# for _ in range(5): # Example: fetch 5 batches
# result_reviews, continuation_token = reviews(
# 'com.whatsapp',
# lang='en',
# country='us',
# sort=Sort.NEWEST,
# count=200, # Max reviews per page
# continuation_token=continuation_token
# )
# all_reviews.extend(result_reviews)
# if not continuation_token: break
# print(f"\nFetched total {len(all_reviews)} reviews.")