0 votes

I have a question regarding the AppAnnie API:

In short:

  • Which endpoint should be used for granular IAP data?
  • What I want is basically a JSON that contains:
    • The apps IAP name
    • the IAPs price point
    • the IAPs amount of sales
  • break down could be country, app, date, etc

Background:

  • We connected our app portfolio to AppAnnie (working)
  • I already connected to the AppAnnie API via Python script (working)
  • the connection is working fine and I can access all standard data for our app portfolio (revenues, sales, downloads, etc)
  • However I can not find the granular IAP level 

Maybe I oversaw something in the documentation. Would be great if someone can point me into the right direction.

 

 

 

by (180 points)

1 Answer

+1 vote

After re-reading the documentation, I can answer the question myself and want to share it here. Maybe someone else is searching for the same solution :)

For the IAP data you want to read this article carefully: https://support.appannie.com/hc/en-us/articles/360010475333-5-Product-Sales (my answer was in the section with the "break_down" parameter ;)

If you only have one app in AppAnnie, then this should get you going to connect to the AppAnnie API and get your IAP data. It is maybe not the best solution, but worked for me.

Python Code:

 

import json
import requests
import pprint

#your AppAnnie API access token. You will get this in your AppAnnie settings
key = "bearer xxxxx"

#use this route to get an overview of your IAPs, containing 1. IAP name, 2. SKUs (the unique IAP identifier), 3. the IAP type 

url = "https://api.appannie.com/v1.3/accounts/{Your-AppAnnie-Account-ID}/products/{Your-AppAnnie-Product-ID}/iaps"
response = requests.get(url, headers={"Authorization": key})
data = response.json()
pprint.pprint(data)

#now we need the actual sales data (how many IAPs were sold on a given day per geo?)
#here is the part that I oversaw --> break_down= ...+iap

url = "https://api.appannie.com/v1.3/accounts/{Your-AppAnnie-Account-ID}/products/{Your-AppAnnie-Product-ID}/sales?break_down=date+country+iap&start_date=2019-09-01&end_date=2019-09-01"
response = requests.get(url, headers={"Authorization": key})
data_sales = response.json()
pprint.pprint(data_sales)

 

That´s basically it. You will now have 2 exports:

  • one with basic IAP infos such as: iap_name, sku and iap_type
  • the second with actual sales data for each IAP with a break-down per country, date and iap

Since the second export only provides you with the SKU IDs you will have to map export one to export two on that unique identifier to provide you with the clear names of your IAPs (if needed). You can use the Pandas library for that, which is an excellent solution to merge data (inner join, outer join, etc)

Hope that helped someone :)

BR

Sven

by (180 points)