gplay-reports-download について
gplay-reports-downloadは、Google Cloud StorageからGoogle Play Consoleの財務レポートと統計レポートを一覧表示・ダウンロードするスキルです。アプリやアカウントの担当者が、種類、パッケージ、月の範囲を指定してレポートを収集できます。
主な機能
- 01種類と日付を指定した財務レポートの一覧表示
- 02月の範囲を指定した財務レポートのダウンロード
- 03パッケージと種類を指定した統計レポートの一覧表示
- 04指定ディレクトリへの統計レポートのダウンロード
- 05JSON、テーブル、Markdown形式の出力
活用シーン
- 01月次の収益・販売ファイルの収集
- 02インストール数、評価、クラッシュ傾向の確認
- 03指定ディレクトリへのレポートファイルの保管
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ tamtom/ gplay-cli-skills --skill gplay-reports-downloadインストール後、Claude Code で/gplay-reports-downloadを入力して読み込まれたか確認します。
詳細
Google Play レポートのダウンロード
Google Play Console から財務レポート(収益、売上、支払い)または統計レポート(インストール、評価、クラッシュ、ストアのパフォーマンス、定期購入)を一覧表示またはダウンロードする必要がある場合は、このスキルを使用します。
レポートの仕組み
Google Play Console のレポートは、REST API では利用できません。Google Cloud Storage(GCS)バケットに CSV/ZIP ファイルとして保存されています。
- バケット名:アカウントによって異なり、
pubsite_prod_rev_<id>またはpubsite_prod_<id>のいずれかです。必ず Play Console に表示されている URI をそのままコピーしてください。 - 財務レポート:
earnings/、sales/、payouts/、play_balance_krw/、wht_statements/のプレフィックス - 統計レポート:
stats/installs/、stats/ratings/、stats/crashes/、stats/store_performance/、financial-stats/subscriptions/のプレフィックス
サービスアカウントには GCS バケットへのアクセス権が必要です(適切な権限を付与してサービスアカウントを Play Console に追加すると、このアクセス権は自動的に付与されます)。
前提条件
gplay auth loginで設定されたサービスアカウント- GCS バケット ID(以下を参照してください。Play Console URL のデベロッパー IDとは異なります)
- 財務レポートの場合:
VIEW_FINANCIAL_DATA権限(「財務データの表示」アクセス権を付与して、サービスアカウントを Play Console に追加する必要があります) - 統計レポートの場合:
VIEW_APP_INFORMATION権限(「アプリ情報の表示」アクセス権を付与して、サービスアカウントを Play Console に追加する必要があります)
バケット ID の確認方法
重要: レポート用のバケット ID は、Play Console URL に含まれる数値 ID とは異なります。URL ID と GCS バケット ID は別のものです。
正しいバケット ID を確認するには:
- Google Play Console > レポートのダウンロード(左側のサイドバーにある「レポートのダウンロード」)に移動します。
- ページに表示されているCloud Storage URIを確認します。例:
gs://pubsite_prod_rev_12110000881713004121/ - 完全な URI または数値 ID のみを渡すことができます:
12110000881713004121
または、Google Cloud Console を使用して、Play Console アカウントに関連付けられているバケット名を確認してください。
よくある間違い: Play Console URL(https://play.google.com/console/developers/<this_id>/...)に含まれるデベロッパー ID を使用すると、GCS バケットでは別の内部 ID が使われているため、404 Not Found エラーが発生します。
財務レポート
利用可能な財務レポートの一覧表示
# 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 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
財務レポートの種類
| 種類 | 説明 | ファイル名のパターン |
|---|---|---|
earnings | 収益および売上データ | earnings/earnings_YYYYMM_<id>.zip |
sales | 売上取引レポート | sales/salesreport_YYYYMM.zip |
payouts | 支払いの振込レポート | payouts/payout_YYYYMM.csv |
play_balance | Play 残高レポート(KRW) | play_balance_krw/... |
wht_statements | 源泉徴収税明細書 | wht_statements/... |
統計レポート
利用可能な統計レポートの一覧表示
# 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 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
統計レポートの種類
| 種類 | 説明 | ファイル名のパターン |
|---|---|---|
installs | インストール/アンインストールデータ | stats/installs/installs_<pkg>_YYYYMM_overview.csv |
ratings | 評価の分布 | stats/ratings/ratings_<pkg>_YYYYMM_overview.csv |
crashes | クラッシュ発生データ | stats/crashes/crashes_<pkg>_YYYYMM_overview.csv |
store_performance | ストア掲載情報のパフォーマンス | stats/store_performance/... |
subscriptions | 定期購入の指標 | financial-stats/subscriptions/... |
フラグのリファレンス
財務コマンド
| フラグ | 必須 | 説明 |
|---|---|---|
--bucket-id | はい | GCS バケット ID または完全な URI |
--type | いいえ(一覧:デフォルトは all)/はい(ダウンロード) | レポートの種類:earnings、sales、payouts、play_balance、wht_statements、all |
--from | いいえ(一覧)/はい(ダウンロード) | 開始月 YYYY-MM |
--to | いいえ | 終了月 YYYY-MM(デフォルトは --from) |
--dir | いいえ | 出力ディレクトリ(デフォルトは .) |
--output | いいえ | 出力形式:json、table、markdown |
--pretty | いいえ | JSON 出力を整形して表示 |
統計コマンド
| フラグ | 必須 | 説明 |
|---|---|---|
--bucket-id | はい | GCS バケット ID または完全な URI |
--package | いいえ(一覧)/はい(ダウンロード) | パッケージ名のフィルター |
--type | いいえ(一覧:デフォルトは all)/はい(ダウンロード) | 統計の種類:installs、ratings、crashes、store_performance、subscriptions、all |
--from | いいえ(一覧)/はい(ダウンロード) | 開始月 YYYY-MM |
--to | いいえ | 終了月 YYYY-MM(デフォルトは --from) |
--dir | いいえ | 出力ディレクトリ(デフォルトは .) |
--output | いいえ | 出力形式:json、table、markdown |
--pretty | いいえ | JSON 出力を整形して表示 |
出力形式
一覧の出力
{
"bucket": "pubsite_prod_rev_12345",
"reports": [
{"name": "earnings/earnings_202601_12345.zip", "size": 1234, "updated": "2026-02-01T00:00:00Z"}
]
}
ダウンロードの出力
{
"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}
]
}
一般的なワークフロー
月次財務レビュー
# 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
アプリのパフォーマンス監視
# 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 によるレポートの自動収集
# 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
トラブルシューティング
| エラー | 原因 | 修正方法 |
|---|---|---|
authentication failed | サービスアカウントが設定されていません | gplay auth login --service-account <path> を実行します |
403 Forbidden | GCS バケットへのアクセス権がありません | サービスアカウントが、適切な権限を持つアカウントとして Play Console に招待されていることを確認します |
404 Not Found | バケット ID が間違っているか、レポートがありません | Play Console の「レポートをダウンロード」>「Cloud Storage URI をコピー」からバケット ID を取得します(URL に含まれるデベロッパー ID ではありません) |
| レポート一覧が空 | 指定した期間のレポートがありません | --from/--to の範囲を確認します。すべての月にレポートが存在するとは限りません |