1.3.2.2 网站概况(地域分布)

优质
小牛编辑
139浏览
2023-12-01

网站概况(地域分布)

关键参数

报告methodmetrics(指标, 数据单位)其他参数
网站概况(地域分布)overview/getDistrictRpt
pv_count (浏览量(PV))

示例

查询站点从20190101到20190105的分省份的访客数占比

  • 百度商业账号

请求

{
    "header": {
        "username": "zhangsan",
        "password": "xxxxxxxx",
        "token": "xxxxxxxx",
        "account_type": 1
    },
    "body": {
        "site_id": "xxx",
        "start_date": "20190101",
        "end_date": "20190105",
        "metrics": "",
        "method": "overview/getDistrictRpt"
    }
}

响应

{
    "header": {
        "desc": "success",
        "failures": [],
        "oprs": 1,
        "succ": 1,
        "oprtime": 0,
        "quota": 1,
        "rquota": 49989,
        "status": 0
    },
    "body": {
        "data": [
            {
                "result": {
                    "items": [
                        [
                            [
                                "河南"
                            ],
                            [
                                "湖北"
                            ],
                            [
                                "上海"
                            ]
                        ],
                        [
                            [
                                "--",
                                0
                            ],
                            [
                                "--",
                                0
                            ],
                            [
                                "--",
                                0
                            ]
                        ],
                        [],
                        []
                    ],
                    "fields": [
                        "simple_district_title",
                        "ratio"
                    ]
                }
            }
        ]
    }
}
  • 百度账号

请求

https://openapi.baidu.com/rest/2.0/tongji/report/getData?access_token=xxxxxxxx&site_id=xxxx&method=overview/getDistrictRpt&start_date=20190501&end_date=20190531

响应

{
    "result": {
        "items": [
            [
                [
                    "河南"
                ],
                [
                    "湖北"
                ],
                [
                    "上海"
                ]
            ],
            [
                [
                    "--",
                    0
                ],
                [
                    "--",
                    0
                ],
                [
                    "--",
                    0
                ]
            ],
            [],
            []
        ],
        "fields": [
            "simple_district_title",
            "ratio"
        ]
    }
}