title: How to query certain metrics from tik tok report api in python?
body: <p>Hi I am trying to get additional metrics such as reach, video view up to 50%, video view up to 100% and url link per ad. However I am having a hard time finding the documentation to get such items.</p>
  <p>currently this is my code that runs</p>
  <pre><code>endDate =&quot;2022-05-01&quot;
  def tiktok(endDate):
      dftiktok=pd.DataFrame()
      ACCESS_TOKEN = &quot;xxxxxxxx&quot;
      PATH = &quot;/open_api/v1.2/reports/integrated/get/&quot;
      advertiser_id = &quot;xxxxx&quot;
      service_type = 'AUCTION'
      data_level= &quot;AUCTION_CAMPAIGN&quot;
      dimensions_list = [&quot;campaign_id&quot;,'stat_time_day']
      dimensions = json.dumps(dimensions_list)
      start_date = str(endDate) 
      end_date =str(endDate)
      metrics_list = [&quot;campaign_name&quot;,'objective_type',&quot;spend&quot;, &quot;impressions&quot;,'app_install','registration','clicks']
      metrics = json.dumps(metrics_list)
      order_field = 'stat_time_day'
      page = 1
      page_size =1000
  
      url = f&quot;https://business-api.tiktok.com/open_api/v1.2/reports/integrated/get/?advertiser_id={advertiser_id}&amp;service_type={service_type}&amp;report_type=BASIC&amp;data_level={data_level}&amp;dimensions={dimensions}&amp;data_level=AUCTION_AD&amp;metrics={metrics}&amp;start_date={start_date}&amp;end_date={end_date}&amp;order_field=impressions&amp;page={page}&amp;page_size={page_size}&amp;order_field={order_field}&quot;
      headers = {
              &quot;Access-Token&quot;: ACCESS_TOKEN,
      }
      rsp = requests.get(url, headers=headers)
      print(rsp)
      rows = pd.json_normalize(rsp.json(),record_path=[['data','list']],errors='ignore')
      dftiktok=dftiktok.append(rows)
      return dftiktok 
  </code></pre>
  <p>If anyone can refer a refrence or tell me how to get those items.</p>