此注册表固定版本所收录的最新上游作者日期。

gplay-reports-download

已同步 v1.1.0 许可证: MIT 来源: tamtom/gplay-cli-skills/skills/gplay-reports-download 提交: 10301b2 收录的最新变更:

Financial and statistics report listing and downloading from Google Play Console via GCS. Use when asked to view, list, or download financial earnings, sales, payouts, or app statistics (installs, ratings, crashes).

摘要

用途
列出并下载保存在 Google Cloud Storage 中的 Google Play Console 财务与应用程序统计报表。
使用时机
需要依保存桶、类型、套件名称或月份寻找报表,或将选取的报表存入本机目录时使用。
输出结果
列出可用的报表文件,或将其下载至本机,并提供文件名、路径与大小。
上游变更(5 条,最新收录 2026-03-11)
d3983dd docs: update reports skill for v0.4.7 (play_balance, wht_statements, fixed subscriptions prefix) 添加 Play 余额与预扣税报表类型,并将订阅统计报表前缀修正为 `financial-stats/subscriptions/`。
70ffaee fix: support both bucket prefixes and simplify output format 文档说明 GCS 保存桶名称支持两种前缀,并将范例 JSON 输出改为显示保存桶名称,而非另外列出保存桶 ID。
c507933 fix: rename --developer to --bucket-id in reports download skill 将报表旗标与文档中的 developer ID 改为 GCS bucket ID,并说明可提供完整的 GCS URI。
f15b67e docs: clarify GCS developer ID differs from Play Console URL ID 说明报表使用的 GCS 开发者 ID 与 Play Console 网址中的 ID 不同,并记载如何从 Cloud Storage URI 找到该 ID。
d531a45 feat: add gplay-reports-download skill and update README 添加技能文档,说明如何透过 GCS 列出及下载 Google Play Console 的财务与统计报表。
npx skills add "lettucebo/Skills#v2.2.0@gplay-reports-download" --full-depth

⚠ v2.2.0 发布后即可使用

Google Play Reports Download

Use this skill when you need to list or download financial reports (earnings, sales, payouts) or statistics reports (installs, ratings, crashes, store performance, subscriptions) from Google Play Console.

How reports work

Google Play Console reports are not available via the REST API. They are stored as CSV/ZIP files in Google Cloud Storage (GCS) buckets:

  • Bucket name: varies by account — either pubsite_prod_rev_<id> or pubsite_prod_<id>. Always copy the exact URI from Play Console.
  • Financial reports: earnings/, sales/, payouts/, play_balance_krw/, wht_statements/ prefixes
  • Statistics reports: stats/installs/, stats/ratings/, stats/crashes/, stats/store_performance/, financial-stats/subscriptions/ prefixes

The service account must have access to the GCS bucket (this access is granted automatically when the service account is added to Play Console with appropriate permissions).

Prerequisites

  • A service account configured via gplay auth login
  • The GCS bucket ID (see below — this is not the same as the Play Console URL developer ID)
  • For financial reports: VIEW_FINANCIAL_DATA permission (service account must be added to Play Console with "View financial data" access)
  • For stats reports: VIEW_APP_INFORMATION permission (service account must be added to Play Console with "View app information" access)

Finding your bucket ID

Important: The bucket ID for reports is not the numeric ID in your Play Console URL. The URL ID and the GCS bucket ID are different.

To find the correct bucket ID:

  1. Go to Google Play Console > Download reports (in the left sidebar under "Download reports")
  2. Look for the Cloud Storage URI shown on that page, e.g.:
    gs://pubsite_prod_rev_12110000881713004121/
    
  3. You can pass either the full URI or just the numeric ID: 12110000881713004121

Alternatively, use the Google Cloud Console to find the bucket name associated with your Play Console account.

Common mistake: Using the developer ID from the Play Console URL (https://play.google.com/console/developers/<this_id>/...) will result in a 404 Not Found error because the GCS bucket uses a different internal ID.

Financial reports

List available financial reports

# List all financial reports
gplay reports financial list --bucket-id <id>

# You can also pass the full GCS URI
gplay reports financial list --bucket-id "gs://pubsite_prod_rev_12345/"

# Filter by type
gplay reports financial list --bucket-id <id> --type earnings
gplay reports financial list --bucket-id <id> --type sales
gplay reports financial list --bucket-id <id> --type payouts

# Filter by date range
gplay reports financial list --bucket-id <id> --from 2026-01 --to 2026-06

# Combine filters
gplay reports financial list --bucket-id <id> --type earnings --from 2026-01 --to 2026-03

Download financial reports

# Download earnings for a specific month
gplay reports financial download --bucket-id <id> --from 2026-01 --type earnings

# Download to a specific directory
gplay reports financial download --bucket-id <id> --from 2026-01 --type earnings --dir ./reports

# Download a range of months
gplay reports financial download --bucket-id <id> --from 2026-01 --to 2026-06 --type sales

Financial report types

Type Description Filename pattern
earnings Revenue and earnings data earnings/earnings_YYYYMM_<id>.zip
sales Sales transaction reports sales/salesreport_YYYYMM.zip
payouts Payment disbursement reports payouts/payout_YYYYMM.csv
play_balance Play balance reports (KRW) play_balance_krw/...
wht_statements Withholding tax statements wht_statements/...

Statistics reports

List available statistics reports

# List all stats reports
gplay reports stats list --bucket-id <id>

# Filter by package name
gplay reports stats list --bucket-id <id> --package com.example.app

# Filter by type
gplay reports stats list --bucket-id <id> --type installs

# Filter by date range and package
gplay reports stats list --bucket-id <id> --package com.example.app --type installs --from 2026-01 --to 2026-06

Download statistics reports

# Download installs report
gplay reports stats download --bucket-id <id> --package com.example.app --from 2026-01 --type installs

# Download to a specific directory
gplay reports stats download --bucket-id <id> --package com.example.app --from 2026-01 --type crashes --dir ./reports

# Download a range of months
gplay reports stats download --bucket-id <id> --package com.example.app --from 2026-01 --to 2026-06 --type ratings

Statistics report types

Type Description Filename pattern
installs Install/uninstall data stats/installs/installs_<pkg>_YYYYMM_overview.csv
ratings Rating distribution stats/ratings/ratings_<pkg>_YYYYMM_overview.csv
crashes Crash occurrence data stats/crashes/crashes_<pkg>_YYYYMM_overview.csv
store_performance Store listing performance stats/store_performance/...
subscriptions Subscription metrics financial-stats/subscriptions/...

Flags reference

Financial commands

Flag Required Description
--bucket-id Yes GCS bucket ID or full URI
--type No (list: default all) / Yes (download) Report type: earnings, sales, payouts, play_balance, wht_statements, all
--from No (list) / Yes (download) Start month YYYY-MM
--to No End month YYYY-MM (defaults to --from)
--dir No Output directory (default .)
--output No Output format: json, table, markdown
--pretty No Pretty-print JSON output

Stats commands

Flag Required Description
--bucket-id Yes GCS bucket ID or full URI
--package No (list) / Yes (download) Package name filter
--type No (list: default all) / Yes (download) Stats type: installs, ratings, crashes, store_performance, subscriptions, all
--from No (list) / Yes (download) Start month YYYY-MM
--to No End month YYYY-MM (defaults to --from)
--dir No Output directory (default .)
--output No Output format: json, table, markdown
--pretty No Pretty-print JSON output

Output format

List output

{
  "bucket": "pubsite_prod_rev_12345",
  "reports": [
    {"name": "earnings/earnings_202601_12345.zip", "size": 1234, "updated": "2026-02-01T00:00:00Z"}
  ]
}

Download output

{
  "bucket": "pubsite_prod_rev_12345",
  "type": "earnings",
  "from": "2026-01",
  "to": "2026-01",
  "dir": "./reports",
  "files": [
    {"name": "earnings/earnings_202601_12345.zip", "path": "reports/earnings_202601_12345.zip", "size": 1234}
  ]
}

Common workflows

Monthly financial review

# List last month's earnings
gplay reports financial list --bucket-id <id> --type earnings --from 2026-01 --output table

# Download all financial reports for Q1
gplay reports financial download --bucket-id <id> --from 2026-01 --to 2026-03 --type earnings --dir ./q1-reports

App performance monitoring

# Check install trends
gplay reports stats list --bucket-id <id> --package com.example.app --type installs --from 2026-01

# Download crash data for analysis
gplay reports stats download --bucket-id <id> --package com.example.app --from 2026-01 --type crashes --dir ./crash-data

CI/CD automated report collection

# Download all report types for archival
for type in earnings sales payouts; do
  gplay reports financial download --bucket-id $BUCKET_ID --from $(date -d "last month" +%Y-%m) --type $type --dir ./monthly-reports
done

Troubleshooting

Error Cause Fix
authentication failed Service account not configured Run gplay auth login --service-account <path>
403 Forbidden No GCS bucket access Ensure service account is invited in Play Console with appropriate permissions
404 Not Found Wrong bucket ID or no reports Use the bucket ID from Play Console > Download reports > Copy Cloud Storage URI (not the developer ID from the URL)
Empty reports list No reports for the date range Check --from/--to range; reports may not exist for all months

历史

v1.1.0 baseline-verified 10301b2
v1.1.0 license-refresh 10301b2