Skip to main content

Modern, typed Google Play Store scraper client with Pydantic models.

Project description

play-store-scraper-ng

Tests PyPI version

Modern, typed Google Play Store scraper client for Python. Fetch app details, search results, top lists, reviews, and search suggestions with a clean API and Pydantic models.

Based on and inspired by the original work at https://github.com/facundoolano/google-play-scraper, reworked with type hints, Pydantic models, and a simpler client API.

Features

  • Simple high-level client: GooglePlayClient
  • Typed data models for responses via Pydantic: AppDetails, AppOverview, Review
  • Search apps, fetch app details, list collections, reviews with pagination, and query suggestions
  • Locale and country support (e.g., hl=en, gl=us)
  • Optional throttling, proxy support, and SSL verification control
  • Python 3.11+

Installation

Install from PyPI:

pip install play-store-scraper-ng

Requires Python 3.11 or newer.

Quickstart

from google_play_scraper import GooglePlayClient

client = GooglePlayClient(country="us", lang="en")

# Fetch app details by ID
details = client.app("com.whatsapp")
print(details.title, details.score, details.installs)

# Search apps
results = client.search("todo list", num=10)
for app in results:
    print(app.title, app.score)

Usage

Client initialization

from google_play_scraper import GooglePlayClient

client = GooglePlayClient(
    country="us",                 # default country code for requests
    lang="en",                    # default language for responses
    proxies={"https": "http://host:port"},  # optional proxies for requests.Session
    throttle_requests_per_second=2,            # optional rate limit
    verify_ssl=True               # set to False to skip SSL verification (not recommended)
)

Parameters may be overridden per-call where supported (see below).

Get app details

from google_play_scraper import GooglePlayClient

client = GooglePlayClient()
app = client.app("com.spotify.music", lang="en", country="us")

print(app.title)
print(app.score, app.score_text)
print(app.price, app.currency)
print(app.developer, app.developer_email)
print(app.installs, app.min_installs, app.max_installs)
print(app.updated)
print(app.screenshots[:3])

Returns an AppDetails model (extends AppOverview).

Search

from google_play_scraper import GooglePlayClient

client = GooglePlayClient()
apps = client.search("timer", num=20, price="all", lang="en", country="us")
for a in apps:
    # a is AppOverview
    print(a.app_id, a.title, a.score)

price can be one of: "all" (default), "free", "paid".

List collections

from google_play_scraper import GooglePlayClient, Collection, Category, Age

client = GooglePlayClient()

top_free_tools = client.list(
    collection=Collection.TOP_FREE,
    category=Category.TOOLS,
    num=50,
    lang="en",
    country="us",
)

for app in top_free_tools:
    print(app.title, app.score)

See google_play_scraper.constants for available Category, Collection, and Age values.

Reviews with pagination

from google_play_scraper import GooglePlayClient, Sort

client = GooglePlayClient()

reviews, next_token = client.reviews(
    app_id="com.whatsapp",
    sort=Sort.NEWEST,     # or Sort.RATING / Sort.HELPFULNESS
    num=100,              # number of reviews to fetch (up to a server-side limit)
    lang="en",
    country="us",
)

client.reviews returns a tuple of (reviews: list[Review], next_token: str | None). To request the next page, pass the token to the next call:

from google_play_scraper import GooglePlayClient

client = GooglePlayClient()
reviews, next_token = client.reviews("com.whatsapp", num=100)
if next_token:
    more_reviews, next_token = client.reviews("com.whatsapp", num=100, pagination_token=next_token)

Search suggestions

from google_play_scraper import GooglePlayClient

client = GooglePlayClient()
suggestions = client.suggest("photo ed")
print(suggestions)

Data models

All return types are validated Pydantic models that are easy to consume and serialize.

  • AppOverview: minimal data used in lists/search (e.g., title, app_id, score, icon, developer)
  • AppDetails: extends AppOverview with rich metadata (e.g., description, installs, histogram, price, genre, screenshots, updated)
  • Review: normalized review entry (score, text, user_name, thumbs_up, dates, developer reply info)

See google_play_scraper/models.py for full fields.

Constants

Import enums to control listing and sorting:

from google_play_scraper import Category, Collection, Sort, Age

Error handling

Common exceptions:

  • AppNotFound: App ID does not exist or could not be parsed
  • ParsingError: Unexpected response structure
  • QuotaExceeded: Rate-limited or temporarily blocked by Google
  • GooglePlayError: Base class for library errors

Handle errors explicitly:

from google_play_scraper import GooglePlayClient
from google_play_scraper import AppNotFound, GooglePlayError

client = GooglePlayClient()
try:
    app = client.app("com.nonexistent.app")
except AppNotFound:
    print("App not found")
except GooglePlayError as e:
    print("General error:", e)

Configuration, proxies, and rate limiting

  • Locale/country: set defaults via GooglePlayClient(country=..., lang=...) and override per call
  • Rate limiting: throttle_requests_per_second to avoid temporary blocking
  • Proxies: pass a requests-style proxies dict (e.g., { "http": "http://host:port", "https": "http://host:port" })
  • SSL: set verify_ssl=False only for troubleshooting

Best practices and Notes

  • Use conservative throttle_requests_per_second and caching when scraping at scale
  • Respect Google Play Terms of Service and robots.txt. This library is for educational and research purposes; use responsibly
  • API responses and page structures can change without notice; pin versions and add monitoring

Examples and demos

See the demo/ directory for runnable examples:

  • demo_app.py — fetch app details
  • demo_search.py — search apps
  • demo_list.py — list collections and categories
  • demo_reviews.py — fetch reviews with pagination
  • demo_suggest.py — query suggestions

Run with:

python -m demo.demo_app

Links

Contributing

PRs and issues are welcome! Please run tests locally before submitting changes.

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

play_store_scraper_ng-0.1.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

play_store_scraper_ng-0.1.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file play_store_scraper_ng-0.1.2.tar.gz.

File metadata

  • Download URL: play_store_scraper_ng-0.1.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for play_store_scraper_ng-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f3d321e825450d54c43371f89f9ee7f93a214fc9be4447ddfa00636fb5ed03ce
MD5 803783a3c12617729ef9c20026380fd3
BLAKE2b-256 341cd0f0e0c88fb793cf122c7dcffe8ae4e8fa2a5f5a6bb9db86ffd7e49e29c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for play_store_scraper_ng-0.1.2.tar.gz:

Publisher: release.yml on RankoR/google-play-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file play_store_scraper_ng-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for play_store_scraper_ng-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 094d00e03ac816561c69791f552169d4b2d151fe98d6d77a9ae63286e108a225
MD5 856718769b3b0f6ab694c3c32ba2add8
BLAKE2b-256 b9f8fd98569e0b2eb423af262d08d11aef5f8b05a1086d7ae3a5d7f02f84425d

See more details on using hashes here.

Provenance

The following attestation bundles were made for play_store_scraper_ng-0.1.2-py3-none-any.whl:

Publisher: release.yml on RankoR/google-play-scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page