iTunes Analytics API

I'm trying to find a way, for gathering my App analytics (from analytics.itunes.apple.com) using API.

There is one same issue https://forums.developer.apple.com/message/98092#98092 ,from december 2015. Maybe something changed for today?

I found and try Official Reporter tool from Apple https://help.apple.com/itc/appsreporterguide/ , but it's not the thing what i searching for.

Does Apple have official/unofficial API endpoint, to download mobile app analytics?

I'm interested in one concrete metric: Count of my App installs by day or by selected time range.

I would be appreciate for any help! Thank you.

Replies

Any news?

Me too. They have an internal API https://appstoreconnect.apple.com/analytics/api/v1/data/time-series

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)