Get data from API - App analytics acquisition

Hi, can you say how I can get data from acquisition sources through API? https://help.apple.com/app-store-connect/#/itcf19c873df

I see you use this service - [https://appstoreconnect.apple.com/analytics/api/v1/data/time-series] but I can not find any information about using this API

I can get analytics data from API but I do not how I can get "dqsid"?

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)

Hi DimasRu,

Were you able to figure how to get the dqsid? I've also been looking for this.

Get data from API - App analytics acquisition
 
 
Q