Export App Store Connect and Google Play Console data by API

Sun 15 Mar 2020, 11:00 PMAppTweak Releases

If you have been doing ASO for some time, you must be familiar with App Store Connect and Google Play Console. Both platforms offer the possibility to download some of the data they record about your app however they do it in very different ways.

On one hand, Apple allows you to quickly download any graph to a CSV which can be really nice when you want to share information with your team about a specific event. However, you don’t have the possibility to extract all of your “App Analytics” data at once if you want to include this data in your internal BI tool.

Google, on the other hand, has a whole section of its platform dedicated to exports but you can only download your acquisition reports by month which means that you might have to compile a bunch of CSV to be able to see your apps’ progression over the past year.

In the end, both of these solutions require a lot of manipulations before being able to import the exports into any BI tool. You end up spending more time formatting the data than actually analyzing it!

Many of our users flagged this pain point and asked us if AppTweak would be able to help. Today we are happy to announce that we have built a new API that allows AppTweak users to export their data from App Store Connect and Google Play Console.

Disclaimer : all of the numbers that you’ll see in this article are a randomized set of data that doesn’t belong to any app on the stores.

Integrate your ASO metrics with your own BI tools

To show you how this API will help you gain time we actually did the whole process ourselves. We took an app that had an App Store integration with AppTweak and extracted the data using AppTweak’s takeout API. We then turned the JSON file that was returned by the API into a CSV file and finally uploaded the file into Google Data Studio where we created a report of the app’s performance on the store.

Let’s take a closer look at the steps it takes to go from the API request to your app performance report.

Making calls to the API

Since the takeout API is designed to allow you to fetch information about your account, you need to use the API token associated with your AppTweak account. This API token can be found in the “General Info” tab of your account.

In the documentation, you’ll find all the information to help you write the API calls. At the moment, there are 7 different endpoints that can be called using your API token :

GET /takeout/integrations

This endpoint allows you to get the “api_account_ids” that are linked to your store integrations. This id will allow you to later fetch the data for your App Store Connect or Google Play Store account.

For Apple & Google Play, you can fetch your data in two ways :

GET /takeout/integrations/${API_ACCOUNT_ID}/reports/${PROPERTY}.json

The first one allows you to fetch the data by country. You just need to specify the api_account_id and the property that you want to look at (eg. app units, page views…) in the request.

GET /takeout/integrations/{API_ACCOUNT_ID}/reports/acquisition-channel.json

The second one allows you to fetch the data by acquisition channel. Again you’ll need to specify the api_account_id, however all metrics are returned in the response.

GET /takeout/integrations/{API_ACCOUNT_ID}/reports/acquisition-keywords-monthly.json

This request will return the keywords that drive the most installs to your android app (Google Play Install Keywords) each month and the amount of installers, store listing visitors and retained installers that the keyword brought.

GET /takeout/integrations/{API_ACCOUNT_ID}/reports/acquisition-keywords-aggregate.json

This request is very similar to the previous one except for the fact that you can specify the period over which you wish to see the keywords and compute the installers, store listing visitors and retained installers data.

For all these requests you can also specify a set of parameters to help you narrow down the data that you want to fetch. Among those you’ll have :

products : the ids of the apps

countries : the country codes of the countries

start_date & end_date : the selected time period

devices : for ios only, iphone, ipad, both

For our example, we wrote the following method in Ruby to fetch the “App Analytics” data from App Store Connect.

From JSON to CSV

As you can see the response is already well structured however it is still not compatible with all BI tools, therefore we will need to convert this JSON into a CSV file.

Again for this example, we wrote a short script in Ruby that takes the elements of the response above and structures them using nested loops to build a set of arrays that are actually the entries of our worksheet.

From CSV to your report

Now that we have managed to generate the CSV with the raw data, the next step is to upload this file in a BI tool. For this example we decided to use Google Data Studio but you can also do this process with Tableau, QuikView, PowerBI or any other data visualization tool.

In a couple of seconds the file is uploaded. If needed we can now add additional fields. For example, we can add new fields for Total Units, Total Product Page View and Total Impressions which are basically the sum of all sources.

Once this is done we can start creating the charts and tables that we want to see in the report or we can upload this data to an existing report.

And there it is, we managed to build a great report of your App Analytics data from App Store Connect! While this process might seem complicated at first, but once it’s been done it will save precious time for when you want to update the report again.

I hope you enjoyed this blog and will implement a system like this one to export your data from AppTweak!

Never miss an ASO update, subscribe to our Newsletter!

Join more than 15,000 subscribers and get the latest ASO best practices, directly in your mailbox.

By subscribing, you consent that AppTweak may
process your contact information and that of your company to send you its newsletter.AppTweak will use those
data only for the newsletters. You may unsubscribe by using the unsubscribe link in our emails at any time.