mcpField
G
gplay-reports-download

gplay-reports-download

github.com/tamtomデータ・データベース52346 回インストール13 週間前に更新
リポジトリ

gplay-reports-download について

gplay-reports-downloadは、Google Cloud StorageからGoogle Play Consoleの財務レポートと統計レポートを一覧表示・ダウンロードするスキルです。アプリやアカウントの担当者が、種類、パッケージ、月の範囲を指定してレポートを収集できます。

主な機能

  1. 01種類と日付を指定した財務レポートの一覧表示
  2. 02月の範囲を指定した財務レポートのダウンロード
  3. 03パッケージと種類を指定した統計レポートの一覧表示
  4. 04指定ディレクトリへの統計レポートのダウンロード
  5. 05JSON、テーブル、Markdown形式の出力

活用シーン

  1. 01月次の収益・販売ファイルの収集
  2. 02インストール数、評価、クラッシュ傾向の確認
  3. 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 を確認するには:

  1. Google Play Console > レポートのダウンロード(左側のサイドバーにある「レポートのダウンロード」)に移動します。
  2. ページに表示されているCloud Storage URIを確認します。例:
    gs://pubsite_prod_rev_12110000881713004121/
    
  3. 完全な 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_balancePlay 残高レポート(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 ForbiddenGCS バケットへのアクセス権がありませんサービスアカウントが、適切な権限を持つアカウントとして Play Console に招待されていることを確認します
404 Not Foundバケット ID が間違っているか、レポートがありませんPlay Console の「レポートをダウンロード」>「Cloud Storage URI をコピー」からバケット ID を取得します(URL に含まれるデベロッパー ID ではありません)
レポート一覧が空指定した期間のレポートがありません--from/--to の範囲を確認します。すべての月にレポートが存在するとは限りません

コメント