API for app analytics

Hi, I working on a programmatical solution to collect all the App Store data. The api is working fine, I can collect the sales/finance reports. However, I also want to collect information about the impressions, product page views etc. (App analytics) Is this not possible at the moment, or is the documentation lacking this information? Thanks in advance

Replies

I can get analytics data from API but I do not how I can get "dqsid"? I take it from the browser cookie but I want to get "dqsid" param from API. Do you have any ideas?

import requests
import json

url = "https://appstoreconnect.apple.com/analytics/api/v1/data/time-series"
adamId = "0000000000" # App ID
measures = "installs" # or "impressionsTotalUnique"

cookie_dqsid = "dqsid=ey...." # ?????

payload = json.dumps({
  "adamId": [adamId],
  "measures": [measures],
  "frequency": "day",
  "startTime": "2021-10-16T00:00:00Z",
  "endTime": "2021-11-14T00:00:00Z",
  "group": {
    "metric": measures,
    "dimension": "source",
    "rank": "DESCENDING",
    "limit": 100
  }
})

headers = {
  'Host': 'appstoreconnect.apple.com',
  'X-Requested-By': 'dev.apple.com',
  'Cookie': cookie_dqsid,
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload, allow_redirects=False)

print(response.text)
  • Any news about this?

  • Very useful, thanks DismasRu.

  • Hey DimasRu, I'm trying your code but I'm not able to make it run, it gives me 302 error and no way to make it run. Did you update your code in order to make it run, or still running for you?

Add a Comment

Any news on this topic?

Any news on how to get downloads data?

Any news about this? Seems like a highly requested feature

Any news ?

Any updates about this?

Thank you @DimasRu - works great. Any idea how to apply filters as well?

Add a Comment

@lanquinp inspect the web-page, got to Application, cookies and you will see the field dqsid

  • @Prometheus2021 were you able to pull data using this method? I receive a blank response. If you are able to, could you provide insights into what you are doing different from the above code?

  • @Prometheus2021 Have you discovered any ways to pull dqsid programmatically and not from browser?

Add a Comment

@lanquinp you need to add the prefix "dqsid=...." before the actual value.

No way I can see to pull programmatically. Let me know if you figure it out.

  • @Prometheus2021 Nada on my end for the programmatic dqsid, but was able to figure out filtering pulls and all the metrics available.

    Now running into an issue with request limits, seems this method doesn't like being used consistently, you'll start getting 429 responses for a request limit.

Add a Comment

Hi! I found a way to get this data automatically, however I am using a bot to connect to AppStoreConnect so it is not a scalable solution. You can find it here: https://github.com/L1ttleFinger/Apple_Scraping

  • Basically the steps are:

    Use a bot to connect to the website, generate and recover the cookies.Call the internal API data/time-series with the measures you want to recover and filters you want to apply.

    @lanquinp @Prometheus2021 I don't know if this is the kind of solution you are looking for, I unfortunatly don't know of any other way to automatically fetch this data. I contacted Apple support on this matter but was told there is no "official" way to get this data programatically.

  • @L1ttleFinger This is absolutely helpful to see that others have had to do the same as me. Just a few weeks late as I've developed my own calls and system 😝

    I will take a look at the Selenium code though, as I haven't implemented that part of the project yet. Been working on pulling the 384 separate reports that I need for the granularity I'm looking for. 😅

    Thanks a ton for sharing the project! I'd love to contribute if I come up with more details, help with some of the discoveries I have.

Add a Comment