Python wrapper around the Node.js module to scrape application data from the Google Play store. Please refer to the module's page for the most up-to-date information about the API.
Any questions, suggestions, or issues with the underlying Node.js functionality should be directed to facundoolano, who is the developer of the original module.
First, ensure that you have the latest version of Node.js installed on your machine.
Then, install the library:
pip install google-play-scraper-py
This will also include the required Node dependencies.
import scraper
result = scraper.app(appId='com.google.android.apps.translate')
print(result)
Results:
{
'adSupported': False,
'androidVersion': 'VARY',
'androidVersionText': 'Varies with device',
'appId': 'com.google.android.apps.translate',
'comments': [...],
'contentRating': 'Everyone',
'currency': 'USD',
'description': ...,
'descriptionHTML': ...,
'developer': 'Google LLC',
'developerAddress': '1600 Amphitheatre Parkway, Mountain View 94043',
'developerEmail': '[email protected]',
'developerId': '5700313618786177705',
'developerInternalID': '5700313618786177705',
'developerWebsite': 'http://support.google.com/translate',
'editorsChoice': False,
'free': True,
'genre': 'Tools',
'genreId': 'TOOLS',
'headerImage': 'https://play-lh.googleusercontent.com/e4Sfy0cOmqpike76V6N6n-tDVbtbmt6MxbnbkKBZ_7hPHZRfsCeZhMBZK8eFDoDa1Vf-',
'histogram': {'1': 458414,
'2': 158469,
'3': 420198,
'4': 941431,
'5': 5851958},
'icon': 'https://play-lh.googleusercontent.com/ZrNeuKthBirZN7rrXPN1JmUbaG8ICy3kZSHt-WgSnREsJzo2txzCzjIoChlevMIQEA',
'installs': '1,000,000,000+',
'maxInstalls': 1004629541,
'minInstalls': 1000000000,
'offersIAP': False,
'price': 0,
'priceText': 'Free',
'privacyPolicy': 'http://www.google.com/policies/privacy/',
'ratings': 7830472,
'recentChanges': 'Bug fixes and improvements',
'reviews': 1924772,
'score': 4.477567,
'scoreText': '4.5',
'screenshots': [...],
'size': 'Varies with device',
'summary': 'The world is closer than ever with over 100 languages',
'title': 'Google Translate',
'updated': 1616099487000,
'url': 'https://play.google.com/store/apps/details?id=com.google.android.apps.translate&hl=en&gl=us',
'version': 'Varies with device'
}
Available methods:
- app: Retrieves the full detail of an application.
- list: Retrieves a list of applications from one of the collections at Google Play.
- search: Retrieves a list of apps that results of searching by the given term.
- developer: Returns the list of applications by the given developer name.
- suggest: Given a string returns up to five suggestion to complete a search query term.
- reviews: Retrieves a page of reviews for a specific application.
- similar: Returns a list of similar apps to the one specified.
- permissions: Returns the list of permissions an app has access to.
- datasafety: Returns the data safety information of an app.
- categories: Retrieve a full list of categories present from dropdown menu on Google Play.
Retrieves the full detail of an application. Options:
appId
: the Google Play id of the application (the?id=
parameter on the url).lang
(optional, defaults to'en'
): the two letter language code in which to fetch the app page.country
(optional, defaults to'us'
): the two letter country code used to retrieve the applications. Needed when the app is available only in some countries.
Retrieve a list of applications from one of the collections at Google Play. Options:
collection
(optional, defaults tocollection.TOP_FREE
): the Google Play collection that will be retrieved. Available options can bee found here.category
(optional, defaults to no category): the app category to filter by. Available options can bee found here.age
(optional, defaults to no age filter): the age range to filter the apps (only for FAMILY and its subcategories). Available options areage.FIVE_UNDER
,age.SIX_EIGHT
,age.NINE_UP
.num
(optional, defaults to 500): the amount of apps to retrieve.lang
(optional, defaults to'en'
): the two letter language code used to retrieve the applications.country
(optional, defaults to'us'
): the two letter country code used to retrieve the applications.fullDetail
(optional, defaults tofalse
): iftrue
, an extra request will be made for every resulting app to fetch its full detail.
Retrieves a list of apps that results of searching by the given term. Options:
term
: the term to search by.num
(optional, defaults to 20, max is 250): the amount of apps to retrieve.lang
(optional, defaults to'en'
): the two letter language code used to retrieve the applications.country
(optional, defaults to'us'
): the two letter country code used to retrieve the applications.fullDetail
(optional, defaults tofalse
): iftrue
, an extra request will be made for every resulting app to fetch its full detail.price
(optional, defaults toall
): allows to control if the results apps are free, paid or both.all
: Free and paidfree
: Free apps onlypaid
: Paid apps only
Returns the list of applications by the given developer name. Options:
devId
: the name of the developer.lang
(optional, defaults to'en'
): the two letter language code in which to fetch the app list.country
(optional, defaults to'us'
): the two letter country code used to retrieve the applications. Needed when the app is available only in some countries.num
(optional, defaults to 60): the amount of apps to retrieve.fullDetail
(optional, defaults tofalse
): iftrue
, an extra request will be made for every resulting app to fetch its full detail.
Given a string returns up to five suggestion to complete a search query term. Options:
term
: the term to get suggestions for.lang
(optional, defaults to'en'
): the two letter language code used to retrieve the suggestions.country
(optional, defaults to'us'
): the two letter country code used to retrieve the suggestions.
Retrieves a page of reviews for a specific application.
Note that this method returns reviews in a specific language (english by default), so you need to try different languages to get more reviews. Also, the counter displayed in the Google Play page refers to the total number of 1-5 stars ratings the application has, not the written reviews count. So if the app has 100k ratings, don't expect to get 100k reviews by using this method.
You can get all reviews at once, by sending the num
parameter (i.g. 5000), or paginated reviews (with 150 per page), by setting the pagination
parameter to true;
You'll have to choose wich method is better for your use case.
By setting num
+ paginate
, the num parameter will be ignored and you will receive a paginated response instead.
Options:
appId
: Unique application id for Google Play. (e.g. id=com.mojang.minecraftpe maps to Minecraft: Pocket Edition game).lang
(optional, defaults to'en'
): the two letter language code in which to fetch the reviews.country
(optional, defaults to'us'
): the two letter country code in which to fetch the reviews.sort
(optional, defaults tosort.NEWEST
): The way the reviews are going to be sorted. Accepted values are:sort.NEWEST
,sort.RATING
andsort.HELPFULNESS
.num
(optional, defaults to100
): Quantity of reviews to be captured.paginate
(optional, defaults tofalse
): Defines if the result will be paginatednextPaginationToken
(optional, defaults tonull
): The next token to paginate
Returns a list of similar apps to the one specified. Options:
appId
: the Google Play id of the application to get similar apps for.lang
(optional, defaults to'en'
): the two letter language code used to retrieve the applications.country
(optional, defaults to'us'
): the two letter country code used to retrieve the applications.fullDetail
(optional, defaults tofalse
): iftrue
, an extra request will be made for every resulting app to fetch its full detail.
Returns the list of permissions an app has access to.
appId
: the Google Play id of the application to get permissions for.lang
(optional, defaults to'en'
): the two letter language code in which to fetch the permissions.short
(optional, defaults tofalse
): iftrue
, the permission names will be returned instead of permission/description objects.
Returns the data safety information of an application. The data safety is categorized into lists of "data shared", "data collected" and "security practices". Addtionally, the URL to the privacy policy is returned.
appId
: the Google Play id of the application to get permissions for.lang
(optional, defaults to'en'
): the two letter language code in which to fetch the permissions.
Retrieve a full list of categories present from dropdown menu on Google Play.
- this method has no options
All methods on the scraper have to access the Google Play server in one
form or another. When making too many requests in a short period of time
(specially when using the fullDetail
option), is common to hit Google Play's
throttling limit. That means requests start getting status 503 responses with
a captcha to verify if the requesting entity is a human (which is not :P).
In those cases the requesting IP can be banned from making further requests for a
while (usually around an hour).
To avoid this situation, all methods now support a throttle
property, which
defines an upper bound to the amount of requests that will be attempted per second.
Once that limit is reached, further requests will be held until the second passes.
import scraper
scraper.search(term='panda', throttle=10)
By default, no throttling is applied.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.