> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitoearn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Work Analytics

> Interface description: Query statistics snapshots for a work on the specified platform. A `code: 0` response does not guarantee metrics are available; when no collected work data matches, the response returns empty `snapshots` with a `message` and omits `metrics`.



## OpenAPI

````yaml /openapi/en/aitoearn.openapi.json get /api/v2/channels/works/{platform}/{platformWorkId}/analytics
openapi: 3.0.1
info:
  title: AiToEarn Open Platform API
  description: >-
    AiToEarn Open Platform API. You can switch between the China and
    international sites for testing. Business success is determined by whether
    the response body has code === 0.
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: China site
  - url: https://aitoearn.ai
    description: International site
security: []
tags:
  - name: AI Services
  - name: AI Services/Video Generation
  - name: AI Services/Image Generation
  - name: Channel Management
  - name: Channel Management/Accounts
  - name: Channel Management/Publishing
  - name: Channel Management/Platforms
  - name: Channel Management/Works
  - name: Channel Management/Account Groups
  - name: Channel Management/Authorization
  - name: Asset Management
  - name: AI Services/Large Language Models
  - name: AI Services/Real-person Verification
  - name: AI Services/Virtual Portrait Assets
  - name: AI Services/Agent
  - name: Account & Keys/API Key
paths:
  /api/v2/channels/works/{platform}/{platformWorkId}/analytics:
    get:
      tags:
        - Channel Management/Works
      summary: Work Analytics
      description: >-
        Interface description: Query statistics snapshots for a work on the
        specified platform. A `code: 0` response does not guarantee metrics are
        available; when no collected work data matches, the response returns
        empty `snapshots` with a `message` and omits `metrics`.
      operationId: WorksController_getAnalytics_v2
      parameters:
        - name: platform
          in: path
          description: Platform identification
          required: true
          example: douyin
          schema:
            type: string
            example: douyin
            default: douyin
        - name: platformWorkId
          in: path
          description: Platform work ID
          required: true
          example: '7665952416433086310'
          schema:
            type: string
            example: '7665952416433086310'
        - name: accountId
          in: query
          description: Account ID
          required: false
          example: ''
          schema:
            description: Account ID
            type: string
            minLength: 1
        - name: since
          in: query
          description: start time
          required: false
          example: ''
          schema:
            description: start time
            type: string
            format: date-time
        - name: until
          in: query
          description: end time
          required: false
          example: ''
          schema:
            description: end time
            type: string
            format: date-time
      responses:
        '200':
          description: >-
            The request has been processed by the service. Business success is
            determined by whether the response body has code === 0.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      platform:
                        type: string
                      accountId:
                        type: string
                      platformWorkId:
                        type: string
                      snapshots:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      message:
                        type: string
                      metrics:
                        type: object
                        additionalProperties: true
                    additionalProperties: false
                  code:
                    type: integer
                    description: >-
                      Business status code. 0 means success; non-zero means a
                      business error.
                  message:
                    type: string
                    description: Response message.
                  requestId:
                    type: string
                    description: Request ID.
                  timestamp:
                    type: integer
                    description: Error response timestamp in Unix milliseconds.
              examples:
                notFound:
                  summary: No analytics data found
                  value:
                    code: 0
                    message: Request succeeded
                    data:
                      platform: string
                      accountId: string
                      platformWorkId: string
                      snapshots: []
                      message: string
                    requestId: string
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Need to get API Key from AiToEarn. Click to go to ["API Key Obtaining
        Tutorial"](/en/use/api-key).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.