# 获取作品观众数据分析/Fetch item audience portrait

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v1/douyin/creator_v2/fetch_item_audience_portrait:
    post:
      summary: 获取作品观众数据分析/Fetch item audience portrait
      deprecated: false
      description: >-
        # [中文]

        ### 用途:

        - 获取抖音作品的观众数据分析

        - 了解观看作品的用户画像特征

        - 包含活跃分布、性别分布、地域分布、年龄分布等多维度数据

        - 帮助创作者精准定位目标受众，优化内容策略

        - **此接口需要用户提供有效的抖音创作者平台Cookie**

        - **使用 POST 方法，Cookie 在请求体中传输，更安全**


        ### 请求体参数:

        - cookie: 用户的抖音创作者平台Cookie（必填，在请求体中传输）

        - item_id: 作品ID（必填）


        ### 返回数据说明:

        返回作品的观众画像数据，包括以下维度：


        **1. 活跃分布 (active)**:

        - key: 活跃时段标识（"2"=上午, "3"=下午, "4"=晚上, "-1"=其他）

        - value: 该时段的活跃用户占比（0-1之间的小数）


        **2. 性别分布 (gender)**:

        - ratio_list: 性别占比列表
          - key: "male"（男性）或 "female"（女性）
          - value: 该性别用户占比（0-1之间的小数）
        - tgi_list: 性别TGI指数列表（Target Group Index，目标群体指数）
          - key: 性别标识
          - value: TGI值（100为平均水平，>100表示高于平均）

        **3. 地域分布 (province)**:

        - ratio_list: 省份占比列表
          - key: 省份名称（如"浙江"、"广东"、"北京"）
          - value: 该省份用户占比（0-1之间的小数）
        - tgi_list: 省份TGI指数列表
          - key: 省份名称
          - value: TGI值（反映该地区用户的活跃度）

        **4. 年龄分布 (age)**:

        - ratio_list: 年龄段占比列表
          - key: 年龄段（"-18", "18-23", "24-30", "31-40", "41-50", "50-"）
          - value: 该年龄段用户占比（0-1之间的小数）
        - tgi_list: 年龄段TGI指数列表
          - key: 年龄段
          - value: TGI值（反映该年龄段用户的偏好度）

        **5. 其他维度**:

        - career: 职业分布（可能为空）

        - city_level: 城市等级分布（包含ratio_list和tgi_list）

        - new_user: 新用户占比（可能为空）


        **TGI指数说明**:

        - TGI = 100: 该群体表现与平台平均水平一致

        - TGI > 100: 该群体在此作品中的占比高于平台平均，是核心受众

        - TGI < 100: 该群体在此作品中的占比低于平台平均

        - TGI越高，说明该群体对此类内容越感兴趣


        **注意**: 如果某些数据为空或占比为0，可能原因：

        - 作品刚发布，样本量不足

        - 该维度暂无数据或数据未达到统计阈值

        - 某些地区或年龄段的用户较少


        ### 数据价值:

        - **精准定位**: 了解核心受众群体特征

        - **内容优化**: 根据受众特点调整内容风格和主题

        - **发布时机**: 根据活跃时间优化发布时间

        - **地域策略**: 针对主要地域用户定制内容

        - **年龄适配**: 调整内容深度和表达方式

        - **性别偏好**: 理解不同性别用户的内容偏好


        ### 应用场景:

        1. **内容定位**: 根据主要受众群体调整内容方向

        2. **发布优化**: 在目标受众活跃时段发布作品

        3. **地域营销**: 针对主要地域用户进行本地化内容创作

        4. **年龄策略**: 根据年龄分布调整内容复杂度和话题

        5. **性别营销**: 平衡或侧重特定性别受众的内容设计

        6. **受众拓展**: 识别潜力受众群体，扩大影响力


        ### Cookie 获取方式:

        1. 登录抖音创作者平台 (https://creator.douyin.com)

        2. 打开浏览器开发者工具（F12）

        3. 切换到 Network 标签

        4. 刷新页面或进行操作

        5. 找到任意请求，复制 Cookie 请求头的值


        # [English]

        ### Purpose:

        - 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**


        ### Request Body Parameters:

        - cookie: User's Douyin Creator Platform Cookie (required, transmitted
        in request body)

        - item_id: Item ID (required)


        ### Return Data Description:

        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


        ### Data Value:

        - **Precise Targeting**: Understand core audience characteristics

        - **Content Optimization**: Adjust content style based on audience
        traits

        - **Publishing Timing**: Optimize publish time based on active periods

        - **Regional Strategy**: Customize content for main regional users

        - **Age Adaptation**: Adjust content depth and expression

        - **Gender Preference**: Understand content preferences by gender


        ### Application Scenarios:

        1. **Content Positioning**: Adjust content direction based on main
        audience

        2. **Publishing Optimization**: Publish during target audience active
        hours

        3. **Regional Marketing**: Create localized content for main regions

        4. **Age Strategy**: Adjust content complexity based on age distribution

        5. **Gender Marketing**: Balance or focus on specific gender audiences

        6. **Audience Expansion**: Identify potential audience groups to expand
        influence


        ### How to get Cookie:

        1. Login to Douyin Creator Platform (https://creator.douyin.com)

        2. Open browser developer tools (F12)

        3. Switch to Network tab

        4. Refresh page or perform operations

        5. Find any request and copy the Cookie header value


        # [示例/Example]

        ```json

        {
            "cookie": "Your_Cookie_Here",
            "item_id": "7559536212910853422"
        }

        ```


        ### 返回数据示例/Response Example:

        ```json

        {
            "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": ""
        }

        ```


        ### 数据解读/Data Interpretation:

        **活跃分布 (active)**:

        - key="2": 上午时段（通常指6:00-12:00）

        - key="3": 下午时段（通常指12:00-18:00）

        - key="4": 晚上时段（通常指18:00-24:00）

        - key="-1": 其他时段或未分类

        - value值越高，说明该时段观众越多

        - 示例中晚上时段（key="4"）占比69.6%，是主要观看时段


        **性别分布 (gender)**:

        - ratio_list显示实际性别占比

        - tgi_list显示性别偏好度（TGI>100表示该性别用户偏好此内容）

        - 示例中男性占比76.1%，TGI为135.5，说明男性用户是核心受众

        - 女性TGI仅54.5，低于平均水平，可考虑优化以吸引女性用户


        **地域分布 (province)**:

        - ratio_list显示各省份用户占比

        - tgi_list显示地域偏好度

        - 示例中浙江占比24%，TGI高达379，说明浙江用户特别喜欢此类内容

        - 江苏、湖北的TGI也较高（>160），是重点地域

        - 可针对高TGI地域制作本地化内容


        **年龄分布 (age)**:

        - "-18": 18岁以下，TGI高达563，说明未成年用户特别喜欢

        - "18-23": 18-23岁，占比35.5%，TGI为191，是主力受众

        - "24-30": 24-30岁，TGI仅41，低于平均水平

        - "31-40", "41-50", "50-": 中老年用户占比和TGI都较低

        - 此作品明显偏向年轻化受众


        **TGI指数应用**:

        - TGI>150: 高度偏好，是核心目标群体

        - TGI 100-150: 中度偏好，有潜力拓展

        - TGI 50-100: 低度偏好，需要优化内容吸引

        - TGI<50: 不匹配，可能不是目标受众


        ### 优化建议/Optimization Suggestions:

        1. **时间优化**: 根据active数据，在高活跃时段发布（示例中晚上最佳）

        2. **内容适配**: 根据高TGI年龄段调整内容风格（示例应偏向18-23岁年轻化）

        3. **性别策略**: 针对高TGI性别深化内容，或优化以平衡性别受众

        4. **地域营销**: 为高TGI地域（如浙江、江苏）创作本地化内容或方言版本

        5. **受众拓展**: 关注TGI低的群体（如24-30岁），寻找增长机会

        6. **精准定位**: 聚焦TGI>150的群体，他们是最有价值的核心受众

        7. **内容调整**: 如果想拓展受众，需要调整内容以提升低TGI群体的兴趣

        8. **A/B测试**: 针对不同TGI群体制作差异化内容，测试效果


        ### 注意事项/Notes:

        - 观众数据需要一定播放量才准确，建议作品有1000+播放后查看

        - 数据可能有延迟，通常在作品发布24-48小时后更新

        - Index值用于与平台均值对比，帮助识别特色受众

        - 结合作品内容特点和目标受众综合分析

        - 不同内容类型的受众特征差异较大，需要针对性优化
      operationId: >-
        fetch_item_audience_portrait_api_v1_douyin_creator_v2_fetch_item_audience_portrait_post
      tags:
        - Douyin-Creator-V2-API
        - Douyin-Creator-V2-API
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ItemAudiencePortraitRequest'
              description: 作品观众数据分析请求参数/Item audience portrait request parameters
            example:
              cookie: Your_Cookie_Here
              item_id: '7559536212910853422'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseModel'
          headers: {}
          x-apifox-name: OK
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          headers: {}
          x-apifox-name: Unprocessable Entity
      security:
        - HTTPBearer: []
          x-apifox:
            schemeGroups:
              - id: INoXil9ABcrjLG4vTgVKs
                schemeIds:
                  - HTTPBearer
            required: true
            use:
              id: INoXil9ABcrjLG4vTgVKs
            scopes:
              INoXil9ABcrjLG4vTgVKs:
                HTTPBearer: []
      x-apifox-folder: Douyin-Creator-V2-API
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4705614/apis/api-359719866-run
components:
  schemas:
    ItemAudiencePortraitRequest:
      properties:
        cookie:
          type: string
          title: Cookie
          description: 用户Cookie/User Cookie
          examples:
            - Your_Cookie_Here
        item_id:
          type: string
          title: Item Id
          description: 作品ID/Item ID
          examples:
            - '7559536212910853422'
      type: object
      required:
        - cookie
        - item_id
      title: ItemAudiencePortraitRequest
      description: |-
        作品观众数据分析请求模型
        Item Audience Portrait Request Model
      x-apifox-orders:
        - cookie
        - item_id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    ResponseModel:
      properties:
        code:
          type: integer
          title: Code
          description: HTTP status code | HTTP状态码
          default: 200
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
          description: Unique request identifier | 唯一请求标识符
        message:
          type: string
          title: Message
          description: Response message (EN-US) | 响应消息 (English)
          default: Request successful. This request will incur a charge.
        message_zh:
          type: string
          title: Message Zh
          description: Response message (ZH-CN) | 响应消息 (中文)
          default: 请求成功，本次请求将被计费。
        support:
          type: string
          title: Support
          description: Support message | 支持消息
          default: 'Discord: https://discord.gg/aMEAS8Xsvz'
        time:
          type: string
          title: Time
          description: The time the response was generated | 生成响应的时间
        time_stamp:
          type: integer
          title: Time Stamp
          description: The timestamp the response was generated | 生成响应的时间戳
        time_zone:
          type: string
          title: Time Zone
          description: The timezone of the response time | 响应时间的时区
          default: America/Los_Angeles
        docs:
          anyOf:
            - type: string
            - type: 'null'
          title: Docs
          description: >-
            Link to the API Swagger documentation for this endpoint | 此端点的 API
            Swagger 文档链接
        cache_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Message
          description: Cache message (EN-US) | 缓存消息 (English)
          default: >-
            This response is cached and accessible via the URL below for 24
            hours at no extra cost. The cache is for request tracing only — it
            doesn't affect the API's data freshness and won't be returned
            through the API again.
        cache_message_zh:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Message Zh
          description: Cache message (ZH-CN) | 缓存消息 (中文)
          default: >-
            本次响应已缓存，可通过下方 URL 直接查看，有效期 24
            小时，访问缓存链接无额外费用。缓存仅用于请求溯源，不影响接口数据的时效性，也不会再次通过接口返回。
        cache_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Cache Url
          description: The URL to access the cached result | 访问缓存结果的 URL
        router:
          type: string
          title: Router
          description: The endpoint that generated this response | 生成此响应的端点
          default: ''
        params:
          type: string
        data:
          anyOf:
            - type: string
            - type: 'null'
          title: Data
          description: The response data | 响应数据
      type: object
      title: ResponseModel
      x-apifox-orders:
        - code
        - request_id
        - message
        - message_zh
        - support
        - time
        - time_stamp
        - time_zone
        - docs
        - cache_message
        - cache_message_zh
        - cache_url
        - router
        - params
        - data
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      x-apifox-orders:
        - detail
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      x-apifox-orders:
        - loc
        - msg
        - type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
  securitySchemes:
    HTTPBearer:
      type: bearer
      description: >
        ----

        #### API Token Introduction:

        ##### Method 1: Use API Token in the Request Header (Recommended)

        - **Header**: `Authorization`

        - **Format**: `Bearer {token}`

        - **Example**: `{"Authorization": "Bearer your_token"}`

        - **Swagger UI**: Click on the `Authorize` button in the upper right
        corner of the page to enter the API token directly without the `Bearer`
        keyword.


        ##### Method 2: Use API Token in the Cookie (Not Recommended, Use Only
        When Method 1 is Unavailable)

        - **Cookie**: `Authorization`

        - **Format**: `Bearer {token}`

        - **Example**: `Authorization=Bearer your_token`


        #### Get API Token:

        1. Register and log in to your account on the TikHub website.

        2. Go to the user center, click on the API token menu, and create an API
        token.

        3. Copy and use the API token in the request header.

        4. Keep your API token confidential and use it only in the request
        header.


        ----


        #### API令牌简介:

        ##### 方法一：在请求头中使用API令牌（推荐）

        - **请求头**: `Authorization`

        - **格式**: `Bearer {token}`

        - **示例**: `{"Authorization": "Bearer your_token"}`

        - **Swagger UI**: 点击页面右上角的`Authorize`按钮，直接输入API令牌，不需要`Bearer`关键字。


        ##### 方法二：在Cookie中使用API令牌（不推荐，仅在无法使用方法一时使用）

        - **Cookie**: `Authorization`

        - **格式**: `Bearer {token}`

        - **示例**: `Authorization=Bearer your_token`


        #### 获取API令牌:

        1. 在TikHub网站注册并登录账户。

        2. 进入用户中心，点击API令牌菜单，创建API令牌。

        3. 复制并在请求头中使用API令牌。

        4. 保密您的API令牌，仅在请求头中使用。
      scheme: bearer
servers:
  - url: https://api.tikhub.io
    description: Production Environment
security: []

```
