How i can export analytic data from Itunes Connect

Hi,


I have analytics account in Itunes, I want to export the analytics from Itunes and then generate report in my own system. I read many article but not able to found any api to connect to Itunes remotely. Any help in this regards will be greatly appreciated.


Thanks in advance.

Bump.


Did you get anywhere with this?

W

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)
How i can export analytic data from Itunes Connect
 
 
Q