v2.video.get_user_demographics
GET /api/v2/video/get_user_demographics
Get nhân khẩu học người dùng data to better understand the types of viewers that watch your Shopee Video.
Đường dẫn Endpoint
URL: https://partner.shopeemobile.com/api/v2/video/get_user_demographics
Tham số chung
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| partner_id | int | 1 | Partner ID được gán khi đăng ký thành công. Bắt buộc cho tất cả các yêu cầu. |
| timestamp | timestamp | 1610000000 | Dùng để chỉ định thời gian của yêu cầu. Bắt buộc cho tất cả các yêu cầu. Hết hạn sau 5 phút. |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | Token truy cập API, dùng để xác định quyền của bạn đối với API. Có thể sử dụng nhiều lần và hết hạn sau 4 giờ. |
| user_id | int | 1 | Shopee's mã định danh duy nhất for a user. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by(depends on different APIs) partner_id, api path, timestamp, access_token, user_id and partner_key via HMAC-SHA256 hashing algorithm. |
No Request Parameters Set.
Tham số Response
| Tên | Kiểu | Mẫu | Mô tả |
|---|---|---|---|
| error | string | Loại lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi. | |
| message | string | Chi tiết lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi. | |
| request_id | string | 2af852cd-7420-4714-b7cd-33317f6fe548 | Mã định danh của yêu cầu API dùng để theo dõi lỗi. |
| response | object | ||
| age | object | The age distribution of your viewers. Note: Loại của age is a map. The key is an enumerated value corresponding to an age range: -1: Unknown 1: 18-24 years old 2: 25-34 years old 3: 35-44 years old 4: 45+ years old The value is the number of viewers in each age group. | |
| gender | object | The gender distribution of your viewers. Note: Loại của gender is a map. The key is one of: Male Female Predicted Male Predicted Female The value is the number of viewers for each gender type. | |
| location | object | The geographic distribution of your viewers. Note: Loại của location is a map. The key is top 10 city, and the value is the number of viewers in each city. | |
| identity | object | The distribution of viewers based on whether they follow your Shopee Video profile. Note: Loại của identity is a map. The key is either "follow" or "unfollow", indicating followers and non-followers respectively, and the value is number of page views generated by each group. | |
| activity | object | The distribution of video views across different hours of the day. Note: Loại của activity is a map. The key is the hour of the day (ranging from 0 to 23), and the value is the number of video views generated during that specific hour. | |
| content | object | The types of videos that your viewer is most interested in. Note: Loại của content is a map. The key is top 10 content category, and the value is the number of video views corresponding to that content category. | |
| shopping | object | The types of products that your viewers is most interested in. Note: Loại của shopping is a map. The key is top 10 product category, and the value is the number of video views corresponding to that product category. |
Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.get("https://partner.shopeemobile.com/api/v2/video/get\_user\_demographics?access\_token=access\_token&partner\_id=partner\_id&sign=sign×tamp=timestamp&user\_id=user\_id") .asString();<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/video/get\_user\_demographics?access\_token=access\_token&partner\_id=partner\_id&sign=sign×tamp=timestamp&user\_id=user\_id', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), )); $response = curl_exec($curl); curl_close($curl); echo $response; curl --location --request GET 'https://partner.shopeemobile.com/api/v2/video/get\_user\_demographics?access\_token=access\_token&partner\_id=partner\_id&sign=sign×tamp=timestamp&user\_id=user\_id' import requests url = "https://partner.shopeemobile.com/api/v2/video/get\_user\_demographics?access\_token=access\_token&partner\_id=partner\_id&sign=sign×tamp=timestamp&user\_id=user\_id" payload={} headers = { } response = requests.RPCRequest("GET",url,headers=headers, data=payload, allow_redirects=False) print(response.text)
, "gender": { "Male": 635, "Female": 1483 }, "identity": { "follow": 1694, "unfollow": 424 }, "location": { "KOTA JAKARTA SELATAN": 1270, "KAB. BADUNG": 848 }, "activity": { "0": 56, "1": 35, "2": 24, "3": 16, "4": 11, "5": 21, "6": 32, "7": 48, "8": 59, "9": 70, "10": 85, "11": 35, "12": 25, "13": 85, "14": 28, "15": 61, "16": 90, "17": 89, "18": 261, "19": 250, "20": 228, "21": 154, "22": 166, "23": 189 }, "content": { "Beauty & Fashion": 728, "Travel": 519, "Auto & Vehicle": 353, "Entertainment": 194, "Technology": 163, "Comedy & Acting": 88, "Food & Drink": 73 }, "shopping": { "Beauty": 768, "Home & Living": 549 "Women Clothes": 373, "Muslim Fashion": 154, "Mom & Baby": 133, "Health": 78, "Mobile & Gadgets": 63 } } }