链接访问统计

GET https://qr.tpxx.net/api/statistics/
curl --request GET \
--url 'https://qr.tpxx.net/api/statistics/' \
--header 'Authorization: Bearer {api_key}' \
参数 详情 描述
start_date 可选 字符串 开始日期,格式为 Y-m-d。
end_date 可选 字符串 结束日期,格式为 Y-m-d。
project_id 可选 整数
type 可选 字符串 允许的值:overview, entries, referrer_host, referrer_path, crawler, continent_code, country_code, region_name, city_name, timezone, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign, hour, weekday, visitor_type, acquisition_channel
continent_code 可选 字符串 可用条件:type = country_code
country_code 可选 字符串 可用条件:type = region_name, city_name
region_name 可选 字符串 可用条件:type = city_name
referrer_type 可选 字符串 可用条件:type = referrer_host 允许的值:all, ai, social_media, search_engines, other_websites
crawler_type 可选 字符串 可用条件:type = crawler 允许的值:all, ai, search_engines
utm_source 可选 字符串 可用条件:type = utm_medium, utm_campaign
utm_medium 可选 字符串 可用条件:type = utm_campaign
referrer_host 可选 字符串 可用条件:type = referrer_path
{
    "data": [
        {
            "pageviews": 20,
            "visitors": 5,
            "formatted_date": "2021-01"
        },
        {
            "pageviews": 35,
            "visitors": 10,
            "formatted_date": "2021-02"
        },
        {
            "pageviews": 50,
            "visitors": 25,
            "formatted_date": "2021-03"
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://qr.tpxx.net/api/statistics?page=1",
        "last": "https://qr.tpxx.net/api/statistics?page=1",
        "next": null,
        "prev": null,
        "self": "https://qr.tpxx.net/api/statistics?page=1"
    }
}
GET https://qr.tpxx.net/api/statistics/{link_id}
参数 详情 描述
start_date 可选 字符串 开始日期,格式为 Y-m-d。
end_date 可选 字符串 结束日期,格式为 Y-m-d。
type 可选 字符串 允许的值:overview, entries, referrer_host, referrer_path, crawler, continent_code, country_code, region_name, city_name, timezone, os_name, browser_name, device_type, browser_language, utm_source, utm_medium, utm_campaign, hour, weekday, visitor_type, acquisition_channel
continent_code 可选 字符串 可用条件:type = country_code
country_code 可选 字符串 可用条件:type = region_name, city_name
region_name 可选 字符串 可用条件:type = city_name
referrer_type 可选 字符串 可用条件:type = referrer_host 允许的值:all, ai, social_media, search_engines, other_websites
crawler_type 可选 字符串 可用条件:type = crawler 允许的值:all, ai, search_engines
utm_source 可选 字符串 可用条件:type = utm_medium, utm_campaign
utm_medium 可选 字符串 可用条件:type = utm_campaign
referrer_host 可选 字符串 可用条件:type = referrer_path
curl --request GET \
--url 'https://qr.tpxx.net/api/statistics/{link_id}?start_date=2020-01-01&end_date=2021-01-01' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": [
        {
            "pageviews": 20,
            "visitors": 5,
            "formatted_date": "2021-01"
        },
        {
            "pageviews": 35,
            "visitors": 10,
            "formatted_date": "2021-02"
        },
        {
            "pageviews": 50,
            "visitors": 25,
            "formatted_date": "2021-03"
        }
    ]
}