v2.video.get_video_detail_audience_distribution
GET /api/v2/video/get_video_detail_audience_distribution
Get detailed phân phối đối tượng data for individual post Shopee Video. There is at least a one-day delay.
Đường dẫn Endpoint
URL: https://partner.shopeemobile.com/api/v2/video/get_video_detail_audience_distribution
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. |
Tham số Request
| Tên | Kiểu | Bắt buộc | Mẫu | Mô tả |
|---|---|---|---|---|
| post_id | string | True | YwOo_gZqCACXbM0UAAAAAA== | A mã định danh duy nhất for Shopee videos. |
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 | Detail informations you are querying. | |
| 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 predictedMale predictedFemale unknown 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 one of: 0: Non-follower 1: Follower The value is number of user 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 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 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\_video\_detail\_audience\_distribution?access\_token=access\_token&partner\_id=partner\_id&post\_id=YwOo\_gZqCACXbM0UAAAAAA%3D%3D&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\_video\_detail\_audience\_distribution?access\_token=access\_token&partner\_id=partner\_id&post\_id=YwOo\_gZqCACXbM0UAAAAAA%3D%3D&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\_video\_detail\_audience\_distribution?access\_token=access\_token&partner\_id=partner\_id&post\_id=YwOo\_gZqCACXbM0UAAAAAA%3D%3D&sign=sign×tamp=timestamp&user\_id=user\_id' import requests url = "https://partner.shopeemobile.com/api/v2/video/get\_video\_detail\_audience\_distribution?access\_token=access\_token&partner\_id=partner\_id&post\_id=YwOo\_gZqCACXbM0UAAAAAA%3D%3D&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": 1350736, "female": 1299539, "predictedMale": 650656, "predictedFemale": 780550, "unknown": 249717 }, "location": { "KAB. MAGETAN": 9138, "KAB. SERDANG BEDAGAI": 4138, "KAB. ACEH TENGGARA": 592, "KAB. LUWU UTARA": 1450, "KAB. MAJENE": 872, "KAB. KLATEN": 17108, "KAB. MINAHASA TENGGARA": 274, "KOTA BATU": 4900, "KAB. MOJOKERTO": 20307, "KAB. TANJUNG JABUNG BARAT": 2277, "KOTA BLITAR": 3548, "KAB. KEPULAUAN ANAMBAS": 267, "KAB. SAROLANGUN": 1993, "KAB. KAYONG UTARA": 822 }, "activity": { "2": 1, "7": 1, "12": 1, "14": 1, "15": 1, "18": 2, "19": 1 }, "identity": { "0": 4331198 }, "content": { "Family & Relationships": 48005042, "Beauty & Fashion": 42070550, "Entertainment": 131205196, "Comedy & Acting": 114127400, "Society": 63745038, "Daily Life": 175538650 }, "shopping": { "Beauty": 259060, "Women Clothes": 141713, "Food & Beverages": 85413, "Health": 84079, "Baby & Kids Fashion": 82957, "Men Clothes": 81115, "Home & Living": 248660 } }, "request_id": "9bf7184d-3583-4047-ba0e-a8e7dcd6fbc1" }