Search code examples
androidgoogle-analyticsgoogle-apigoogle-analytics-apigoogle-api-client

Google APIs to get app revenue of all apps


I'm trying to get app revenue through Google Play purchases of Android apps from a Google API. The aim is to display a list of all apps with their revenue, the sum of all together and, if possible, to drill down to see the revenue per country.

I saw that this can be done with Google Analytics Data API. The problem is that I need to add the property ID of the apps as a path parameter. But there is no method to get a list of all properties. I already searched other APIs to find a way to do so.

  • Google Play Android Developer API, doesn't offer a list of apps or property IDs neither. It anyway does not serve a method to see the overall revenue of an app
  • Google Analytics Reporting API only queries for existing reports, which is not appropriate, because I don't want to force a user to create report in Google Analytics, nor do I want to be dependent on a static report.
  • Google Analytics Management API offers a way to query web properties. But apps are not in the list, because they are no web properties.

I'm pretty sure there is a way to do so, because the Google Play Console App displays the revenue per app and I assume their using a public API as well.

Solution:

As stated in a comment in the answer of Brett, the Google Analytics Admin API might be used to get a list of all accounts and their respective properties.


Solution

  • The Google Analytics Data API reports on a single GA4 property with each API request. However, a single GA4 property can have several data streams, and you can add one data stream for each app. This article describes adding data streams to a GA4 property.