Registry / web-framework / google-play-scraper

google-play-scraper

JSON →
library1.2.7pypypi✓ verified 20d ago

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.

pip install google-play-scraper
INSTALL
IMPORT
SIG · GOOGLE-PLAY-SCRAPE
G
google-play-scraper
web-frameworkpythonv1.2.7
Install
1.6s avg
Import
136ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.138s · 18MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.134s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

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
from google_play_scraper import sort
Sort is an enum class and should be imported directly, not as a lowercase function/variable.
collection
from google_play_scraper import collection
developer
from google_play_scraper import developer

This quickstart demonstrates how to fetch an application's details and its latest user reviews using the `app` and `reviews` functions. It includes parameters for language and country, and shows how to paginate through reviews using `continuation_token` for larger datasets. Remember to replace 'com.whatsapp' with the actual package ID of the app you wish to scrape.

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.")
Debug
Known issues
gotchaAggressive 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.
fix
Implement `time.sleep()` between requests or use a rotating proxy service if allowed by Google Play's terms of service. The Node.js version of the scraper has a `throttle` property, which might inspire a similar approach if needed in Python.
affects: All versions
breakingGoogle 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.
fix
Regularly update the library to the latest version. Monitor the official GitHub repository for bug reports and patches related to parsing issues.
affects: All versions are susceptible to future UI/backend changes.
gotchaThe `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.
fix
Be aware of this limitation. For comprehensive review analysis beyond what the scraper can provide, consider official developer APIs (if applicable and sufficient) or specialized paid scraping services.
affects: All versions
gotchaThere 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.
fix
Always verify the PyPI package name and the GitHub repository (`JoMingyu/google-play-scraper`) to ensure you're using the correct library.
affects: All versions
Errors
Common errors & fixes
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This error occurs when the `google-play-scraper` library receives an empty or malformed response from the Google Play Store, typically because the scraper was blocked, rate-limited, or the website's response structure unexpectedly changed.
fix
Implement retry logic with exponential backoff and introduce delays (`time.sleep()`) between requests to avoid rate limiting. Consider using proxies if making a large number of requests. Verify that the app ID or other input parameters are valid.
HTTP status 429
The Google Play Store has detected too many requests originating from your IP address within a short timeframe, leading to temporary blocking or rate limiting.
fix
Introduce significant delays between your scraping requests using `time.sleep()`, implement an exponential backoff strategy, or utilize a pool of rotating proxies to distribute requests across multiple IP addresses.
AttributeError: 'NoneType' object has no attribute 'get'
This error indicates that the scraper attempted to access an attribute (like `.get()` or `.text`) on an object that was `None`. This often happens when the underlying parsing (e.g., via BeautifulSoup within the library) fails to locate an expected HTML element on the Google Play Store page, possibly due to changes in the website's structure or an invalid input ID.
fix
First, double-check that the `app_id` or other identifiers you are using are correct and exist on the Google Play Store. If the inputs are correct, the Google Play Store's HTML structure may have changed, which might require an update to the `google-play-scraper` library itself to adapt to the new structure.
ModuleNotFoundError: No module named 'google_play_scraper'
The `google-play-scraper` library is not installed in the Python environment you are currently using, or there is a typo in the import statement.
fix
Install the library using pip: `pip install google-play-scraper`. If using a virtual environment, ensure it is activated before installation and script execution. Verify the import statement is `from google_play_scraper import ...` or `import google_play_scraper`.
Upgrade
Version history
1.2.7latest on PyPI · released Jun 7, 2024
Audit
Dependencies
pythonrequiredRequires Python 3.7 or higher, but less than 4.0. The library itself claims to have no external dependencies, relying on standard Python features.
Agent activity
52 hits · last 30 days
node
48
Perplexity
1
Resources
google-play-scraper — pip install google-play-scraper · libregistry