Search Console API按维度分组

时间:2018-09-25 07:16:36

标签: google-search-api

我正在使用Google Search Console API V3来获取数据。我正在使用他们的API资源管理器工具来检查响应。

无论如何,我可以获取按维度分组的响应。

目前,我正在体内传递此信息

{
  "startDate": "2018-08-01",
  "endDate": "2018-09-01",
  "dimensions": [
    "country",
    "device"
  ],
  "rowLimit": 10,
  "aggregationType": "byProperty"
}

Google的回复:

{
 "rows": [
  {
   "keys": [
    "usa",
    "DESKTOP"
   ],
   "clicks": 92.0,
   "impressions": 3287.0,
   "ctr": 0.027989047763918466,
   "position": 40.679951323395194
  },
  {
   "keys": [
    "can",
    "DESKTOP"
   ],
   "clicks": 57.0,
   "impressions": 401.0,
   "ctr": 0.14214463840399003,
   "position": 23.865336658354114
  },
  {
   "keys": [
    "usa",
    "MOBILE"
   ],
   "clicks": 37.0,
   "impressions": 1384.0,
   "ctr": 0.026734104046242775,
   "position": 40.45014450867052
  },
  {
   "keys": [
    "can",
    "MOBILE"
   ],
   "clicks": 27.0,
   "impressions": 198.0,
   "ctr": 0.13636363636363635,
   "position": 6.378787878787879
  },
  {
   "keys": [
    "ind",
    "DESKTOP"
   ],
   "clicks": 15.0,
   "impressions": 1620.0,
   "ctr": 0.009259259259259259,
   "position": 51.35432098765432
  },
  {
   "keys": [
    "usa",
    "TABLET"
   ],
   "clicks": 10.0,
   "impressions": 277.0,
   "ctr": 0.036101083032490974,
   "position": 31.823104693140795
  },
  {
   "keys": [
    "can",
    "TABLET"
   ],
   "clicks": 5.0,
   "impressions": 26.0,
   "ctr": 0.19230769230769232,
   "position": 3.269230769230769
  },
  {
   "keys": [
    "gbr",
    "DESKTOP"
   ],
   "clicks": 4.0,
   "impressions": 100.0,
   "ctr": 0.04,
   "position": 45.23
  },
  {
   "keys": [
    "gbr",
    "MOBILE"
   ],
   "clicks": 4.0,
   "impressions": 37.0,
   "ctr": 0.10810810810810811,
   "position": 31.783783783783782
  },
  {
   "keys": [
    "ind",
    "MOBILE"
   ],
   "clicks": 4.0,
   "impressions": 192.0,
   "ctr": 0.020833333333333332,
   "position": 40.572916666666664
  }
 ],
 "responseAggregationType": "byProperty"
}

无论如何,我可以对点击次数,展示次数,ctr,位置键进行分组。

示例:

{
 "rows": [
  {
   "keys": [
      "usa",
     ],
     "clicks": 92.0,
     "impressions": 3287.0,
     "ctr": 0.027989047763918466,
     "position": 40.679951323395194
    },
    "keys": [
      "DEVICE",
     ],
     "clicks": 92.0,
     "impressions": 3287.0,
     "ctr": 0.027989047763918466,
     "position": 40.679951323395194
    }
   }
   ]}

0 个答案:

没有答案