Chuyển tới nội dung chính

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ênKiểuMẫuMô tả
partner_idint1Partner 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.
timestamptimestamp1610000000Dù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_tokenstringc09222e3fc40ffb25fc947f738b1abf1Token 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_idint1Shopee's mã định danh duy nhất for a user.
signstringe318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2Signature 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ênKiểuMẫuMô tả
errorstringLoại lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
messagestringChi tiết lỗi nếu có lỗi xảy ra. Trống nếu không có lỗi.
request_idstring2af852cd-7420-4714-b7cd-33317f6fe548Mã định danh của yêu cầu API dùng để theo dõi lỗi.
responseobject
ageobjectThe 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.
genderobjectThe 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.
locationobjectThe 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.
identityobjectThe 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.
activityobjectThe 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.
contentobjectThe 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.
shoppingobjectThe 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&timestamp=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&timestamp=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&timestamp=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&timestamp=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 } } }