stable本次发布有变化全部展示
来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 v2.principal.get_clip_video_performance
Queries video clip performance data for the specified videos within the selected time range. Supports request granularity by day, week, month, quarter, year, or customize, and returns both overall summary metrics and video-level detailed metrics.
§2 Overview
Overview
| Field | Value |
|---|---|
| Module | BrandPortal |
| API type | Principal |
| HTTP method | POST |
| Path | /api/v2/principal/get_clip_video_performance |
| Production URL | https://partner.shopeemobile.com/api/v2/principal/get_clip_video_performance |
| Sandbox URL | https://partner.test-stable.shopeemobile.com/api/v2/principal/get_clip_video_performance |
| Permission | Brand Portal Service |
§3 Request parameters
Request parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| start_date | string | Yes | 2026-01-01 | Start date of the requested period in YYYY-MM-DD format. Limitations: - Must use the YYYY-MM-DD format.; - Must be a valid calendar date.; - Must not be later than end_date.; - Validation is based on the requested timezone.; - The earliest selectable date is calculated as: current day in timezone - 1 day - 2 years.; - The exact boundary rules depend on granularity: -- For customize, start_date must not be earlier than the earliest selectable date.; -- For day, start_date must equal end_date.; -- For week, start_date must be a Sunday.; -- For month, start_date must be the first day of the month.; -- For quarter, start_date must be the first day of the quarter.; -- For year, start_date must be the first day of the year. |
| end_date | string | Yes | 2026-01-31 | End date of the requested period in YYYY-MM-DD format. Limitations: - Must use the YYYY-MM-DD format. - Must be a valid calendar date. - Must not be earlier than start_date. - Validation is based on the requested timezone. - For customize, end_date must not be later than the day before the current day in the requested timezone. The inclusive date range from start_date to end_date must not exceed 366 days. - For day, end_date must equal start_date. - For week, end_date must be within the selected week range: from start_date (Sunday) to the end of that Sunday-to-Saturday week, or to the latest selectable day if the week extends beyond today. Formally: startDate ≤ endDate ≤ min(startDate + 6 days, today - 1 day). - For month, end_date must be within the selected month: from the 1st day of the month to the last calendar day of that month, or to the latest selectable day for the current month. Formally: startDate ≤ endDate ≤ min(month end, today - 1 day). - For quarter, end_date must be within the selected quarter: from the 1st day of the quarter to the last calendar day of that quarter, or to the latest selectable day for the current quarter. Formally: startDate ≤ endDate ≤ min(quarter end, today - 1 day). - For year, end_date must be within the selected year: from January 1st to December 31st of that year, or to the latest selectable day for the current year. Formally: startDate ≤ endDate ≤ min(Dec 31, today - 1 day). |
| timezone | string | Yes | GMT+8 | Timezone used for date boundary calculation, selectable date validation, and timestamp conversion. Limitations: - Enum values: ["GMT+7", "GMT+8", "GMT-3"]; - The API internally normalizes the open API timezone value for video metric queries.; - All date validation rules are evaluated in the requested timezone. |
| granularity | string | Yes | month | Aggregation granularity that determines the validation rules for the requested date range and the reporting period.; Limitations: - Supported values are customize, day, week, month, quarter, and year.; - customize is validated as a free date range.; - day represents a single calendar day.; - week requires a Sunday-based calendar week.; - month requires a calendar month range.; - quarter requires a calendar quarter range.; - year requires a calendar year range.; - Any other value is rejected as invalid_parameter. |
| video_list | object[] | No | List of video clip query targets.; Limitations: - Must contain at least one object.; - Must contain at most 100 objects.; - Every shop_id must belong to the specified principal_id.; - Duplicate shop_id values are rejected.; - Each object must provide a non-empty video_ids list.; - Null video_id values are rejected.; - Duplicate video_id values across the whole request are rejected.; - The total number of unique video_ids across the whole request must not exceed 100. | |
| video_list.shop_id | int64 | Yes | 181050132 | Shop identifier that owns the specified videos. Limitations: - Required for every object in video_list.; - Must belong to the specified principal_id. |
| video_list.video_ids | int64[] | Yes | [1453493,1453494] | List of video identifiers to be queried under the specified shop. Limitations: - Required for every object in video_list.; - Must contain at least one video_id.; - Must contain at most 100 video_ids per object.; - Null video_id values are rejected.; - Duplicate video_id values across the whole request are rejected.; - Across the whole request, the total number of unique video_ids must not exceed 100. |
| video_list.currency | string | No | LOCAL | Currency used for amount-based metrics for the specified videos. Limitations: - Optional for every object in video_list.; - Supported values are LOCAL and USD.; - Invalid currency values are rejected as invalid_parameter.; - Defaults to USD when omitted. |
| page_size | int64 | No | 100 | Number of detail records to return in the current response page.; Limitations: - Only supported when video_list is omitted or an empty array.; - Default value is 100.; - Must be between 1 and 200, inclusive. |
| cursor | int64 | No | 100 | Zero-based offset of the first detail record to return.; Limitations: - Only supported when video_list is omitted or an empty array.; - Default value is 0.; - Must be greater than or equal to 0. |
§4 Response parameters
Response parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| request_id | string | 0b9847f8-9091-44ea-9eb1-59f3ce3bdf83 | The identifier for an API request, used for troubleshooting and log tracing. | |
| error | string | Indicate error type if any error happened. Empty string if no error. | ||
| message | string | Indicate error details if any error happened. Empty string if no error. | ||
| response | object | Business response payload. See Business Response Parameters below. | ||
| response.summary | object[] | Aggregated summary metrics for the requested date range, representing the overall performance of the selected videos.; Note: - unique_viewers and total_unique_buyers are unavailable for customize, month, quarter, year, and non-full-week weekly ranges. | ||
| response.summary.currency | string | USD | Currency code used for all amount-based metrics in the summary. | |
| response.summary.total_views | int64 | 575 | Total views from the selected videos. | |
| response.summary.unique_viewers | int64 | 441 | Number of video viewers in the selected period. Note: This data is unavailable when you select by month, by quarter, by year, customize date, or a non-full weekly range. | |
| response.summary.video_duration | float | 2.5 | Video duration in minutes. | |
| response.summary.average_views_duration | float | 44.3968253968254 | Average viewing duration per video in minutes. | |
| response.summary.likes | int64 | 89 | Number of Like clicks from the selected videos. | |
| response.summary.comments | int64 | 3 | Number of comments generated from the selected videos. | |
| response.summary.share | int64 | 2 | Number of shares created from the selected videos. | |
| response.summary.total_unique_buyers | int64 | 2 | Number of unique buyers who placed order from the selected videos. Note: This data is unavailable when you select by month, by quarter, by year, customize date, or a non-full weekly range. | |
| response.summary.atc_units | int64 | 14 | Number of Add To Cart button clicks for all products in the orange bag during the selected videos. | |
| response.summary.units_sold | int64 | 2 | Number of items sold from placed orders during the selected videos. | |
| response.summary.orders | int64 | 2 | Number of placed orders (paid and unpaid) during the selected videos, including cancelled orders. | |
| response.summary.sales | float | 420.0 | Value of placed orders (paid and unpaid) from the selected videos in the period, reflecting the sales amount received by sellers after deducting seller rebates. Note: This value includes sales from cancelled and return/refund orders. | |
| response.summary.conversion_rate | float | 0.0034782608695652175 | Video orders / total video views. | |
| response.details | object[] | List of video-level detail records that returns performance metrics for each selected video within the requested date range.; Details are sorted by shop_id and then video_id in ascending order.; - unique_viewers and total_unique_buyers are unavailable for customize, month, quarter, year, and non-full-week weekly ranges. | ||
| response.details.region | string | SG | Region code of the shop that owns this video. | |
| response.details.currency | string | LOCAL | Currency code used for all amount-based metrics of this video item. | |
| response.details.shop_id | int64 | 181050132 | Shop identifier that owns this video. | |
| response.details.shop_name | string | Huawei Official Store | Shop name that owns this video. | |
| response.details.video_id | int64 | 1453493 | Video identifier. | |
| response.details.video_name | string | HUAWEI Mid-Month Madness | Video name. | |
| response.details.total_views | int64 | 575 | Total views from this video. | |
| response.details.unique_viewers | int64 | 441 | Number of video viewers in the selected period. Note: This data is unavailable when you select by month, by quarter, by year, customize date, or a non-full weekly range. | |
| response.details.video_duration | float | 2.5 | Video duration in minutes. | |
| response.details.average_views_duration | float | 44.3968253968254 | Average viewing duration per video in minutes. | |
| response.details.likes | int64 | 89 | Number of Like clicks from this video. | |
| response.details.comments | int64 | 3 | Number of comments generated from this video. | |
| response.details.share | int64 | 2 | Number of shares created from this video. | |
| response.details.total_unique_buyers | int64 | 2 | Number of unique buyers who placed order from this video. Note: This data is unavailable when you select by month, by quarter, by year, customize date, or a non-full weekly range. | |
| response.details.atc_units | int64 | 14 | Number of Add To Cart button clicks for all products in the orange bag during this video. | |
| response.details.units_sold | int64 | 2 | Number of items sold from placed orders during this video. | |
| response.details.orders | int64 | 2 | Number of placed orders (paid and unpaid) during this video, including cancelled orders. | |
| response.details.sales | float | 420.0 | Value of placed orders (paid and unpaid) from this video in the period, reflecting the sales amount received by sellers after deducting seller rebates. Note: This value includes sales from cancelled and return/refund orders. | |
| response.details.conversion_rate | float | 0.0034782608695652175 | Video orders / total video views. | |
| response.next_cursor | int64 | 100 | Offset to be used in the next request for fetching the next page of detail records.; Notes: - Returned only when video_list is omitted or an empty array.; - Calculated as cursor + returned_detail_count.; - If returned_detail_count is less than page_size, it indicates there may be no more records.; - If the request is already beyond the end of the result set, the API returns 0 detail records and next_cursor remains equal to the input cursor. |
§5 Common parameters
Common parameters
| Name | Type | Required | Sample | Description |
|---|---|---|---|---|
| partner_id | int | 1 | Partner ID is assigned upon registration is successful. Required for all requests. | |
| timestamp | timestamp | 1610000000 | This is to indicate the timestamp of the request. Required for all requests. Expires in 5 minutes. | |
| access_token | string | c09222e3fc40ffb25fc947f738b1abf1 | The token for API access, using to identify your permission to the api. Valid for multiple use and expires in 4 hours. | |
| principal_id | int | 1 | Shopee's unique identifier for a principal. | |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by(depends on different APIs) partner_id, api path, timestamp, access_token, principal_id and partner_key via HMAC-SHA256 hashing algorithm. |
§6 Request samples
Request samples
§7 Payload
Payload
{
"start_date": "2026-01-01",
"end_date": "2026-01-31",
"timezone": "GMT+8",
"granularity": "month",
"page_size": 100,
"cursor": 0
}
§8 Java
Java
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://partner.shopeemobile.com/api/v2/principal/get_clip_video_performance?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp")
.header("Content-Type","application/json")
.body("{
\"cursor\": 100,
\"end_date\": \"2026-01-31\",
\"granularity\": \"month\",
\"page_size\": 100,
\"start_date\": \"2026-01-01\",
\"timezone\": \"GMT+8\",
\"video_list\": [
{
\"currency\": \"LOCAL\",
\"shop_id\": 181050132,
\"video_ids\": [
1453493,
1453494
]
}
]
}")
.asString();
§9 PHP
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://partner.shopeemobile.com/api/v2/principal/get_clip_video_performance?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"cursor": 100,
"end_date": "2026-01-31",
"granularity": "month",
"page_size": 100,
"start_date": "2026-01-01",
"timezone": "GMT+8",
"video_list": [
{
"currency": "LOCAL",
"shop_id": 181050132,
"video_ids": [
1453493,
1453494
]
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
§10 cURL
cURL
curl --location --request POST 'https://partner.shopeemobile.com/api/v2/principal/get_clip_video_performance?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp' \
--header 'Content-Type: application/json' \
--data-raw '{
"cursor": 100,
"end_date": "2026-01-31",
"granularity": "month",
"page_size": 100,
"start_date": "2026-01-01",
"timezone": "GMT+8",
"video_list": [
{
"currency": "LOCAL",
"shop_id": 181050132,
"video_ids": [
1453493,
1453494
]
}
]
}'
§11 Python
Python
import requests
import json
url = "https://partner.shopeemobile.com/api/v2/principal/get_clip_video_performance?access_token=access_token&partner_id=partner_id&principal_id=principal_id&sign=sign×tamp=timestamp"
payload=json.dumps({
"cursor": 100,
"end_date": "2026-01-31",
"granularity": "month",
"page_size": 100,
"start_date": "2026-01-01",
"timezone": "GMT+8",
"video_list": [
{
"currency": "LOCAL",
"shop_id": 181050132,
"video_ids": [
1453493,
1453494
]
}
]
})
headers = {
'Content-Type': 'application/json'
}
response = requests.RPCRequest("POST",url,headers=headers, data=payload, allow_redirects=False)
print(response.text)
§12 Response sample
Response sample
§13 JSON
JSON
{
"request_id": "0b9847f8-9091-44ea-9eb1-59f3ce3bdf83",
"error": "",
"message": "",
"response": {
"summary": [
{
"currency": "USD",
"total_views": 575,
"unique_viewers": 441,
"video_duration": 2.5,
"average_views_duration": 44.3968253968254,
"likes": 89,
"comments": 3,
"share": 2,
"total_unique_buyers": 2,
"atc_units": 14,
"units_sold": 2,
"orders": 2,
"sales": 420,
"conversion_rate": 0.0034782608695652175
}
],
"details": [
{
"region": "SG",
"currency": "LOCAL",
"shop_id": 181050132,
"shop_name": "Huawei Official Store",
"video_id": 1453493,
"video_name": "HUAWEI Mid-Month Madness",
"total_views": 575,
"unique_viewers": 441,
"video_duration": 2.5,
"average_views_duration": 44.3968253968254,
"likes": 89,
"comments": 3,
"share": 2,
"total_unique_buyers": 2,
"atc_units": 14,
"units_sold": 2,
"orders": 2,
"sales": 420,
"conversion_rate": 0.0034782608695652175
}
],
"next_cursor": 100
}
}
§14 Error example
Error example
§15 JSON
JSON
{
"request_id": "eb51ff6d-5196-4db4-bade-322f3676004e",
"error": "error_param",
"message": "cursor must be greater than or equal to 0.",
"response": null
}
§16 Errors
Errors
| Error | Description | Solution |
|---|---|---|
| error_param | timezone is required | |
| error_param | timezone is invalid. allowed values: GMT+7, GMT+8, GMT-3. | |
| error_param | granularity is required | |
| error_param | request body is invalid | |
| error_param | page_size is only supported when video_list is empty. | |
| error_param | cursor is only supported when video_list is empty. | |
| error_param | shop_id is required | |
| error_param | currency is invalid | |
| error_param | video_ids is required | |
| error_param | end_date is not ready, please retry later | |
| error_param | for day granularity, start_date must equal end_date. | |
| error_param | day range is outside the allowed selectable range. | |
| error_param | for week granularity, end_date must be within the selected week range | |
| error_param | for week granularity, start_date must be a Sunday. | |
| error_param | week start_date is earlier than the earliest allowed week. | |
| error_param | start_date cannot be later than end_date. | |
| error_param | month range is outside the allowed selectable range. | |
| error_param | for month granularity, start_date must be the first day of month. | |
| error_param | for month granularity, end_date must be within the selected month range. | |
| error_param | for quarter granularity, end_date must be within the selected quarter range. | |
| error_param | year range is outside the allowed selectable range. | |
| error_param | for quarter granularity, start_date must be the first day of quarter. | |
| error_param | for quarter granularity, end_date must be within the selected quarter range. | |
| error_param | start_date is earlier than the earliest allowed date | |
| error_param | for year granularity, end_date must be within the selected year range. | |
| error_param | end_date must not be later than the latest selectable day. | |
| error_param | cursor must be greater than or equal to 0 | |
| error_param | page_size must be between 1 and 200. | |
| error_param | video_list contains duplicate video_id. | |
| error_permission | auth failed | |
| error_param | start_date is required | |
| error_param | start_date is required; start_date must use YYYY-MM-DD | |
| error_param | end_date is required | |
| error_param | end_date must use YYYY-MM-DD |
§17 Common errors
Common errors
| Error | Description | Solution |
|---|---|---|
| error_auth | partner_id is invalid | |
| error_auth | The App is deleted, and you'll be unable to make any API call. | |
| error_auth | App developer’s permissions for authorizations have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| error_param | There is no partner_id in query. | |
| error_param | Invalid partner_id. | |
| error_param | no timestamp | |
| error_param | Invalid timestamp | |
| error_param | There is no sign in query. | |
| error_sign | Wrong sign. | |
| invalid_partner_id | Invalid partner_id, please have a check. | |
| error_auth | No permission to current api. | |
| error_api_call_restricted | The App permission for api call have been restricted. If you’re a seller, contact the developer for more information. If you’re the developer, refer to the Open Platform Console for details. | |
| api_suspended | The API is offline. Please call v2 API instead. | |
| error_limit | The total API call number made by your APP has reached the daily API call limit, please try again after 00: 00 (UTC+08:00) | |
| error_rate_limit | Too many requests. You have reached the rate limit. Please try again later. | |
| source_ip_undeclared | Request Source IP ({ip}) is undeclared. Please declare all your IP addresses in the Shopee Open Platform Console > App list > IP Address Whitelist | |
| error_param | Permission denied. This API is currently offline or the request path is incorrect. | |
| error_param | Partner_id is invalid, should be an integer between 0 and 4294967295. | |
| error_param | no timestamp. | |
| error_param | Timestamp is invalid, should be an integer between 0 and 4294967295. | |
| error_param | Timestamp is expired. | |
| error_partner_key_expired | Your API partner key has expired, please reset the Live API Partner Key in Console to get a new valid partner key to call open api. | |
| error_api_permission | This app type has no permission to this API. |
§18 Update log
Update log
| Date | Change |
|---|---|
| 2026-07-09 | New API |
