«2Captcha»标志返回主页
Captcha 绕过教程

这篇文章有帮助吗?

How to Scrape Google Play

Gregory Fisher
Gregory Fisher

Technical engineer

Google Play has no public API for other people's apps. The Google Play Developer API only covers apps you publish yourself, so if you want a competitor's installs, ratings or reviews, you have to read the store pages.

Reading them is the easy part. Interpreting them is where people slip. The same app has a different star rating in every country, while its rating count is global. The number of ratings and the number of written reviews differ by two orders of magnitude. And the exact install count is only on the app's own page, never in a category grid.

This guide walks through the open-source 2scraper/googleplay-scraper. It exports category grids, search results, full app pages, developer catalogs and review histories to JSON or CSV, and stamps the country and language on every row. It runs locally with Playwright and needs no account, key or proxy for basic use. The figures below come from the project's README and changelog, each with the date it was measured.

What you get

One command-line tool with five modes:

Mode What it returns Typical use
listing Apps from a genre grid, following the page's own shelves Category tracking, top charts
search Apps for a keyword ASO and keyword research
app Everything the app page publishes: exact installs, rating histogram, version, developer contacts Competitor monitoring
developer A developer's whole catalog Publisher research
reviews Review history paged with continuation tokens, sorted newest, most relevant or by rating Sentiment analysis, support triage

The first four modes produce the same row with 46 fields, keyed on the package ID (sku). A search row and an app row for the same app join on sku. Among the fields are title, brand (the developer), category, price, currency, installs, installs_min, installs_exact, content_rating, iap_price_range, rating, rating_raw, review_count, review_text_count, histogram_1 to histogram_5, version, updated_at, developer_email, chart_rank, gl and hl. Reviews mode writes its own row type with review_id, score, text, posted_at, thumbs_up, app_version and the developer's reply, deduplicated by review_id.

What each route publishes

This decides which mode you need, so it's worth a minute.

A grid tile already carries most of an app record. Across 330 distinct tiles from six captures it had the title, developer, genre, price and currency, description, install bucket, content rating, in-app purchase range, icon, screenshot count and the rating. On a US grid all of that was 100% filled. On a German grid the rating was there on 92 of 128 tiles and the install bucket on 108 of 128, because unrated and newly published apps simply don't have them.

Only the app page has the rating histogram, the split between ratings and written reviews, the version, the update date, the developer's email and website, the privacy policy, Play's chart position and the exact install count. For WhatsApp the store prints "10,000,000,000+" and publishes 12,322,703,000 next to it. None of the 330 grid tiles carried the exact figure, so installs_exact is empty on listing rows because the store doesn't show it there, not because the scraper missed it.

And ratings aren't reviews. For one app on one day there were 244,140,056 ratings and 1,952,258 written reviews. The first number goes to review_count, the second to review_text_count. Mixing them up is the easiest mistake to make with this data.

What you need

  • Python 3.9 to 3.13.
  • Playwright with Chromium, the recommended engine. Selenium and pyppeteer versions are there too and give identical rows. pyppeteer is effectively unmaintained upstream, and on Apple Silicon Macs it downloads an x86_64 Chromium that has been reported to crash, so on those machines use Playwright or connect pyppeteer to a remote browser.
  • One virtual environment per engine. Playwright and pyppeteer pin incompatible pyee versions, and pyppeteer and Selenium clash on urllib3.
  • Optional: a 2Captcha API key for the Scraper API, CAPTCHA solving and fingerprints, residential proxies, or a Browser API endpoint. If you haven't used the API before, the Quick start covers it.

Installation

bash Copy
git clone https://github.com/2scraper/googleplay-scraper.git
cd googleplay-scraper
python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

pip install -r requirements.txt -r requirements-playwright.txt
playwright install chromium

cp .env.example .env
python3 env_config.py   # shows which settings were loaded, without printing secrets

Keys and proxy credentials go in .env, not on the command line. For a plain local run you can leave it empty. If a key "isn't working" later, run env_config.py first and see what was actually picked up.

First run

bash Copy
# Listing: a genre grid, 3 shelf pages
python3 playwright_scraper.py --mode listing --category GAME --pages 3

# Search: apps for a keyword
python3 playwright_scraper.py --mode search --query "password manager"

# App: full details in the German store
python3 playwright_scraper.py --mode app --app-id com.whatsapp --gl DE --hl de

# Developer: a full catalog
python3 playwright_scraper.py --mode developer --developer 5700313618786177705

# Reviews: 10 pages, newest first, without reviewer names and avatars
python3 playwright_scraper.py --mode reviews --app-id com.whatsapp --pages 10 --no-authors

# JSON, CSV or both
python3 playwright_scraper.py --mode search --query vpn --format both --out vpn_apps

Defaults are --gl US, --hl en, --format json, --out googleplay_apps, --pages 1 and --retries 2. For reviews, --sort takes newest (the default), relevant or rating, and --reviews-per-call sets the batch size (200 by default).

How the scraper works

Ratings are per country

Google Play computes an app's star rating separately for each market, but the rating count is global. On 2026-09-22 the repository fetched one app (com.rovio.baba) from a single datacenter address in Nuremberg, changing only the country:

Country (gl) Rating Currency Ratings count
BR 4.49 BRL 6,312,298
IN 4.13 INR 6,312,298
US 4.08 USD 6,312,298
JP 3.96 JPY 6,312,298
DE 3.90 EUR 6,312,298

The rating moves by more than half a star, the count doesn't move at all. So "the rating of this app" isn't one number, it's one number per market. That's why every row carries gl and hl. Don't average ratings from different markets, and always pass --gl explicitly when you compare apps. You also don't need an IP in each country: all five rows came from one address.

Data comes from page payloads

The scraper reads the structured data Google Play embeds in its pages rather than CSS selectors, so a redesign of the visible layout doesn't break it. sku is the package ID and is the same in every market. category is display text and changes with --hl.

Pagination differs by mode

Google Play has no ?page=N anywhere, so the scraper doesn't pretend to have one.

  • Grids publish their shelves as separate URLs, all listed on the first page. --pages N follows them and stops when a page adds no new package IDs.
  • Search doesn't paginate at all. Scrolling to the bottom four times per query in a real browser gave 22 results for "game", 30 for "vpn" and 50 for "a", and the page never grew. With --pages above 1 the scraper prints a warning saying so instead of quietly reporting success.
  • Reviews use a continuation token that only exists inside the previous response, so they're strictly sequential. The store's own front end asks for 40 at a time, but the endpoint isn't capped there: requests for 100, 200, 500, 1,000 and 2,000 reviews all came back in full, each with a token. No ceiling was found.

Pages are fetched one at a time in every mode. --concurrency above 1 isn't implemented and is refused with exit code 2 rather than silently ignored.

Review sorting

--sort newest returns reviews by posting date, newest first, and keeps that order across pages. relevant gives the store's own ranking, rating groups them by score. On 2026-10-22 two newest pages of 40 for com.whatsapp shared no reviews and posted_at never went up across the page boundary. There's no filter by star score: the store's front end has one, but the request forms tried so far either changed nothing or returned nothing, so the scraper doesn't offer a flag for it.

Blocks, CAPTCHA and paid options

Google Play is open by default. On 2026-09-22 every route the scraper reads answered in full from one datacenter address with plain curl, no cookies and no key:

Route Status Size Content
Category GAME 200 2.6 MB 64 apps, 7 shelves
WhatsApp app page 200 1.2 MB the full app record
Search "vpn" 200 1.3 MB 30 apps
Developer page 200 1.0 MB the developer's grid
Reviews endpoint 200 43 KB 40 reviews and a token
Nonexistent package ID 404 1.6 KB a clean refusal

No CAPTCHA turned up in any of the twelve captures. A weekly canary run (on Mondays) from a bare GitHub runner with no secrets keeps checking this. If Play ever puts these routes behind a key or a challenge, the badge goes red.

So here the paid tools buy volume and geography, not access. You'll want them when you read the store at scale, from many countries, or don't want to run browsers yourself. All of them are off until you turn them on.

Proxies

Pass --proxy or --proxy-file. By default the scraper rotates per page (--proxy-rotate per-page), so each grid page opens a fresh browser on the next proxy. per-run keeps one IP for the whole run. Reviews always stay on one exit, because continuation tokens are tied to the session.

A refused page gets --proxy-block-retries fresh browsers, on the next proxy if you have a pool, without spending --retries. A bare HTTP 429 waits on the same exit instead. --retries covers transport failures and pages nothing recognises. 2Captcha residential proxies cover the countries you pass in --gl, and the Proxy API generates lists. Selenium can't authenticate proxies, so it strips the credentials and prints a warning.

2Captcha Browser API

The Browser API runs Chromium for you over CDP. Pass the endpoint with --cdp-endpoint and don't add --proxy or --fingerprint, since the remote browser handles IP and fingerprint itself. It works with Playwright and pyppeteer. Selenium refuses it with exit code 2. If the handshake is refused with HTTP 500, 502 or 503, the scraper retries twice (after 3 and 6 seconds); any other refusal fails at once with exit code 5. Setup is in the Browser API docs.

Scraper API, no browser

scraper_api_client.py fetches pages through the 2Captcha Scraper API, one page per request, with no local browser at all. On 2026-10-22 that cost $0.0003 or less per page. You get the same rows, the same .meta.json and the same exit codes as the browser engines.

bash Copy
python3 scraper_api_client.py --url "https://play.google.com/store/search?q=vpn&c=apps&hl=en&gl=US"

Two things to know. It fetches only the page you give it, so a grid's further shelves and later review pages are still a job for the browser engines. And which apps fill a category's shelves depends on the requesting address: in one comparison a grid shared 82 of 96 apps with a local run, while a search came back identical.

reCAPTCHA

If Google ever puts a reCAPTCHA on a refused page, a run with a 2Captcha key detects reCAPTCHA v2 or v3, sends a proxyless task, injects the token and checks the page that follows. Each page gets at most one paid solve, however many retries it takes. --solve-captcha sets when this happens: never, when-blocked (the default) or always. --min-score (default 0.3) is the minimum score requested for v3.

bash Copy
python3 playwright_scraper.py --mode listing --category GAME --pages 5 \
  --twocaptcha-key "$TWOCAPTCHA_KEY" --solve-captcha when-blocked --min-score 0.7

To be clear about the status: no CAPTCHA has been met on Google Play itself, so on this site the path has only been exercised against a stubbed solver. The solving code was checked live on 2026-10-22 on Google's own reCAPTCHA demo pages in Playwright, Selenium and pyppeteer, where both v2 demos were solved and accepted. Task parameters are in the reCAPTCHA v2 and reCAPTCHA v3 docs.

Fingerprints

--fingerprint pulls a real browser profile from 2Captcha browser fingerprints, and --fp-tags and --fp-country narrow it down. It needs --twocaptcha-key and works on Playwright only; the other engines refuse it.

Output files and exit codes

Each run writes the results file and a .meta.json sidecar with the status (complete, partial or failed), stop_reason, pages requested, completed and failed, row count, start and final URL, finish time, gl and hl. --out is a prefix: --out data/run.json writes data/run.json, data/run.csv and data/run.meta.json, and creates data/ if it doesn't exist.

Files are written to a temporary file next to the target and then renamed, so an interrupted run never leaves half a file. A run that gathers nothing and doesn't finish writes nothing, so yesterday's good file survives. In the CSV, cells starting with =, +, -, @, a tab or a line break get a leading apostrophe so a spreadsheet doesn't run them as formulas. The JSON keeps the store's text exactly, and csv_cells_escaped in the sidecar says how many cells differ.

The exit code tells your scheduler what happened without parsing logs:

Code Meaning What to do
0 Complete Data written.
1 Crash Check the traceback.
2 Bad usage Fix the command: a missing flag, --concurrency above 1, --pages 0, negative --retries, --proxy together with --cdp-endpoint, --fingerprint without a key, a country Play doesn't serve.
3 Blocked A challenge page before parsing. Add proxies, the Browser API or --solve-captcha.
4 Zero apps The run finished and found nothing, including a package ID that doesn't exist.
5 Content never obtained Pages never loaded or the remote browser refused the connection. No file written.
6 Partial Some pages succeeded. Failed pages are named in the sidecar.

The difference between 4 and 5 matters. A dead proxy and an empty category shouldn't look the same to whatever reads the file.

original_price and discount_pct are part of the shared schema but stay empty on every row: 0 of 411 rows from the captures and 0 of 877 from live runs on 2026-10-22 had them. Play does show a struck-through price on some discounted paid apps, but the repository has no capture of one, so it doesn't guess.

Traps that look like bugs

  • Two runs of a popular app differ on every counter. WhatsApp gained 10 ratings in the 4.5 minutes between two runs. That's the store moving, not the scraper.
  • A nonexistent package ID gives exit 4, not 3. Play answers with a clean 404, which is an answer, not a refusal. Check the ID before you check your proxy.
  • A country Play doesn't serve gives exit 2, not 3. --gl xx gets Play's own HTTP 400 page, and the scraper stops at once as a usage error, with no retries. ZZ, oddly, is answered with a full page.
  • A market in --url is kept. --url "…/search?q=vpn&hl=ja&gl=JP" fetches Japan. --gl and --hl replace it only when you type them, and the scraper says so.
  • genre_id is empty on every listing row. A grid tile only publishes the genre as display text ("Casual", "Arcade"), with no language-independent key. The key comes with app mode. Join markets on sku, never on category, which changes with --hl ("Kommunikation" instead of "Communication").
  • brand is the developer, not the seller. In the EU the store's payload also holds a seller of record, "Google Commerce Ltd". The scraper reads the developer in every market, so if Google's name shows up in that column, something has changed.
  • rating is what the store displays. One app page states 4.616471 in its payload and 4.616447925567627 in its own JSON-LD, in the same fetch. rating is 4.6, and rating_raw keeps the payload's number so the rounding can be checked.
  • Books and movies are refused. /store/books and /store/movies are real storefronts, but the scraper has never parsed them and would report an empty catalog, so it refuses them with a reason.

Comparing runs

bash Copy
python3 diff_runs.py --old games_2026-10-19.json --new games_2026-10-26.json

diff_runs.py compares two runs by sku and sorts apps into added, removed and changed (price, currency and so on). It refuses runs from different modes, runs that aren't both complete, and runs from different markets, even ones with the same currency such as DE and FR. Reviews runs aren't one row per app, so the tool doesn't diff them; compare those on review_id yourself. Add --fail-on-change if a cron job should only alert you when something actually changed.

A sample row

A listing row from the repository's sample_output.json, captured on 2026-09-22 (selected fields out of 46). Fields that only app mode fills are null here:

json Copy
{
  "source": "play.google.com",
  "scraped_at": "2026-09-22T09:50:58.688595+00:00",
  "url": "https://play.google.com/store/apps/details?id=com.amazon.clouddrive.photos&hl=en&gl=US",
  "sku": "com.amazon.clouddrive.photos",
  "title": "Amazon Photos: Photo & Video",
  "brand": "Amazon Mobile LLC",
  "price": 0.0,
  "currency": "USD",
  "original_price": null,
  "rating": 4.7,
  "rating_raw": 4.714563,
  "review_count": null,
  "category": "Photography",
  "gl": "US",
  "hl": "en",
  "genre_id": null,
  "installs": "50,000,000+",
  "installs_min": 50000000,
  "installs_exact": null,
  "content_rating": "Everyone",
  "iap_price_range": "$0.99 - $11.99 per item",
  "offers_iap": true,
  "histogram_5": null,
  "version": null,
  "screenshot_count": 24,
  "shelf": "Take better photos",
  "shelf_rank": 2
}

Using the results

One app across countries

Since ratings differ by market, a good first report is one app's rating in several countries. Run app mode once per country:

bash Copy
for gl in US DE JP IN BR; do
  python3 playwright_scraper.py --mode app --app-id com.whatsapp --gl $gl --out app_$gl
done

Then collect the rows into one table:

python Copy
import json
from pathlib import Path

rows = []
for path in sorted(Path(".").glob("app_*.json")):
    if path.name.endswith(".meta.json"):
        continue
    rows.extend(json.loads(path.read_text(encoding="utf-8")))

rows.sort(key=lambda r: r.get("rating_raw") or 0, reverse=True)

print(f"{'Market':<8}{'Rating':>8}{'Ratings':>16}{'Written':>12}")
for r in rows:
    print(
        f"{r['gl']:<8}"
        f"{(r.get('rating_raw') or 0):>8.2f}"
        f"{(r.get('review_count') or 0):>16,}"
        f"{(r.get('review_text_count') or 0):>12,}"
    )

The ratings count should be the same in every row and the rating shouldn't. If you need to rank many apps, run app mode for each package, because listing rows have no review_count.

How a new version landed

Reviews carry the app version the reviewer had installed, so you can see whether an update made people happier or angrier. Pull the newest reviews:

bash Copy
python3 playwright_scraper.py --mode reviews --app-id com.whatsapp \
  --sort newest --pages 10 --no-authors --out wa_reviews

And average the score by version:

python Copy
import json
from collections import defaultdict

reviews = json.load(open("wa_reviews.json", encoding="utf-8"))
scores = defaultdict(list)
for r in reviews:
    if r.get("app_version") and r.get("score"):
        scores[r["app_version"]].append(r["score"])

for version, s in sorted(scores.items(), key=lambda kv: len(kv[1]), reverse=True)[:10]:
    ones = sum(1 for x in s if x == 1) / len(s)
    print(f"{version:<22}{len(s):>6} reviews  avg {sum(s)/len(s):.2f}  1-star {ones:.0%}")

Keep in mind these are written reviews, a small slice of all ratings, and people who write tend to be the unhappy ones. Use this to compare versions with each other, not as the app's real rating.

Limitations

  • Listing rows have no genre_id, installs_exact, review_count or histogram. Grid tiles don't show them, so use app mode.
  • Search returns one page only, 22 to 50 apps in tests.
  • No filter by star score in reviews mode.
  • Pages are fetched one at a time; there's no parallel mode.
  • Books and movies aren't supported, only apps and games.
  • original_price and discount_pct are always empty.
  • Counts on popular apps move between runs, so two runs a minute apart can differ.

Common questions

Is it legal to scrape Google Play?
The scraper reads public store pages without logging in. Whether your use is allowed depends on where you are and on Google Play's terms, so check both and keep request rates reasonable. This isn't legal advice.

Does Google Play have an official API for this?
The Google Play Developer API covers only apps you publish yourself. For other apps' ratings, installs and reviews there's no public API.

Why is the rating different from what I see on my phone?
Ratings are calculated per country. Pass the same --gl as your phone's store country and it will match.

How many reviews can I get?
No ceiling has been found. Reviews page until the store runs out. Raise --pages and --reviews-per-call; batches of up to 2,000 came back in full.

What about reviewers' personal data?
Play publishes a reviewer's display name, avatar and a stable 21-digit profile ID next to their words. --no-authors drops all three and keeps everything you need for analysis. If you don't need to know who wrote a review, use it.

Do I need 2Captcha to scrape Google Play?
Not for small jobs. Add proxies, the Browser API or the Scraper API when you scale up, read many countries, or start getting exit code 3.

Wrapping up

Google Play is one of the easier stores to scrape and one of the easiest to misread. Keep gl and hl on every row, treat ratings and written reviews as different numbers, use app mode when you need exact installs or the histogram, and let exit codes drive your automation instead of trusting a non-empty file. When volume grows, add proxies, the Browser API or the Scraper API without changing your pipeline.

Getting started: clone the repository and run it with no setup at all. For volume, other countries or a hosted browser, sign up for 2Captcha and add residential proxies or the 2Captcha Browser API.

Source code

Documentation