API DocstiktokDataGet top contents item detail
Get top contents item detail
What this API is for
- Get detailed data of a single video from the Top Contents ranking
- Returns top comments and author profile on top of the ranking data
POST
/openapi/api/v1/tiktok/ads/get_top_contents_item_detailPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- item_id: Video ID, obtained from itemInfo.itemID of /get_top_contents_list
- period_end_timestamp: Period end timestamp in seconds, required
- Generate this value from the target ranking date; it is not returned by another endpoint
- Example: 1785024000; do not pass 0, which returns an empty result
- For period_dimension 1, pass a Sunday 00:00 UTC timestamp; other dates return no data
- For period_dimension 3 or 5, any past date works
- If item_id comes from /get_top_contents_list, reuse that ranking query's timestamp
- period_dimension: Period, one of 1 / 3 / 5, default 3, recommended to match the ranking query
- country_code: Country code of the ranking the video belongs to, default US
- cookie: Custom Cookie string, optional parameter, you can use your own Cookie to get more data
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| item_id | body / string | Yes |
| |
| period_end_timestamp | body / integer | Yes |
| |
| period_dimension | body / integer | No |
| |
| country_code | body / string | No |
| |
| cookie | body / string | No |
|
Request examples
curl -X POST "https://api.trmesh.com/openapi/api/v1/tiktok/ads/get_top_contents_item_detail" \ -H "Authorization: Bearer sdc_your_project_token"
Response fields
- entityInfo: Video detail (itemInfo / itemMetrics / itemAuthorInfo / itemAuthorMetrics / contentTags / commentInfos)
| Field | Type | Notes | Example |
|---|---|---|---|
| entityInfo | unknown |
| |
| itemInfo | unknown |
| |
| itemMetrics | unknown |
| |
| itemAuthorInfo | unknown |
| |
| itemAuthorMetrics | unknown |
| |
| contentTags | unknown |
| |
| commentInfos | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples