API DocsdouyinDataFetch item audience portrait
Fetch item audience portrait
What this API is for
- Get Douyin item audience portrait data
- Understand viewer demographic characteristics
- Includes active distribution, gender distribution, region distribution, age distribution
- Help creators precisely target audiences and optimize content strategy
- **This API requires users to provide valid Douyin Creator Platform Cookie**
- **Use POST method, Cookie is transmitted in request body, more secure**
POST
/openapi/api/v1/douyin/creator_v2/fetch_item_audience_portraitPrice: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
- cookie: User's Douyin Creator Platform Cookie (required, transmitted in request body)
- item_id: Item ID (required)
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| cookie | body / string | Yes |
| Your_Cookie_Here |
| item_id | body / string | Yes |
| 7559536212910853422 |
Request body example
{
"cookie": "Your_Cookie_Here",
"item_id": "7559536212910853422"
}Request examples
curl -X POST "https://api.trmesh.com/openapi/api/v1/douyin/creator_v2/fetch_item_audience_portrait" \ -H "Authorization: Bearer sdc_your_project_token"
Response fields
- Returns audience portrait data with multiple dimensions:
- **1. Active Distribution (active)**:
- key: Time period identifier ("2"=morning, "3"=afternoon, "4"=evening, "-1"=other)
- value: Active user ratio in this period (decimal between 0-1)
- **2. Gender Distribution (gender)**:
- ratio_list: Gender ratio list
- key: "male" or "female"
- value: Gender user ratio (decimal between 0-1)
- tgi_list: Gender TGI index list (Target Group Index)
- key: Gender identifier
- value: TGI value (100=average, >100=above average)
- **3. Region Distribution (province)**:
- ratio_list: Province ratio list
- key: Province name (e.g., "浙江", "广东", "北京")
- value: Province user ratio (decimal between 0-1)
- tgi_list: Province TGI index list
- key: Province name
- value: TGI value (reflects regional user activity)
- **4. Age Distribution (age)**:
- ratio_list: Age range ratio list
- key: Age range ("-18", "18-23", "24-30", "31-40", "41-50", "50-")
- value: Age range user ratio (decimal between 0-1)
- tgi_list: Age range TGI index list
- key: Age range
- value: TGI value (reflects age group preference)
- **5. Other Dimensions**:
- career: Career distribution (may be empty)
- city_level: City level distribution (contains ratio_list and tgi_list)
- new_user: New user ratio (may be empty)
- **TGI Index Explanation**:
- TGI = 100: Group performance matches platform average
- TGI > 100: Group ratio is higher than platform average, core audience
- TGI < 100: Group ratio is lower than platform average
- Higher TGI indicates greater interest in this content type
- **Note**: If some data is empty or zero, possible reasons:
- Item just published with insufficient sample size
- No data available for this dimension or below statistical threshold
- Few users in certain regions or age groups
| Field | Type | Notes | Example |
|---|---|---|---|
| key | unknown |
| |
| value | unknown |
| |
| ratio_list | unknown |
| |
| tgi_list | unknown |
| |
| career | unknown |
| |
| city_level | unknown |
| |
| new_user | unknown |
| |
| Note | 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 |
|
Response example
{
"active": [
{
"key": "2",
"value": 0.0949367088607595
},
{
"key": "3",
"value": 0.15822784810126583
},
{
"key": "4",
"value": 0.6962025316455697
},
{
"key": "-1",
"value": 0.05063291139240506
}
],
"gender": {
"ratio_list": [
{
"key": "male",
"value": 0.7612903225806451
},
{
"key": "female",
"value": 0.23870967741935484
}
],
"tgi_list": [
{
"key": "male",
"value": 135.47066238136884
},
{
"key": "female",
"value": 54.49489346627035
}
]
},
"province": {
"ratio_list": [
{
"key": "浙江",
"value": 0.24050632911392406
},
{
"key": "江苏",
"value": 0.12025316455696203
},
{
"key": "广东",
"value": 0.0759493670886076
},
{
"key": "湖北",
"value": 0.06329113924050633
}
],
"tgi_list": [
{
"key": "浙江",
"value": 379.3041755346526
},
{
"key": "江苏",
"value": 169.70798949761055
},
{
"key": "广东",
"value": 70.0324843724158
},
{
"key": "湖北",
"value": 164.36825973059874
}
]
},
"age": {
"ratio_list": [
{
"key": "18-23",
"value": 0.3548387096774194
},
{
"key": "-18",
"value": 0.1935483870967742
},
{
"key": "31-40",
"value": 0.14838709677419354
},
{
"key": "50-",
"value": 0.11612903225806452
},
{
"key": "41-50",
"value": 0.10967741935483871
},
{
"key": "24-30",
"value": 0.07741935483870968
}
],
"tgi_list": [
{
"key": "-18",
"value": 563.217280988937
},
{
"key": "18-23",
"value": 191.33476395324902
},
{
"key": "50-",
"value": 80.07137972518639
},
{
"key": "41-50",
"value": 73.75840394976595
},
{
"key": "31-40",
"value": 49.79826524888418
},
{
"key": "24-30",
"value": 41.07687409864829
}
]
},
"career": [],
"city_level": {
"ratio_list": [],
"tgi_list": []
},
"new_user": [],
"status_code": 0,
"status_msg": ""
}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